Auto merge of #3419 - RalfJung:rustup, r=RalfJung
Rustup https://github.com/rust-lang/rust/pull/123081 landed so hopefully this works now.
This commit is contained in:
commit
2e198d04ee
169 changed files with 2339 additions and 672 deletions
|
|
@ -1003,6 +1003,7 @@ impl Step for PlainSourceTarball {
|
|||
// Vendor all Cargo dependencies
|
||||
let mut cmd = Command::new(&builder.initial_cargo);
|
||||
cmd.arg("vendor")
|
||||
.arg("--versioned-dirs")
|
||||
.arg("--sync")
|
||||
.arg(builder.src.join("./src/tools/cargo/Cargo.toml"))
|
||||
.arg("--sync")
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e1eead1181a691e56299294d5f1d62fe7a26d317
|
||||
Subproject commit 98b33e9a441457b0a491fe1be90e7de64eafc3e5
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 5afb503a4c1ea3c84370f8f4c08a1cddd1cdf6ad
|
||||
Subproject commit 984b36eca4b9293df04d5ba4eb5c4f77db0f51dc
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit e093099709456e6fd74fecd2505fdf49a2471c10
|
||||
Subproject commit 7601e0c5ad29d5bd3b518700ea63fddfff5915a7
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 8a5d647f19b08998612146b1cb2ca47083db63e0
|
||||
Subproject commit ffa246b7fd95a96e1cd54883e613aed42c32547d
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit d438c80c45c24be676ef5867edc79d0a14910efe
|
||||
Subproject commit a510712d05c6c98f987af24dd73cdfafee8922e6
|
||||
|
|
@ -143,13 +143,13 @@ impl Msrv {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn enter_lint_attrs(&mut self, sess: &Session, attrs: &[Attribute]) {
|
||||
pub fn check_attributes(&mut self, sess: &Session, attrs: &[Attribute]) {
|
||||
if let Some(version) = Self::parse_attr(sess, attrs) {
|
||||
self.stack.push(version);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn exit_lint_attrs(&mut self, sess: &Session, attrs: &[Attribute]) {
|
||||
pub fn check_attributes_post(&mut self, sess: &Session, attrs: &[Attribute]) {
|
||||
if Self::parse_attr(sess, attrs).is_some() {
|
||||
self.stack.pop();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,10 +158,10 @@ impl<'tcx> LateLintPass<'tcx> for CognitiveComplexity {
|
|||
}
|
||||
}
|
||||
|
||||
fn enter_lint_attrs(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) {
|
||||
fn check_attributes(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) {
|
||||
self.limit.push_attrs(cx.sess(), attrs, "cognitive_complexity");
|
||||
}
|
||||
fn exit_lint_attrs(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) {
|
||||
fn check_attributes_post(&mut self, cx: &LateContext<'tcx>, attrs: &'tcx [Attribute]) {
|
||||
self.limit.pop_attrs(cx.sess(), attrs, "cognitive_complexity");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,12 +162,12 @@ impl MissingDoc {
|
|||
impl_lint_pass!(MissingDoc => [MISSING_DOCS_IN_PRIVATE_ITEMS]);
|
||||
|
||||
impl<'tcx> LateLintPass<'tcx> for MissingDoc {
|
||||
fn enter_lint_attrs(&mut self, _: &LateContext<'tcx>, attrs: &'tcx [ast::Attribute]) {
|
||||
fn check_attributes(&mut self, _: &LateContext<'tcx>, attrs: &'tcx [ast::Attribute]) {
|
||||
let doc_hidden = self.doc_hidden() || is_doc_hidden(attrs);
|
||||
self.doc_hidden_stack.push(doc_hidden);
|
||||
}
|
||||
|
||||
fn exit_lint_attrs(&mut self, _: &LateContext<'tcx>, _: &'tcx [ast::Attribute]) {
|
||||
fn check_attributes_post(&mut self, _: &LateContext<'tcx>, _: &'tcx [ast::Attribute]) {
|
||||
self.doc_hidden_stack.pop().expect("empty doc_hidden_stack");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ impl LateLintPass<'_> for MsrvAttrImpl {
|
|||
.filter(|t| matches!(t.unpack(), GenericArgKind::Type(_)))
|
||||
.any(|t| match_type(cx, t.expect_ty(), &paths::MSRV))
|
||||
})
|
||||
&& !items.iter().any(|item| item.ident.name == sym!(enter_lint_attrs))
|
||||
&& !items.iter().any(|item| item.ident.name == sym!(check_attributes))
|
||||
{
|
||||
let context = if is_late_pass { "LateContext" } else { "EarlyContext" };
|
||||
let lint_pass = if is_late_pass { "LateLintPass" } else { "EarlyLintPass" };
|
||||
|
|
|
|||
|
|
@ -131,14 +131,14 @@ use rustc_middle::hir::nested_filter;
|
|||
#[macro_export]
|
||||
macro_rules! extract_msrv_attr {
|
||||
($context:ident) => {
|
||||
fn enter_lint_attrs(&mut self, cx: &rustc_lint::$context<'_>, attrs: &[rustc_ast::ast::Attribute]) {
|
||||
fn check_attributes(&mut self, cx: &rustc_lint::$context<'_>, attrs: &[rustc_ast::ast::Attribute]) {
|
||||
let sess = rustc_lint::LintContext::sess(cx);
|
||||
self.msrv.enter_lint_attrs(sess, attrs);
|
||||
self.msrv.check_attributes(sess, attrs);
|
||||
}
|
||||
|
||||
fn exit_lint_attrs(&mut self, cx: &rustc_lint::$context<'_>, attrs: &[rustc_ast::ast::Attribute]) {
|
||||
fn check_attributes_post(&mut self, cx: &rustc_lint::$context<'_>, attrs: &[rustc_ast::ast::Attribute]) {
|
||||
let sess = rustc_lint::LintContext::sess(cx);
|
||||
self.msrv.exit_lint_attrs(sess, attrs);
|
||||
self.msrv.check_attributes_post(sess, attrs);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
cb7c63606e53715f94f3ba04d38e50772e4cd23d
|
||||
b13a71a2e77f4625d1a2b8a5b9488414686ebca9
|
||||
|
|
|
|||
|
|
@ -364,6 +364,10 @@ fn main() {
|
|||
let args = rustc_driver::args::raw_args(&early_dcx)
|
||||
.unwrap_or_else(|_| std::process::exit(rustc_driver::EXIT_FAILURE));
|
||||
|
||||
// Install the ctrlc handler that sets `rustc_const_eval::CTRL_C_RECEIVED`, even if
|
||||
// MIRI_BE_RUSTC is set.
|
||||
rustc_driver::install_ctrlc_handler();
|
||||
|
||||
// If the environment asks us to actually be rustc, then do that.
|
||||
if let Some(crate_kind) = env::var_os("MIRI_BE_RUSTC") {
|
||||
// Earliest rustc setup.
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
use std::cell::RefCell;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::num::TryFromIntError;
|
||||
use std::sync::atomic::{AtomicBool, Ordering::Relaxed};
|
||||
use std::sync::atomic::Ordering::Relaxed;
|
||||
use std::task::Poll;
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
use either::Either;
|
||||
|
||||
use rustc_const_eval::CTRL_C_RECEIVED;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_index::{Idx, IndexVec};
|
||||
|
|
@ -1045,21 +1046,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
|
|||
/// Run the core interpreter loop. Returns only when an interrupt occurs (an error or program
|
||||
/// termination).
|
||||
fn run_threads(&mut self) -> InterpResult<'tcx, !> {
|
||||
static SIGNALED: AtomicBool = AtomicBool::new(false);
|
||||
ctrlc::set_handler(move || {
|
||||
// Indicate that we have ben signaled to stop. If we were already signaled, exit
|
||||
// immediately. In our interpreter loop we try to consult this value often, but if for
|
||||
// whatever reason we don't get to that check or the cleanup we do upon finding that
|
||||
// this bool has become true takes a long time, the exit here will promptly exit the
|
||||
// process on the second Ctrl-C.
|
||||
if SIGNALED.swap(true, Relaxed) {
|
||||
std::process::exit(1);
|
||||
}
|
||||
})
|
||||
.unwrap();
|
||||
let this = self.eval_context_mut();
|
||||
loop {
|
||||
if SIGNALED.load(Relaxed) {
|
||||
if CTRL_C_RECEIVED.load(Relaxed) {
|
||||
this.machine.handle_abnormal_termination();
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||
"byteorder", // via ruzstd in object in thorin-dwp
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"cfg_aliases",
|
||||
"compiler_builtins",
|
||||
"cpufeatures",
|
||||
"crc32fast",
|
||||
|
|
@ -216,6 +217,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||
"crossbeam-epoch",
|
||||
"crossbeam-utils",
|
||||
"crypto-common",
|
||||
"ctrlc",
|
||||
"darling",
|
||||
"darling_core",
|
||||
"darling_macro",
|
||||
|
|
@ -281,6 +283,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||
"memmap2",
|
||||
"memoffset",
|
||||
"miniz_oxide",
|
||||
"nix",
|
||||
"nu-ansi-term",
|
||||
"num-conv",
|
||||
"num_cpus",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const ENTRY_LIMIT: usize = 900;
|
|||
// FIXME: The following limits should be reduced eventually.
|
||||
|
||||
const ISSUES_ENTRY_LIMIT: usize = 1750;
|
||||
const ROOT_ENTRY_LIMIT: usize = 859;
|
||||
const ROOT_ENTRY_LIMIT: usize = 860;
|
||||
|
||||
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
|
||||
"rs", // test source files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue