diff --git a/Cargo.lock b/Cargo.lock index cedf44be85bda..905f523aa53d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -404,9 +404,9 @@ version = "0.1.0" [[package]] name = "cc" -version = "1.0.54" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" +checksum = "0fde55d2a2bfaa4c9668bbc63f531fbdeee3ffe188f4662511ce2c22b3eedebe" dependencies = [ "jobserver", ] @@ -1366,8 +1366,8 @@ checksum = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" name = "installer" version = "0.0.0" dependencies = [ + "anyhow", "clap", - "failure", "flate2", "lazy_static", "num_cpus", diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index cceb794165059..e8ec575ea3746 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -9,6 +9,7 @@ //! ensure that they're always in place if needed. use std::env; +use std::env::consts::EXE_EXTENSION; use std::ffi::OsString; use std::fs::{self, File}; use std::io; @@ -252,8 +253,14 @@ impl Step for Llvm { // FIXME: if the llvm root for the build triple is overridden then we // should use llvm-tblgen from there, also should verify that it // actually exists most of the time in normal installs of LLVM. - let host = builder.llvm_out(builder.config.build).join("bin/llvm-tblgen"); - cfg.define("CMAKE_CROSSCOMPILING", "True").define("LLVM_TABLEGEN", &host); + let host_bin = builder.llvm_out(builder.config.build).join("bin"); + cfg.define("CMAKE_CROSSCOMPILING", "True"); + cfg.define("LLVM_TABLEGEN", host_bin.join("llvm-tblgen").with_extension(EXE_EXTENSION)); + cfg.define("LLVM_NM", host_bin.join("llvm-nm").with_extension(EXE_EXTENSION)); + cfg.define( + "LLVM_CONFIG_PATH", + host_bin.join("llvm-config").with_extension(EXE_EXTENSION), + ); if target.contains("netbsd") { cfg.define("CMAKE_SYSTEM_NAME", "NetBSD"); @@ -262,8 +269,6 @@ impl Step for Llvm { } else if target.contains("windows") { cfg.define("CMAKE_SYSTEM_NAME", "Windows"); } - - cfg.define("LLVM_NATIVE_BUILD", builder.llvm_out(builder.config.build).join("build")); } if let Some(ref suffix) = builder.config.llvm_version_suffix { @@ -431,6 +436,9 @@ fn configure_cmake( cflags.push_str(" -miphoneos-version-min=10.0"); } } + if builder.config.llvm_clang_cl.is_some() { + cflags.push_str(&format!(" --target={}", target)) + } cfg.define("CMAKE_C_FLAGS", cflags); let mut cxxflags = builder.cflags(target, GitRepo::Llvm).join(" "); if builder.config.llvm_static_stdcpp && !target.contains("msvc") && !target.contains("netbsd") { @@ -439,6 +447,9 @@ fn configure_cmake( if let Some(ref s) = builder.config.llvm_cxxflags { cxxflags.push_str(&format!(" {}", s)); } + if builder.config.llvm_clang_cl.is_some() { + cxxflags.push_str(&format!(" --target={}", target)) + } cfg.define("CMAKE_CXX_FLAGS", cxxflags); if let Some(ar) = builder.ar(target) { if ar.is_absolute() { @@ -484,7 +495,7 @@ impl Step for Lld { run.builder.ensure(Lld { target: run.target }); } - /// Compile LLVM for `target`. + /// Compile LLD for `target`. fn run(self, builder: &Builder<'_>) -> PathBuf { if builder.config.dry_run { return PathBuf::from("lld-out-dir-test-gen"); @@ -521,6 +532,7 @@ impl Step for Lld { // can't build on a system where your paths require `\` on Windows, but // there's probably a lot of reasons you can't do that other than this. let llvm_config_shim = env::current_exe().unwrap().with_file_name("llvm-config-wrapper"); + cfg.out_dir(&out_dir) .profile("Release") .env("LLVM_CONFIG_REAL", &llvm_config) @@ -543,7 +555,10 @@ impl Step for Lld { if target != builder.config.build { cfg.env("LLVM_CONFIG_SHIM_REPLACE", &builder.config.build) .env("LLVM_CONFIG_SHIM_REPLACE_WITH", &target) - .define("LLVM_TABLEGEN_EXE", llvm_config.with_file_name("llvm-tblgen")); + .define( + "LLVM_TABLEGEN_EXE", + llvm_config.with_file_name("llvm-tblgen").with_extension(EXE_EXTENSION), + ); } // Explicitly set C++ standard, because upstream doesn't do so @@ -595,8 +610,8 @@ impl Step for TestHelpers { } // We may have found various cross-compilers a little differently due to our - // extra configuration, so inform gcc of these compilers. Note, though, that - // on MSVC we still need gcc's detection of env vars (ugh). + // extra configuration, so inform cc of these compilers. Note, though, that + // on MSVC we still need cc's detection of env vars (ugh). if !target.contains("msvc") { if let Some(ar) = builder.ar(target) { cfg.archiver(ar); diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 312532558090e..1916d96bed71d 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1562,7 +1562,7 @@ impl Step for CrateLibrustc { let compiler = builder.compiler(builder.top_stage, run.host); for krate in builder.in_tree_crates("rustc-main") { - if run.path.ends_with(&krate.path) { + if krate.path.ends_with(&run.path) { let test_kind = builder.kind.into(); builder.ensure(CrateLibrustc { @@ -1669,7 +1669,7 @@ impl Step for Crate { }; for krate in builder.in_tree_crates("test") { - if run.path.ends_with(&krate.local_path(&builder)) { + if krate.path.ends_with(&run.path) { make(Mode::Std, krate); } } diff --git a/src/doc/book b/src/doc/book index 4e7c00bece154..84a31397b34f9 160000 --- a/src/doc/book +++ b/src/doc/book @@ -1 +1 @@ -Subproject commit 4e7c00bece1544d409312ec93467beb62b5bd0cb +Subproject commit 84a31397b34f9d405df44f2899ff17a4828dba18 diff --git a/src/doc/embedded-book b/src/doc/embedded-book index 616962ad0dd80..94d9ea8460bcb 160000 --- a/src/doc/embedded-book +++ b/src/doc/embedded-book @@ -1 +1 @@ -Subproject commit 616962ad0dd80f34d8b802da038d0aed9dd691bb +Subproject commit 94d9ea8460bcbbbfef1877b47cb930260b5849a7 diff --git a/src/doc/reference b/src/doc/reference index 04d5d5d7ba624..0ea7bc494f128 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit 04d5d5d7ba624b6f5016298451f3a63d557f3260 +Subproject commit 0ea7bc494f1289234d8800bb9185021e0ad946f0 diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index 6f94ccb48da6f..229c6945a26a5 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit 6f94ccb48da6fa4ed0031290f21411cf789f7d5e +Subproject commit 229c6945a26a53a751ffa4f9cb418388c00029d3 diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index 84e1ebe5e01f5..20c0f4a3713cc 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -321,7 +321,7 @@ library, as an equivalent command-line argument is provided to `rustc` when buil ### `--index-page`: provide a top-level landing page for docs This feature allows you to generate an index-page with a given markdown file. A good example of it -is the [rust documentation index](https://doc.rust-lang.org/index.html). +is the [rust documentation index](https://doc.rust-lang.org/nightly/index.html). With this, you'll have a page which you can custom as much as you want at the top of your crates. diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index d7dc2174d665f..3d51115fe01d3 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -136,8 +136,6 @@ pub use hack::to_vec; // `test_permutations` test mod hack { use crate::boxed::Box; - #[cfg(test)] - use crate::string::ToString; use crate::vec::Vec; // We shouldn't add inline attribute to this since this is used in @@ -156,9 +154,9 @@ mod hack { where T: Clone, { - let mut vector = Vec::with_capacity(s.len()); - vector.extend_from_slice(s); - vector + let mut vec = Vec::with_capacity(s.len()); + vec.extend_from_slice(s); + vec } } diff --git a/src/librustc_error_codes/error_codes/E0570.md b/src/librustc_error_codes/error_codes/E0570.md index bf9615f87387d..355e71ffb4329 100644 --- a/src/librustc_error_codes/error_codes/E0570.md +++ b/src/librustc_error_codes/error_codes/E0570.md @@ -1,6 +1,6 @@ The requested ABI is unsupported by the current target. -The rust compiler maintains for each target a blacklist of ABIs unsupported on +The rust compiler maintains for each target a list of unsupported ABIs on that target. If an ABI is present in such a list this usually means that the target / ABI combination is currently unsupported by llvm. diff --git a/src/librustc_errors/json/tests.rs b/src/librustc_errors/json/tests.rs index 35912901d688a..a2ed6ad6f3501 100644 --- a/src/librustc_errors/json/tests.rs +++ b/src/librustc_errors/json/tests.rs @@ -59,6 +59,7 @@ fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) { sm, true, HumanReadableErrorType::Short(ColorConfig::Never), + None, false, ); diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 45a86cf2cc6cc..b7610b08b87fc 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -63,7 +63,7 @@ use rustc_middle::ty::query::Providers; use rustc_middle::ty::TyCtxt; use rustc_session::lint::builtin::{ BARE_TRAIT_OBJECTS, ELIDED_LIFETIMES_IN_PATHS, EXPLICIT_OUTLIVES_REQUIREMENTS, - INTRA_DOC_LINK_RESOLUTION_FAILURE, INVALID_CODEBLOCK_ATTRIBUTE, MISSING_DOC_CODE_EXAMPLES, + INTRA_DOC_LINK_RESOLUTION_FAILURE, INVALID_CODEBLOCK_ATTRIBUTES, MISSING_DOC_CODE_EXAMPLES, PRIVATE_DOC_TESTS, }; use rustc_span::symbol::{Ident, Symbol}; @@ -305,7 +305,7 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) { add_lint_group!( "rustdoc", INTRA_DOC_LINK_RESOLUTION_FAILURE, - INVALID_CODEBLOCK_ATTRIBUTE, + INVALID_CODEBLOCK_ATTRIBUTES, MISSING_DOC_CODE_EXAMPLES, PRIVATE_DOC_TESTS ); diff --git a/src/librustc_mir_build/build/mod.rs b/src/librustc_mir_build/build/mod.rs index e69f6b30abd5c..d6dd3711dba19 100644 --- a/src/librustc_mir_build/build/mod.rs +++ b/src/librustc_mir_build/build/mod.rs @@ -10,6 +10,7 @@ use rustc_hir::lang_items; use rustc_hir::{GeneratorKind, HirIdMap, Node}; use rustc_index::vec::{Idx, IndexVec}; use rustc_infer::infer::TyCtxtInferExt; +use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc_middle::middle::region; use rustc_middle::mir::*; use rustc_middle::ty::subst::Subst; @@ -790,12 +791,22 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { argument_scope: region::Scope, ast_body: &'tcx hir::Expr<'tcx>, ) -> BlockAnd<()> { + let tcx = self.hir.tcx(); + let attrs = tcx.codegen_fn_attrs(fn_def_id); + let naked = attrs.flags.contains(CodegenFnAttrFlags::NAKED); + // Allocate locals for the function arguments for &ArgInfo(ty, _, arg_opt, _) in arguments.iter() { let source_info = SourceInfo::outermost(arg_opt.map_or(self.fn_span, |arg| arg.pat.span)); let arg_local = self.local_decls.push(LocalDecl::with_source_info(ty, source_info)); + // Emit function argument debuginfo only for non-naked functions. + // See: https://github.com/rust-lang/rust/issues/42779 + if naked { + continue; + } + // If this is a simple binding pattern, give debuginfo a nice name. if let Some(arg) = arg_opt { if let Some(ident) = arg.pat.simple_ident() { @@ -808,7 +819,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { } } - let tcx = self.hir.tcx(); let tcx_hir = tcx.hir(); let hir_tables = self.hir.tables(); diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index abb444933536f..876ce3ab2cb43 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -1790,7 +1790,7 @@ impl<'a> Parser<'a> { let require_comma = classify::expr_requires_semi_to_be_stmt(&expr) && self.token != token::CloseDelim(token::Brace); - let hi = self.token.span; + let hi = self.prev_token.span; if require_comma { let sm = self.sess.source_map(); diff --git a/src/librustc_passes/check_attr.rs b/src/librustc_passes/check_attr.rs index ef84f251390e6..fee63b1ee524e 100644 --- a/src/librustc_passes/check_attr.rs +++ b/src/librustc_passes/check_attr.rs @@ -292,6 +292,8 @@ impl CheckAttrVisitor<'tcx> { | sym::u32 | sym::i64 | sym::u64 + | sym::i128 + | sym::u128 | sym::isize | sym::usize => { int_reprs += 1; diff --git a/src/librustc_resolve/imports.rs b/src/librustc_resolve/imports.rs index ded0ee8a96699..4595a96ce24f5 100644 --- a/src/librustc_resolve/imports.rs +++ b/src/librustc_resolve/imports.rs @@ -262,8 +262,8 @@ impl<'a> Resolver<'a> { } let check_usable = |this: &mut Self, binding: &'a NameBinding<'a>| { - if let Some(blacklisted_binding) = this.blacklisted_binding { - if ptr::eq(binding, blacklisted_binding) { + if let Some(unusable_binding) = this.unusable_binding { + if ptr::eq(binding, unusable_binding) { return Err((Determined, Weak::No)); } } @@ -278,12 +278,12 @@ impl<'a> Resolver<'a> { return resolution .binding .and_then(|binding| { - // If the primary binding is blacklisted, search further and return the shadowed - // glob binding if it exists. What we really want here is having two separate - // scopes in a module - one for non-globs and one for globs, but until that's done - // use this hack to avoid inconsistent resolution ICEs during import validation. - if let Some(blacklisted_binding) = self.blacklisted_binding { - if ptr::eq(binding, blacklisted_binding) { + // If the primary binding is unusable, search further and return the shadowed glob + // binding if it exists. What we really want here is having two separate scopes in + // a module - one for non-globs and one for globs, but until that's done use this + // hack to avoid inconsistent resolution ICEs during import validation. + if let Some(unusable_binding) = self.unusable_binding { + if ptr::eq(binding, unusable_binding) { return resolution.shadowed_glob; } } @@ -875,9 +875,9 @@ impl<'a, 'b> ImportResolver<'a, 'b> { /// consolidate multiple unresolved import errors into a single diagnostic. fn finalize_import(&mut self, import: &'b Import<'b>) -> Option { let orig_vis = import.vis.replace(ty::Visibility::Invisible); - let orig_blacklisted_binding = match &import.kind { + let orig_unusable_binding = match &import.kind { ImportKind::Single { target_bindings, .. } => { - Some(mem::replace(&mut self.r.blacklisted_binding, target_bindings[TypeNS].get())) + Some(mem::replace(&mut self.r.unusable_binding, target_bindings[TypeNS].get())) } _ => None, }; @@ -891,8 +891,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> { import.crate_lint(), ); let no_ambiguity = self.r.ambiguity_errors.len() == prev_ambiguity_errors_len; - if let Some(orig_blacklisted_binding) = orig_blacklisted_binding { - self.r.blacklisted_binding = orig_blacklisted_binding; + if let Some(orig_unusable_binding) = orig_unusable_binding { + self.r.unusable_binding = orig_unusable_binding; } import.vis.set(orig_vis); if let PathResult::Failed { .. } | PathResult::NonModule(..) = path_res { @@ -1013,8 +1013,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> { self.r.per_ns(|this, ns| { if !type_ns_only || ns == TypeNS { let orig_vis = import.vis.replace(ty::Visibility::Invisible); - let orig_blacklisted_binding = - mem::replace(&mut this.blacklisted_binding, target_bindings[ns].get()); + let orig_unusable_binding = + mem::replace(&mut this.unusable_binding, target_bindings[ns].get()); let orig_last_import_segment = mem::replace(&mut this.last_import_segment, true); let binding = this.resolve_ident_in_module( module, @@ -1025,7 +1025,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> { import.span, ); this.last_import_segment = orig_last_import_segment; - this.blacklisted_binding = orig_blacklisted_binding; + this.unusable_binding = orig_unusable_binding; import.vis.set(orig_vis); match binding { @@ -1291,8 +1291,8 @@ impl<'a, 'b> ImportResolver<'a, 'b> { return; } - let orig_blacklisted_binding = - mem::replace(&mut this.blacklisted_binding, target_bindings[ns].get()); + let orig_unusable_binding = + mem::replace(&mut this.unusable_binding, target_bindings[ns].get()); match this.early_resolve_ident_in_lexical_scope( target, @@ -1311,7 +1311,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> { Err(_) => is_redundant[ns] = Some(false), } - this.blacklisted_binding = orig_blacklisted_binding; + this.unusable_binding = orig_unusable_binding; } }); diff --git a/src/librustc_resolve/late.rs b/src/librustc_resolve/late.rs index 4451791780ead..679f5637686ff 100644 --- a/src/librustc_resolve/late.rs +++ b/src/librustc_resolve/late.rs @@ -842,14 +842,14 @@ impl<'a, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { report_error(self, ns); } Some(LexicalScopeBinding::Item(binding)) => { - let orig_blacklisted_binding = - replace(&mut self.r.blacklisted_binding, Some(binding)); + let orig_unusable_binding = + replace(&mut self.r.unusable_binding, Some(binding)); if let Some(LexicalScopeBinding::Res(..)) = self .resolve_ident_in_lexical_scope(ident, ns, None, use_tree.prefix.span) { report_error(self, ns); } - self.r.blacklisted_binding = orig_blacklisted_binding; + self.r.unusable_binding = orig_unusable_binding; } None => {} } diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index f3a1934abc9fe..edc37bac5dc67 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -867,7 +867,7 @@ pub struct Resolver<'a> { last_import_segment: bool, /// This binding should be ignored during in-module resolution, so that we don't get /// "self-confirming" import resolutions during import validation. - blacklisted_binding: Option<&'a NameBinding<'a>>, + unusable_binding: Option<&'a NameBinding<'a>>, /// The idents for the primitive types. primitive_type_table: PrimitiveTypeTable, @@ -1266,7 +1266,7 @@ impl<'a> Resolver<'a> { indeterminate_imports: Vec::new(), last_import_segment: false, - blacklisted_binding: None, + unusable_binding: None, primitive_type_table: PrimitiveTypeTable::new(), diff --git a/src/librustc_session/lint/builtin.rs b/src/librustc_session/lint/builtin.rs index 5deee6eb48e6a..aa2a133952f8f 100644 --- a/src/librustc_session/lint/builtin.rs +++ b/src/librustc_session/lint/builtin.rs @@ -404,7 +404,7 @@ declare_lint! { } declare_lint! { - pub INVALID_CODEBLOCK_ATTRIBUTE, + pub INVALID_CODEBLOCK_ATTRIBUTES, Warn, "codeblock attribute looks a lot like a known one" } @@ -602,7 +602,7 @@ declare_lint_pass! { UNSTABLE_NAME_COLLISIONS, IRREFUTABLE_LET_PATTERNS, INTRA_DOC_LINK_RESOLUTION_FAILURE, - INVALID_CODEBLOCK_ATTRIBUTE, + INVALID_CODEBLOCK_ATTRIBUTES, MISSING_CRATE_LEVEL_DOCS, MISSING_DOC_CODE_EXAMPLES, PRIVATE_DOC_TESTS, diff --git a/src/librustc_target/spec/aarch64_apple_ios.rs b/src/librustc_target/spec/aarch64_apple_ios.rs index 1447716ca8484..21dcec8d5e384 100644 --- a/src/librustc_target/spec/aarch64_apple_ios.rs +++ b/src/librustc_target/spec/aarch64_apple_ios.rs @@ -18,7 +18,7 @@ pub fn target() -> TargetResult { features: "+neon,+fp-armv8,+apple-a7".to_string(), eliminate_frame_pointer: false, max_atomic_width: Some(128), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), forces_embed_bitcode: true, // Taken from a clang build on Xcode 11.4.1. // These arguments are not actually invoked - they just have diff --git a/src/librustc_target/spec/aarch64_apple_tvos.rs b/src/librustc_target/spec/aarch64_apple_tvos.rs index 21f660ac8b839..2b0cd6cabf80f 100644 --- a/src/librustc_target/spec/aarch64_apple_tvos.rs +++ b/src/librustc_target/spec/aarch64_apple_tvos.rs @@ -18,7 +18,7 @@ pub fn target() -> TargetResult { features: "+neon,+fp-armv8,+apple-a7".to_string(), eliminate_frame_pointer: false, max_atomic_width: Some(128), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), forces_embed_bitcode: true, ..base }, diff --git a/src/librustc_target/spec/aarch64_fuchsia.rs b/src/librustc_target/spec/aarch64_fuchsia.rs index c0d5d575b6eb5..aabfe458ca3b6 100644 --- a/src/librustc_target/spec/aarch64_fuchsia.rs +++ b/src/librustc_target/spec/aarch64_fuchsia.rs @@ -15,6 +15,6 @@ pub fn target() -> TargetResult { target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), - options: TargetOptions { abi_blacklist: super::arm_base::abi_blacklist(), ..base }, + options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) } diff --git a/src/librustc_target/spec/aarch64_linux_android.rs b/src/librustc_target/spec/aarch64_linux_android.rs index 03fd059d60278..e4ecc7ac2dc80 100644 --- a/src/librustc_target/spec/aarch64_linux_android.rs +++ b/src/librustc_target/spec/aarch64_linux_android.rs @@ -20,6 +20,6 @@ pub fn target() -> TargetResult { target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { abi_blacklist: super::arm_base::abi_blacklist(), ..base }, + options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) } diff --git a/src/librustc_target/spec/aarch64_unknown_cloudabi.rs b/src/librustc_target/spec/aarch64_unknown_cloudabi.rs index 7141954306769..1278b89c7fde2 100644 --- a/src/librustc_target/spec/aarch64_unknown_cloudabi.rs +++ b/src/librustc_target/spec/aarch64_unknown_cloudabi.rs @@ -3,7 +3,7 @@ use crate::spec::{LinkerFlavor, Target, TargetResult}; pub fn target() -> TargetResult { let mut base = super::cloudabi_base::opts(); base.max_atomic_width = Some(128); - base.abi_blacklist = super::arm_base::abi_blacklist(); + base.unsupported_abis = super::arm_base::unsupported_abis(); base.linker = Some("aarch64-unknown-cloudabi-cc".to_string()); Ok(Target { diff --git a/src/librustc_target/spec/aarch64_unknown_freebsd.rs b/src/librustc_target/spec/aarch64_unknown_freebsd.rs index 2177b7a0add32..5ae592c5139c8 100644 --- a/src/librustc_target/spec/aarch64_unknown_freebsd.rs +++ b/src/librustc_target/spec/aarch64_unknown_freebsd.rs @@ -15,6 +15,6 @@ pub fn target() -> TargetResult { target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { abi_blacklist: super::arm_base::abi_blacklist(), ..base }, + options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) } diff --git a/src/librustc_target/spec/aarch64_unknown_hermit.rs b/src/librustc_target/spec/aarch64_unknown_hermit.rs index 7b020605102b1..5f978c03248b2 100644 --- a/src/librustc_target/spec/aarch64_unknown_hermit.rs +++ b/src/librustc_target/spec/aarch64_unknown_hermit.rs @@ -3,7 +3,7 @@ use crate::spec::{LinkerFlavor, Target, TargetResult}; pub fn target() -> TargetResult { let mut base = super::hermit_base::opts(); base.max_atomic_width = Some(128); - base.abi_blacklist = super::arm_base::abi_blacklist(); + base.unsupported_abis = super::arm_base::unsupported_abis(); base.linker = Some("aarch64-hermit-gcc".to_string()); Ok(Target { diff --git a/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs b/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs index 81f5fc8501584..036162248c76e 100644 --- a/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs @@ -16,7 +16,7 @@ pub fn target() -> TargetResult { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}_mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/aarch64_unknown_linux_musl.rs b/src/librustc_target/spec/aarch64_unknown_linux_musl.rs index 608b9d29b329f..dc613f35d1d31 100644 --- a/src/librustc_target/spec/aarch64_unknown_linux_musl.rs +++ b/src/librustc_target/spec/aarch64_unknown_linux_musl.rs @@ -16,7 +16,7 @@ pub fn target() -> TargetResult { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}_mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/aarch64_unknown_netbsd.rs b/src/librustc_target/spec/aarch64_unknown_netbsd.rs index b06a2a906697c..8c2f6fcff7304 100644 --- a/src/librustc_target/spec/aarch64_unknown_netbsd.rs +++ b/src/librustc_target/spec/aarch64_unknown_netbsd.rs @@ -3,7 +3,7 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; pub fn target() -> TargetResult { let mut base = super::netbsd_base::opts(); base.max_atomic_width = Some(128); - base.abi_blacklist = super::arm_base::abi_blacklist(); + base.unsupported_abis = super::arm_base::unsupported_abis(); Ok(Target { llvm_target: "aarch64-unknown-netbsd".to_string(), diff --git a/src/librustc_target/spec/aarch64_unknown_none.rs b/src/librustc_target/spec/aarch64_unknown_none.rs index 7177c4e251e77..e012dce73fecb 100644 --- a/src/librustc_target/spec/aarch64_unknown_none.rs +++ b/src/librustc_target/spec/aarch64_unknown_none.rs @@ -18,7 +18,7 @@ pub fn target() -> Result { linker_is_gnu: true, max_atomic_width: Some(128), panic_strategy: PanicStrategy::Abort, - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..Default::default() }; Ok(Target { diff --git a/src/librustc_target/spec/aarch64_unknown_none_softfloat.rs b/src/librustc_target/spec/aarch64_unknown_none_softfloat.rs index 986300c677dfc..e2aa6e3b8f52c 100644 --- a/src/librustc_target/spec/aarch64_unknown_none_softfloat.rs +++ b/src/librustc_target/spec/aarch64_unknown_none_softfloat.rs @@ -18,7 +18,7 @@ pub fn target() -> Result { linker_is_gnu: true, max_atomic_width: Some(128), panic_strategy: PanicStrategy::Abort, - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..Default::default() }; Ok(Target { diff --git a/src/librustc_target/spec/aarch64_unknown_openbsd.rs b/src/librustc_target/spec/aarch64_unknown_openbsd.rs index c9cd64c3a84af..fd726c70f496b 100644 --- a/src/librustc_target/spec/aarch64_unknown_openbsd.rs +++ b/src/librustc_target/spec/aarch64_unknown_openbsd.rs @@ -3,7 +3,7 @@ use crate::spec::{LinkerFlavor, Target, TargetResult}; pub fn target() -> TargetResult { let mut base = super::openbsd_base::opts(); base.max_atomic_width = Some(128); - base.abi_blacklist = super::arm_base::abi_blacklist(); + base.unsupported_abis = super::arm_base::unsupported_abis(); Ok(Target { llvm_target: "aarch64-unknown-openbsd".to_string(), diff --git a/src/librustc_target/spec/aarch64_wrs_vxworks.rs b/src/librustc_target/spec/aarch64_wrs_vxworks.rs index 47b003b71144c..05f5d7d3a8b47 100644 --- a/src/librustc_target/spec/aarch64_wrs_vxworks.rs +++ b/src/librustc_target/spec/aarch64_wrs_vxworks.rs @@ -15,6 +15,6 @@ pub fn target() -> TargetResult { target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { abi_blacklist: super::arm_base::abi_blacklist(), ..base }, + options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) } diff --git a/src/librustc_target/spec/arm_base.rs b/src/librustc_target/spec/arm_base.rs index 77e7bfac62d58..b74d80dc6bb2b 100644 --- a/src/librustc_target/spec/arm_base.rs +++ b/src/librustc_target/spec/arm_base.rs @@ -1,6 +1,6 @@ use crate::spec::abi::Abi; // All the calling conventions trigger an assertion(Unsupported calling convention) in llvm on arm -pub fn abi_blacklist() -> Vec { +pub fn unsupported_abis() -> Vec { vec![Abi::Stdcall, Abi::Fastcall, Abi::Vectorcall, Abi::Thiscall, Abi::Win64, Abi::SysV64] } diff --git a/src/librustc_target/spec/arm_linux_androideabi.rs b/src/librustc_target/spec/arm_linux_androideabi.rs index 5dc6eaca9194e..7109d043f519c 100644 --- a/src/librustc_target/spec/arm_linux_androideabi.rs +++ b/src/librustc_target/spec/arm_linux_androideabi.rs @@ -17,6 +17,6 @@ pub fn target() -> TargetResult { target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { abi_blacklist: super::arm_base::abi_blacklist(), ..base }, + options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) } diff --git a/src/librustc_target/spec/arm_unknown_linux_gnueabi.rs b/src/librustc_target/spec/arm_unknown_linux_gnueabi.rs index ead483df155a9..2e3bad83e2559 100644 --- a/src/librustc_target/spec/arm_unknown_linux_gnueabi.rs +++ b/src/librustc_target/spec/arm_unknown_linux_gnueabi.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+strict-align,+v6".to_string(), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/arm_unknown_linux_gnueabihf.rs b/src/librustc_target/spec/arm_unknown_linux_gnueabihf.rs index 53d2e9a46d080..f8e357cce6636 100644 --- a/src/librustc_target/spec/arm_unknown_linux_gnueabihf.rs +++ b/src/librustc_target/spec/arm_unknown_linux_gnueabihf.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+strict-align,+v6,+vfp2,-d32".to_string(), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/arm_unknown_linux_musleabi.rs b/src/librustc_target/spec/arm_unknown_linux_musleabi.rs index 03d191990c397..75753af9f3078 100644 --- a/src/librustc_target/spec/arm_unknown_linux_musleabi.rs +++ b/src/librustc_target/spec/arm_unknown_linux_musleabi.rs @@ -22,7 +22,7 @@ pub fn target() -> TargetResult { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/arm_unknown_linux_musleabihf.rs b/src/librustc_target/spec/arm_unknown_linux_musleabihf.rs index bd92f0f434711..c74c88e36125f 100644 --- a/src/librustc_target/spec/arm_unknown_linux_musleabihf.rs +++ b/src/librustc_target/spec/arm_unknown_linux_musleabihf.rs @@ -22,7 +22,7 @@ pub fn target() -> TargetResult { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/armebv7r_none_eabi.rs b/src/librustc_target/spec/armebv7r_none_eabi.rs index a1f68f6706a2a..e0d1f2653ce0b 100644 --- a/src/librustc_target/spec/armebv7r_none_eabi.rs +++ b/src/librustc_target/spec/armebv7r_none_eabi.rs @@ -22,7 +22,7 @@ pub fn target() -> TargetResult { relocation_model: RelocModel::Static, panic_strategy: PanicStrategy::Abort, max_atomic_width: Some(32), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), emit_debug_gdb_scripts: false, ..Default::default() }, diff --git a/src/librustc_target/spec/armebv7r_none_eabihf.rs b/src/librustc_target/spec/armebv7r_none_eabihf.rs index 4d81c21f52a7b..e2d37d45bf147 100644 --- a/src/librustc_target/spec/armebv7r_none_eabihf.rs +++ b/src/librustc_target/spec/armebv7r_none_eabihf.rs @@ -23,7 +23,7 @@ pub fn target() -> TargetResult { panic_strategy: PanicStrategy::Abort, features: "+vfp3,-d32,-fp16".to_string(), max_atomic_width: Some(32), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), emit_debug_gdb_scripts: false, ..Default::default() }, diff --git a/src/librustc_target/spec/armv4t_unknown_linux_gnueabi.rs b/src/librustc_target/spec/armv4t_unknown_linux_gnueabi.rs index 60f822a02947d..2580e8b0f8515 100644 --- a/src/librustc_target/spec/armv4t_unknown_linux_gnueabi.rs +++ b/src/librustc_target/spec/armv4t_unknown_linux_gnueabi.rs @@ -18,7 +18,7 @@ pub fn target() -> TargetResult { features: "+soft-float,+strict-align".to_string(), // Atomic operations provided by compiler-builtins max_atomic_width: Some(32), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv5te_unknown_linux_gnueabi.rs b/src/librustc_target/spec/armv5te_unknown_linux_gnueabi.rs index 9fa0f609c7481..f28421dc77593 100644 --- a/src/librustc_target/spec/armv5te_unknown_linux_gnueabi.rs +++ b/src/librustc_target/spec/armv5te_unknown_linux_gnueabi.rs @@ -18,7 +18,7 @@ pub fn target() -> TargetResult { features: "+soft-float,+strict-align".to_string(), // Atomic operations provided by compiler-builtins max_atomic_width: Some(32), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv5te_unknown_linux_musleabi.rs b/src/librustc_target/spec/armv5te_unknown_linux_musleabi.rs index bb19eb455cd3b..fe1fa88883d3e 100644 --- a/src/librustc_target/spec/armv5te_unknown_linux_musleabi.rs +++ b/src/librustc_target/spec/armv5te_unknown_linux_musleabi.rs @@ -21,7 +21,7 @@ pub fn target() -> TargetResult { features: "+soft-float,+strict-align".to_string(), // Atomic operations provided by compiler-builtins max_atomic_width: Some(32), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv6_unknown_freebsd.rs b/src/librustc_target/spec/armv6_unknown_freebsd.rs index bbab1c60b1358..1e06f837997a1 100644 --- a/src/librustc_target/spec/armv6_unknown_freebsd.rs +++ b/src/librustc_target/spec/armv6_unknown_freebsd.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+v6,+vfp2,-d32".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv6_unknown_netbsd_eabihf.rs b/src/librustc_target/spec/armv6_unknown_netbsd_eabihf.rs index 4332d1498e7fa..ef40085888c81 100644 --- a/src/librustc_target/spec/armv6_unknown_netbsd_eabihf.rs +++ b/src/librustc_target/spec/armv6_unknown_netbsd_eabihf.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+v6,+vfp2,-d32".to_string(), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "__mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv7_apple_ios.rs b/src/librustc_target/spec/armv7_apple_ios.rs index c0c2ae909f8f0..393843526a8cc 100644 --- a/src/librustc_target/spec/armv7_apple_ios.rs +++ b/src/librustc_target/spec/armv7_apple_ios.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+v7,+vfp3,+neon".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) diff --git a/src/librustc_target/spec/armv7_linux_androideabi.rs b/src/librustc_target/spec/armv7_linux_androideabi.rs index 38d854163ecb6..38c6c31bd10da 100644 --- a/src/librustc_target/spec/armv7_linux_androideabi.rs +++ b/src/librustc_target/spec/armv7_linux_androideabi.rs @@ -25,6 +25,6 @@ pub fn target() -> TargetResult { target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { abi_blacklist: super::arm_base::abi_blacklist(), ..base }, + options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) } diff --git a/src/librustc_target/spec/armv7_unknown_cloudabi_eabihf.rs b/src/librustc_target/spec/armv7_unknown_cloudabi_eabihf.rs index 7d34f5c63bfa1..e3f4fe0b2efb6 100644 --- a/src/librustc_target/spec/armv7_unknown_cloudabi_eabihf.rs +++ b/src/librustc_target/spec/armv7_unknown_cloudabi_eabihf.rs @@ -5,7 +5,7 @@ pub fn target() -> TargetResult { base.cpu = "cortex-a8".to_string(); base.max_atomic_width = Some(64); base.features = "+v7,+vfp3,+neon".to_string(); - base.abi_blacklist = super::arm_base::abi_blacklist(); + base.unsupported_abis = super::arm_base::unsupported_abis(); base.linker = Some("armv7-unknown-cloudabi-eabihf-cc".to_string()); Ok(Target { diff --git a/src/librustc_target/spec/armv7_unknown_freebsd.rs b/src/librustc_target/spec/armv7_unknown_freebsd.rs index e747ddca58a85..80a9e6d7e3c80 100644 --- a/src/librustc_target/spec/armv7_unknown_freebsd.rs +++ b/src/librustc_target/spec/armv7_unknown_freebsd.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv7_unknown_linux_gnueabi.rs b/src/librustc_target/spec/armv7_unknown_linux_gnueabi.rs index c887bdf2a102b..0f175e9aef5e8 100644 --- a/src/librustc_target/spec/armv7_unknown_linux_gnueabi.rs +++ b/src/librustc_target/spec/armv7_unknown_linux_gnueabi.rs @@ -21,7 +21,7 @@ pub fn target() -> TargetResult { features: "+v7,+thumb2,+soft-float,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs b/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs index 4ebc3416156b6..27923457cd16e 100644 --- a/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs +++ b/src/librustc_target/spec/armv7_unknown_linux_gnueabihf.rs @@ -22,7 +22,7 @@ pub fn target() -> TargetResult { features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}__gnu_mcount_nc".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv7_unknown_linux_musleabi.rs b/src/librustc_target/spec/armv7_unknown_linux_musleabi.rs index bee3e2604adf2..3d1bf05237fd9 100644 --- a/src/librustc_target/spec/armv7_unknown_linux_musleabi.rs +++ b/src/librustc_target/spec/armv7_unknown_linux_musleabi.rs @@ -26,7 +26,7 @@ pub fn target() -> TargetResult { features: "+v7,+thumb2,+soft-float,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs b/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs index c3cfeca7f27b7..03d7d88b0d6d0 100644 --- a/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs +++ b/src/librustc_target/spec/armv7_unknown_linux_musleabihf.rs @@ -25,7 +25,7 @@ pub fn target() -> TargetResult { features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv7_unknown_netbsd_eabihf.rs b/src/librustc_target/spec/armv7_unknown_netbsd_eabihf.rs index 9d382fe04be2d..18fc9ed2ec638 100644 --- a/src/librustc_target/spec/armv7_unknown_netbsd_eabihf.rs +++ b/src/librustc_target/spec/armv7_unknown_netbsd_eabihf.rs @@ -18,7 +18,7 @@ pub fn target() -> TargetResult { features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "__mcount".to_string(), ..base }, diff --git a/src/librustc_target/spec/armv7_wrs_vxworks_eabihf.rs b/src/librustc_target/spec/armv7_wrs_vxworks_eabihf.rs index 34eb04ea83e11..04d8702471af5 100644 --- a/src/librustc_target/spec/armv7_wrs_vxworks_eabihf.rs +++ b/src/librustc_target/spec/armv7_wrs_vxworks_eabihf.rs @@ -18,7 +18,7 @@ pub fn target() -> TargetResult { features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) diff --git a/src/librustc_target/spec/armv7a_none_eabi.rs b/src/librustc_target/spec/armv7a_none_eabi.rs index 09f1494e81cdb..1db279defff39 100644 --- a/src/librustc_target/spec/armv7a_none_eabi.rs +++ b/src/librustc_target/spec/armv7a_none_eabi.rs @@ -28,7 +28,7 @@ pub fn target() -> Result { disable_redzone: true, max_atomic_width: Some(64), panic_strategy: PanicStrategy::Abort, - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), emit_debug_gdb_scripts: false, ..Default::default() }; diff --git a/src/librustc_target/spec/armv7a_none_eabihf.rs b/src/librustc_target/spec/armv7a_none_eabihf.rs index 653ca76435bc5..22c2b306b43bb 100644 --- a/src/librustc_target/spec/armv7a_none_eabihf.rs +++ b/src/librustc_target/spec/armv7a_none_eabihf.rs @@ -16,7 +16,7 @@ pub fn target() -> Result { disable_redzone: true, max_atomic_width: Some(64), panic_strategy: PanicStrategy::Abort, - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), emit_debug_gdb_scripts: false, ..Default::default() }; diff --git a/src/librustc_target/spec/armv7r_none_eabi.rs b/src/librustc_target/spec/armv7r_none_eabi.rs index 29dfa17039736..fed83997190a7 100644 --- a/src/librustc_target/spec/armv7r_none_eabi.rs +++ b/src/librustc_target/spec/armv7r_none_eabi.rs @@ -22,7 +22,7 @@ pub fn target() -> TargetResult { relocation_model: RelocModel::Static, panic_strategy: PanicStrategy::Abort, max_atomic_width: Some(32), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), emit_debug_gdb_scripts: false, ..Default::default() }, diff --git a/src/librustc_target/spec/armv7r_none_eabihf.rs b/src/librustc_target/spec/armv7r_none_eabihf.rs index e6b0187c3313a..769ac13e51506 100644 --- a/src/librustc_target/spec/armv7r_none_eabihf.rs +++ b/src/librustc_target/spec/armv7r_none_eabihf.rs @@ -23,7 +23,7 @@ pub fn target() -> TargetResult { panic_strategy: PanicStrategy::Abort, features: "+vfp3,-d32,-fp16".to_string(), max_atomic_width: Some(32), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), emit_debug_gdb_scripts: false, ..Default::default() }, diff --git a/src/librustc_target/spec/armv7s_apple_ios.rs b/src/librustc_target/spec/armv7s_apple_ios.rs index 6a5654f10d416..998a7b2e16489 100644 --- a/src/librustc_target/spec/armv7s_apple_ios.rs +++ b/src/librustc_target/spec/armv7s_apple_ios.rs @@ -17,7 +17,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+v7,+vfp4,+neon".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs index 29250f21383be..4a2dd8913185f 100644 --- a/src/librustc_target/spec/mod.rs +++ b/src/librustc_target/spec/mod.rs @@ -902,9 +902,10 @@ pub struct TargetOptions { /// Panic strategy: "unwind" or "abort" pub panic_strategy: PanicStrategy, - /// A blacklist of ABIs unsupported by the current target. Note that generic - /// ABIs are considered to be supported on all platforms and cannot be blacklisted. - pub abi_blacklist: Vec, + /// A list of ABIs unsupported by the current target. Note that generic ABIs + /// are considered to be supported on all platforms and cannot be marked + /// unsupported. + pub unsupported_abis: Vec, /// Whether or not linking dylibs to a static CRT is allowed. pub crt_static_allows_dylibs: bool, @@ -1056,7 +1057,7 @@ impl Default for TargetOptions { max_atomic_width: None, atomic_cas: true, panic_strategy: PanicStrategy::Unwind, - abi_blacklist: vec![], + unsupported_abis: vec![], crt_static_allows_dylibs: false, crt_static_default: false, crt_static_respected: false, @@ -1125,7 +1126,7 @@ impl Target { } pub fn is_abi_supported(&self, abi: Abi) -> bool { - abi.generic() || !self.options.abi_blacklist.contains(&abi) + abi.generic() || !self.options.unsupported_abis.contains(&abi) } /// Loads a target descriptor from a JSON object. @@ -1474,22 +1475,29 @@ impl Target { key!(llvm_args, list); key!(use_ctors_section, bool); - if let Some(array) = obj.find("abi-blacklist").and_then(Json::as_array) { - for name in array.iter().filter_map(|abi| abi.as_string()) { - match lookup_abi(name) { - Some(abi) => { - if abi.generic() { + // NB: The old name is deprecated, but support for it is retained for + // compatibility. + for name in ["abi-blacklist", "unsupported-abis"].iter() { + if let Some(array) = obj.find(name).and_then(Json::as_array) { + for name in array.iter().filter_map(|abi| abi.as_string()) { + match lookup_abi(name) { + Some(abi) => { + if abi.generic() { + return Err(format!( + "The ABI \"{}\" is considered to be supported on all \ + targets and cannot be marked unsupported", + abi + )); + } + + base.options.unsupported_abis.push(abi) + } + None => { return Err(format!( - "The ABI \"{}\" is considered to be supported on \ - all targets and cannot be blacklisted", - abi + "Unknown ABI \"{}\" in target specification", + name )); } - - base.options.abi_blacklist.push(abi) - } - None => { - return Err(format!("Unknown ABI \"{}\" in target specification", name)); } } } @@ -1705,11 +1713,11 @@ impl ToJson for Target { target_option_val!(llvm_args); target_option_val!(use_ctors_section); - if default.abi_blacklist != self.options.abi_blacklist { + if default.unsupported_abis != self.options.unsupported_abis { d.insert( - "abi-blacklist".to_string(), + "unsupported-abis".to_string(), self.options - .abi_blacklist + .unsupported_abis .iter() .map(|&name| Abi::name(name).to_json()) .collect::>() diff --git a/src/librustc_target/spec/nvptx64_nvidia_cuda.rs b/src/librustc_target/spec/nvptx64_nvidia_cuda.rs index e0a402533e777..0c8f2a34301ee 100644 --- a/src/librustc_target/spec/nvptx64_nvidia_cuda.rs +++ b/src/librustc_target/spec/nvptx64_nvidia_cuda.rs @@ -55,7 +55,7 @@ pub fn target() -> TargetResult { // FIXME: enable compilation tests for the target and // create the tests for this. - abi_blacklist: vec![ + unsupported_abis: vec![ Abi::Cdecl, Abi::Stdcall, Abi::Fastcall, diff --git a/src/librustc_target/spec/riscv32i_unknown_none_elf.rs b/src/librustc_target/spec/riscv32i_unknown_none_elf.rs index d7b3e7e15307a..977aa896f2520 100644 --- a/src/librustc_target/spec/riscv32i_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv32i_unknown_none_elf.rs @@ -24,7 +24,7 @@ pub fn target() -> TargetResult { panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, - abi_blacklist: super::riscv_base::abi_blacklist(), + unsupported_abis: super::riscv_base::unsupported_abis(), ..Default::default() }, }) diff --git a/src/librustc_target/spec/riscv32imac_unknown_none_elf.rs b/src/librustc_target/spec/riscv32imac_unknown_none_elf.rs index b93b6fcf8002a..1a85cdff1315c 100644 --- a/src/librustc_target/spec/riscv32imac_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv32imac_unknown_none_elf.rs @@ -24,7 +24,7 @@ pub fn target() -> TargetResult { panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, - abi_blacklist: super::riscv_base::abi_blacklist(), + unsupported_abis: super::riscv_base::unsupported_abis(), ..Default::default() }, }) diff --git a/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs b/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs index a16e7e31c6619..e3c1c6908a23a 100644 --- a/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv32imc_unknown_none_elf.rs @@ -24,7 +24,7 @@ pub fn target() -> TargetResult { panic_strategy: PanicStrategy::Abort, relocation_model: RelocModel::Static, emit_debug_gdb_scripts: false, - abi_blacklist: super::riscv_base::abi_blacklist(), + unsupported_abis: super::riscv_base::unsupported_abis(), ..Default::default() }, }) diff --git a/src/librustc_target/spec/riscv64gc_unknown_linux_gnu.rs b/src/librustc_target/spec/riscv64gc_unknown_linux_gnu.rs index 715449d74ce22..f7a93c916d1d5 100644 --- a/src/librustc_target/spec/riscv64gc_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/riscv64gc_unknown_linux_gnu.rs @@ -13,7 +13,7 @@ pub fn target() -> TargetResult { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { - abi_blacklist: super::riscv_base::abi_blacklist(), + unsupported_abis: super::riscv_base::unsupported_abis(), code_model: Some(CodeModel::Medium), cpu: "generic-rv64".to_string(), features: "+m,+a,+f,+d,+c".to_string(), diff --git a/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs b/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs index e5147a12ed320..857af4ceb0d9f 100644 --- a/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv64gc_unknown_none_elf.rs @@ -25,7 +25,7 @@ pub fn target() -> TargetResult { relocation_model: RelocModel::Static, code_model: Some(CodeModel::Medium), emit_debug_gdb_scripts: false, - abi_blacklist: super::riscv_base::abi_blacklist(), + unsupported_abis: super::riscv_base::unsupported_abis(), ..Default::default() }, }) diff --git a/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs b/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs index dc056b55b3868..36fe7730f95bf 100644 --- a/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs +++ b/src/librustc_target/spec/riscv64imac_unknown_none_elf.rs @@ -25,7 +25,7 @@ pub fn target() -> TargetResult { relocation_model: RelocModel::Static, code_model: Some(CodeModel::Medium), emit_debug_gdb_scripts: false, - abi_blacklist: super::riscv_base::abi_blacklist(), + unsupported_abis: super::riscv_base::unsupported_abis(), ..Default::default() }, }) diff --git a/src/librustc_target/spec/riscv_base.rs b/src/librustc_target/spec/riscv_base.rs index ec1dc9b4918bd..64cf890037e51 100644 --- a/src/librustc_target/spec/riscv_base.rs +++ b/src/librustc_target/spec/riscv_base.rs @@ -2,7 +2,7 @@ use crate::spec::abi::Abi; // All the calling conventions trigger an assertion(Unsupported calling // convention) in llvm on RISCV -pub fn abi_blacklist() -> Vec { +pub fn unsupported_abis() -> Vec { vec![ Abi::Cdecl, Abi::Stdcall, diff --git a/src/librustc_target/spec/thumb_base.rs b/src/librustc_target/spec/thumb_base.rs index 646a149a33621..2f7d15d5856f6 100644 --- a/src/librustc_target/spec/thumb_base.rs +++ b/src/librustc_target/spec/thumb_base.rs @@ -41,7 +41,7 @@ pub fn opts() -> TargetOptions { // Similarly, one almost always never wants to use relocatable code because of the extra // costs it involves. relocation_model: RelocModel::Static, - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), // When this section is added a volatile load to its start address is also generated. This // volatile load is a footgun as it can end up loading an invalid memory address, depending // on how the user set up their linker scripts. This section adds pretty printer for stuff diff --git a/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs b/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs index 21d62d252e09a..37828026fe113 100644 --- a/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs +++ b/src/librustc_target/spec/thumbv7a_pc_windows_msvc.rs @@ -37,7 +37,7 @@ pub fn target() -> TargetResult { features: "+vfp3,+neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) diff --git a/src/librustc_target/spec/thumbv7a_uwp_windows_msvc.rs b/src/librustc_target/spec/thumbv7a_uwp_windows_msvc.rs index ff2e892100607..29a4a9875e5b0 100644 --- a/src/librustc_target/spec/thumbv7a_uwp_windows_msvc.rs +++ b/src/librustc_target/spec/thumbv7a_uwp_windows_msvc.rs @@ -23,7 +23,7 @@ pub fn target() -> TargetResult { options: TargetOptions { features: "+vfp3,+neon".to_string(), cpu: "generic".to_string(), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) diff --git a/src/librustc_target/spec/thumbv7neon_linux_androideabi.rs b/src/librustc_target/spec/thumbv7neon_linux_androideabi.rs index 02ad9ab7d9a8c..c52f077f6f16c 100644 --- a/src/librustc_target/spec/thumbv7neon_linux_androideabi.rs +++ b/src/librustc_target/spec/thumbv7neon_linux_androideabi.rs @@ -25,6 +25,6 @@ pub fn target() -> TargetResult { target_env: "".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { abi_blacklist: super::arm_base::abi_blacklist(), ..base }, + options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) } diff --git a/src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs index 04e051485a933..78936948e642e 100644 --- a/src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/src/librustc_target/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -25,7 +25,7 @@ pub fn target() -> TargetResult { features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), ..base }, }) diff --git a/src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs b/src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs index 3d39a405a411c..f759c3eeb011c 100644 --- a/src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs @@ -29,7 +29,7 @@ pub fn target() -> TargetResult { features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), - abi_blacklist: super::arm_base::abi_blacklist(), + unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 38f202e84accb..db98ec5d0a72e 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -214,7 +214,7 @@ pub fn new_handler( /// This function is used to setup the lint initialization. By default, in rustdoc, everything /// is "allowed". Depending if we run in test mode or not, we want some of them to be at their -/// default level. For example, the "INVALID_CODEBLOCK_ATTRIBUTE" lint is activated in both +/// default level. For example, the "INVALID_CODEBLOCK_ATTRIBUTES" lint is activated in both /// modes. /// /// A little detail easy to forget is that there is a way to set the lint level for all lints @@ -315,7 +315,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt let missing_doc_example = rustc_lint::builtin::MISSING_DOC_CODE_EXAMPLES.name; let private_doc_tests = rustc_lint::builtin::PRIVATE_DOC_TESTS.name; let no_crate_level_docs = rustc_lint::builtin::MISSING_CRATE_LEVEL_DOCS.name; - let invalid_codeblock_attribute_name = rustc_lint::builtin::INVALID_CODEBLOCK_ATTRIBUTE.name; + let invalid_codeblock_attribute_name = rustc_lint::builtin::INVALID_CODEBLOCK_ATTRIBUTES.name; // In addition to those specific lints, we also need to whitelist those given through // command line, otherwise they'll get ignored and we don't want that. diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 7a6626766d388..a0f8eb04e2efb 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -665,7 +665,7 @@ impl<'a, 'b> ExtraInfo<'a, 'b> { (None, None) => return, }; self.tcx.struct_span_lint_hir( - lint::builtin::INVALID_CODEBLOCK_ATTRIBUTE, + lint::builtin::INVALID_CODEBLOCK_ATTRIBUTES, hir_id, self.sp, |lint| { diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index e9504aa3af123..a89cb130c6b05 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -46,7 +46,7 @@ pub struct TestOptions { pub fn run(options: Options) -> Result<(), String> { let input = config::Input::File(options.input.clone()); - let invalid_codeblock_attribute_name = rustc_lint::builtin::INVALID_CODEBLOCK_ATTRIBUTE.name; + let invalid_codeblock_attribute_name = rustc_lint::builtin::INVALID_CODEBLOCK_ATTRIBUTES.name; // In addition to those specific lints, we also need to whitelist those given through // command line, otherwise they'll get ignored and we don't want that. diff --git a/src/llvm-project b/src/llvm-project index 6c040dd86ed62..d134a53927fa0 160000 --- a/src/llvm-project +++ b/src/llvm-project @@ -1 +1 @@ -Subproject commit 6c040dd86ed62d38e585279027486e6efc42fb36 +Subproject commit d134a53927fa033ae7e0f3e8ee872ff2dc71468d diff --git a/src/test/codegen/naked-functions.rs b/src/test/codegen/naked-functions.rs index 493c1b9f0ba6b..758c6c4da9293 100644 --- a/src/test/codegen/naked-functions.rs +++ b/src/test/codegen/naked-functions.rs @@ -18,7 +18,7 @@ pub fn naked_empty() { // CHECK-NEXT: define void @naked_with_args(i{{[0-9]+( %0)?}}) pub fn naked_with_args(a: isize) { // CHECK-NEXT: {{.+}}: - // CHECK-NEXT: %a = alloca i{{[0-9]+}} + // CHECK-NEXT: %_1 = alloca i{{[0-9]+}} &a; // keep variable in an alloca // CHECK: ret void } @@ -39,7 +39,7 @@ pub fn naked_with_return() -> isize { #[naked] pub fn naked_with_args_and_return(a: isize) -> isize { // CHECK-NEXT: {{.+}}: - // CHECK-NEXT: %a = alloca i{{[0-9]+}} + // CHECK-NEXT: %_1 = alloca i{{[0-9]+}} &a; // keep variable in an alloca // CHECK: ret i{{[0-9]+}} %{{[0-9]+}} a diff --git a/src/test/debuginfo/function-arguments.rs b/src/test/debuginfo/function-arguments.rs index 5cfd7d1f8f198..fb0bbbf371d8e 100644 --- a/src/test/debuginfo/function-arguments.rs +++ b/src/test/debuginfo/function-arguments.rs @@ -18,6 +18,10 @@ // gdb-check:$4 = 3000 // gdb-command:continue +// gdb-command:info args +// gdb-check:No arguments. +// gdb-command:continue + // === LLDB TESTS ================================================================================== // lldb-command:run @@ -38,7 +42,12 @@ // lldbr-check:(i64) b = 3000 // lldb-command:continue +// lldb-command:frame variable +// lldbg-check:(unsigned long) = 111 (unsigned long) = 222 +// lldbr-check:(unsigned long) = 111 (unsigned long) = 222 +// lldb-command:continue +#![feature(naked_functions)] #![feature(omit_gdb_pretty_printer_section)] #![omit_gdb_pretty_printer_section] @@ -46,6 +55,7 @@ fn main() { fun(111102, true); nested(2000, 3000); + naked(111, 222); fn nested(a: i32, b: i64) -> (i32, i64) { zzz(); // #break @@ -59,4 +69,11 @@ fn fun(x: isize, y: bool) -> (isize, bool) { (x, y) } +#[naked] +fn naked(x: usize, y: usize) -> usize { + zzz(); // #break + + x + y +} + fn zzz() { () } diff --git a/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir b/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir index b84ca5df9964e..00942cd12b42c 100644 --- a/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/exponential-or/rustc.match_tuple.SimplifyCfg-initial.after.mir @@ -102,8 +102,8 @@ fn match_tuple(_1: (u32, bool, std::option::Option, u32)) -> u32 { _0 = BitXor(move _9, move _10); // scope 1 at $DIR/exponential-or.rs:8:83: 8:88 StorageDead(_10); // scope 1 at $DIR/exponential-or.rs:8:87: 8:88 StorageDead(_9); // scope 1 at $DIR/exponential-or.rs:8:87: 8:88 - StorageDead(_8); // scope 0 at $DIR/exponential-or.rs:8:88: 8:89 - StorageDead(_7); // scope 0 at $DIR/exponential-or.rs:8:88: 8:89 + StorageDead(_8); // scope 0 at $DIR/exponential-or.rs:8:87: 8:88 + StorageDead(_7); // scope 0 at $DIR/exponential-or.rs:8:87: 8:88 goto -> bb10; // scope 0 at $DIR/exponential-or.rs:7:5: 10:6 } diff --git a/src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff index e5b4a0328808f..1020fc965fe86 100644 --- a/src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/issue-73223/32bit/rustc.main.SimplifyArmIdentity.diff @@ -137,7 +137,7 @@ StorageLive(_4); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15 _4 = ((_2 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15 _1 = _4; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21 - StorageDead(_4); // scope 0 at $DIR/issue-73223.rs:3:21: 3:22 + StorageDead(_4); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21 StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7 StorageLive(_6); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14 StorageLive(_7); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27 diff --git a/src/test/mir-opt/issue-73223/64bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/issue-73223/64bit/rustc.main.SimplifyArmIdentity.diff index 0c2651dc3c68d..aa606ed22b6d0 100644 --- a/src/test/mir-opt/issue-73223/64bit/rustc.main.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/issue-73223/64bit/rustc.main.SimplifyArmIdentity.diff @@ -137,7 +137,7 @@ StorageLive(_4); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15 _4 = ((_2 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15 _1 = _4; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21 - StorageDead(_4); // scope 0 at $DIR/issue-73223.rs:3:21: 3:22 + StorageDead(_4); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21 StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7 StorageLive(_6); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14 StorageLive(_7); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27 diff --git a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir index c6832f21208d4..df6a247bb5ff6 100644 --- a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir +++ b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.ElaborateDrops.after.mir @@ -61,7 +61,7 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:77: 16:78 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - drop(_7) -> [return: bb19, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + drop(_7) -> [return: bb19, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 } bb6: { @@ -90,9 +90,9 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb11; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } @@ -109,7 +109,7 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb12: { - StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 _5 = (_2.1: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:17: 16:18 StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:20: 16:21 @@ -118,9 +118,9 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb13: { - StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb2; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } @@ -150,14 +150,14 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb11; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } bb17: { - StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 StorageLive(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 _5 = (_2.0: bool); // scope 0 at $DIR/match-arm-scopes.rs:16:26: 16:27 StorageLive(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:36: 16:37 @@ -166,17 +166,17 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb18: { - StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb3; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb19: { - StorageDead(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } @@ -188,7 +188,7 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // mir::Constant // + span: $DIR/match-arm-scopes.rs:17:41: 17:42 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - drop(_16) -> [return: bb22, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + drop(_16) -> [return: bb22, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:17:41: 17:42 } bb21: { @@ -200,8 +200,8 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb22: { - StorageDead(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 - StorageDead(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + StorageDead(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:41: 17:42 + StorageDead(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:41: 17:42 goto -> bb23; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } diff --git a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir index 45f7e91d097c0..dadbc3668cb29 100644 --- a/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/match-arm-scopes/rustc.complicated_match.SimplifyCfg-initial.after.mir @@ -74,7 +74,7 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // mir::Constant // + span: $DIR/match-arm-scopes.rs:16:77: 16:78 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - drop(_7) -> [return: bb24, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + drop(_7) -> [return: bb24, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 } bb9: { @@ -110,9 +110,9 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb15; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } @@ -129,7 +129,7 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb16: { - StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 @@ -142,9 +142,9 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb17: { - StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 falseEdge -> [real: bb3, imaginary: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } @@ -181,14 +181,14 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // + span: $DIR/match-arm-scopes.rs:16:59: 16:60 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 - StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb15; // scope 0 at $DIR/match-arm-scopes.rs:16:52: 16:60 } bb22: { - StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match-arm-scopes.rs:16:72: 16:73 @@ -201,17 +201,17 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb23: { - StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 falseEdge -> [real: bb5, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:16:42: 16:73 } bb24: { - StorageDead(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 - StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:78: 16:79 + StorageDead(_7); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_5); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 + StorageDead(_6); // scope 0 at $DIR/match-arm-scopes.rs:16:77: 16:78 goto -> bb28; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } @@ -223,7 +223,7 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { // mir::Constant // + span: $DIR/match-arm-scopes.rs:17:41: 17:42 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - drop(_16) -> [return: bb27, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + drop(_16) -> [return: bb27, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:17:41: 17:42 } bb26: { @@ -235,8 +235,8 @@ fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { } bb27: { - StorageDead(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 - StorageDead(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:42: 17:43 + StorageDead(_16); // scope 0 at $DIR/match-arm-scopes.rs:17:41: 17:42 + StorageDead(_15); // scope 0 at $DIR/match-arm-scopes.rs:17:41: 17:42 goto -> bb28; // scope 0 at $DIR/match-arm-scopes.rs:15:5: 18:6 } diff --git a/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir index d4a2afe295781..5ff4150d2ac1a 100644 --- a/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir +++ b/src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir @@ -97,7 +97,7 @@ fn full_tested_match() -> () { } bb8: { - StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37 FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27 FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27 StorageLive(_5); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15 @@ -112,14 +112,14 @@ fn full_tested_match() -> () { // + span: $DIR/match_false_edges.rs:16:32: 16:33 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:16:36: 16:37 - StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 - StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37 goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 } bb9: { - StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 - StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:37: 16:38 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37 goto -> bb4; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27 } @@ -136,7 +136,7 @@ fn full_tested_match() -> () { // + span: $DIR/match_false_edges.rs:17:21: 17:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:17:25: 17:26 - StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:17:26: 17:27 + StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:17:25: 17:26 goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 } diff --git a/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir index f1744a94fdc13..b79416fe31a41 100644 --- a/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges/rustc.full_tested_match2.PromoteTemps.before.mir @@ -62,7 +62,7 @@ fn full_tested_match2() -> () { // + span: $DIR/match_false_edges.rs:29:21: 29:22 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:29:25: 29:26 - StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:29:26: 29:27 + StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:29:25: 29:26 goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 } @@ -89,7 +89,7 @@ fn full_tested_match2() -> () { } bb8: { - StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37 FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_false_edges.rs:27:26: 27:27 FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_false_edges.rs:27:26: 27:27 StorageLive(_5); // scope 0 at $DIR/match_false_edges.rs:27:14: 27:15 @@ -104,14 +104,14 @@ fn full_tested_match2() -> () { // + span: $DIR/match_false_edges.rs:27:32: 27:33 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:27:36: 27:37 - StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 - StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37 goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 } bb9: { - StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 - StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:37: 27:38 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37 falseEdge -> [real: bb4, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:27:20: 27:27 } diff --git a/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir index 4ab4c4d341e2f..5b449da93d493 100644 --- a/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges/rustc.main.PromoteTemps.before.mir @@ -70,7 +70,7 @@ fn main() -> () { // mir::Constant // + span: $DIR/match_false_edges.rs:39:15: 39:16 // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) } - StorageDead(_14); // scope 0 at $DIR/match_false_edges.rs:39:16: 39:17 + StorageDead(_14); // scope 0 at $DIR/match_false_edges.rs:39:15: 39:16 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } @@ -97,7 +97,7 @@ fn main() -> () { } bb8: { - StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33 FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 FakeRead(ForGuardBinding, _7); // scope 0 at $DIR/match_false_edges.rs:36:27: 36:28 StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:36:14: 36:16 @@ -109,14 +109,14 @@ fn main() -> () { // mir::Constant // + span: $DIR/match_false_edges.rs:36:32: 36:33 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) } - StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 - StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } bb9: { - StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 - StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:33: 36:34 + StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33 + StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33 falseEdge -> [real: bb2, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:36:21: 36:28 } @@ -130,7 +130,7 @@ fn main() -> () { // mir::Constant // + span: $DIR/match_false_edges.rs:37:15: 37:16 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) } - StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:37:16: 37:17 + StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:37:15: 37:16 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } @@ -156,7 +156,7 @@ fn main() -> () { } bb13: { - StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34 FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 FakeRead(ForGuardBinding, _11); // scope 0 at $DIR/match_false_edges.rs:38:28: 38:29 StorageLive(_10); // scope 0 at $DIR/match_false_edges.rs:38:14: 38:15 @@ -168,14 +168,14 @@ fn main() -> () { // mir::Constant // + span: $DIR/match_false_edges.rs:38:33: 38:34 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) } - StorageDead(_10); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 - StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + StorageDead(_10); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34 + StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34 goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 } bb14: { - StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 - StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:34: 38:35 + StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34 + StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34 falseEdge -> [real: bb4, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:38:20: 38:29 } diff --git a/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir index ef6c88d8005b3..16895942cb81b 100644 --- a/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir @@ -117,7 +117,7 @@ fn main() -> () { } bb10: { - StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:24: 13:25 + StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:23: 13:24 FakeRead(ForMatchGuard, _8); // scope 2 at $DIR/match_test.rs:13:18: 13:19 _3 = const 0_i32; // scope 2 at $DIR/match_test.rs:13:23: 13:24 // ty::Const @@ -130,7 +130,7 @@ fn main() -> () { } bb11: { - StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:24: 13:25 + StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:23: 13:24 falseEdge -> [real: bb3, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:13:18: 13:19 } diff --git a/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir index 2e8cfaea937d7..f3f2b68e53d5c 100644 --- a/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir @@ -43,7 +43,7 @@ fn unwrap(_1: std::option::Option) -> T { StorageLive(_3); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15 _3 = move ((_1 as Some).0: T); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15 _0 = move _3; // scope 1 at $DIR/no-drop-for-inactive-variant.rs:9:20: 9:21 - StorageDead(_3); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:21: 9:22 + StorageDead(_3); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:20: 9:21 _6 = discriminant(_1); // scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2 return; // scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:2: 12:2 } diff --git a/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff b/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff index 7fc209778703e..0822d8cc03c60 100644 --- a/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff +++ b/src/test/mir-opt/remove_fake_borrows/rustc.match_guard.CleanupNonCodegenStatements.diff @@ -53,7 +53,7 @@ } bb5: { - StorageDead(_8); // scope 0 at $DIR/remove_fake_borrows.rs:8:26: 8:27 + StorageDead(_8); // scope 0 at $DIR/remove_fake_borrows.rs:8:25: 8:26 - FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 - FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 - FakeRead(ForMatchGuard, _6); // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 @@ -73,7 +73,7 @@ } bb6: { - StorageDead(_8); // scope 0 at $DIR/remove_fake_borrows.rs:8:26: 8:27 + StorageDead(_8); // scope 0 at $DIR/remove_fake_borrows.rs:8:25: 8:26 goto -> bb1; // scope 0 at $DIR/remove_fake_borrows.rs:8:20: 8:21 } diff --git a/src/test/mir-opt/simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff index 33a3403cada92..0de80f72a1e70 100644 --- a/src/test/mir-opt/simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify-arm-identity/32bit/rustc.main.SimplifyArmIdentity.diff @@ -61,7 +61,7 @@ ((_2 as Foo).0: u8) = move _5; // scope 3 at $DIR/simplify-arm-identity.rs:20:24: 20:35 discriminant(_2) = 0; // scope 3 at $DIR/simplify-arm-identity.rs:20:24: 20:35 StorageDead(_5); // scope 3 at $DIR/simplify-arm-identity.rs:20:34: 20:35 - StorageDead(_4); // scope 1 at $DIR/simplify-arm-identity.rs:20:35: 20:36 + StorageDead(_4); // scope 1 at $DIR/simplify-arm-identity.rs:20:34: 20:35 goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6 } diff --git a/src/test/mir-opt/simplify-arm-identity/64bit/rustc.main.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify-arm-identity/64bit/rustc.main.SimplifyArmIdentity.diff index 7e4fe1c2dcc4c..4fa0aff8fa0ef 100644 --- a/src/test/mir-opt/simplify-arm-identity/64bit/rustc.main.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify-arm-identity/64bit/rustc.main.SimplifyArmIdentity.diff @@ -61,7 +61,7 @@ ((_2 as Foo).0: u8) = move _5; // scope 3 at $DIR/simplify-arm-identity.rs:20:24: 20:35 discriminant(_2) = 0; // scope 3 at $DIR/simplify-arm-identity.rs:20:24: 20:35 StorageDead(_5); // scope 3 at $DIR/simplify-arm-identity.rs:20:34: 20:35 - StorageDead(_4); // scope 1 at $DIR/simplify-arm-identity.rs:20:35: 20:36 + StorageDead(_4); // scope 1 at $DIR/simplify-arm-identity.rs:20:34: 20:35 goto -> bb4; // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 22:6 } diff --git a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff index daae94e87f044..0cddcb061cfc8 100644 --- a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify-arm/rustc.id.SimplifyArmIdentity.diff @@ -33,7 +33,7 @@ ((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27 discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27 StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27 - StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:27: 11:28 + StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6 } diff --git a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff b/src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff index 15bd5e7c9f0b0..cd5962c682a5a 100644 --- a/src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff +++ b/src/test/mir-opt/simplify-arm/rustc.id.SimplifyBranchSame.diff @@ -33,7 +33,7 @@ ((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27 discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27 StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27 - StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:27: 11:28 + StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6 } diff --git a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff index 37273d1d6517b..642ccc1ab14b7 100644 --- a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyArmIdentity.diff @@ -29,7 +29,7 @@ ((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25 discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25 StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25 - StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:25: 19:26 + StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6 } @@ -45,7 +45,7 @@ ((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23 discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23 StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23 - StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:23: 18:24 + StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6 } diff --git a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff b/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff index f138d637435f8..95ce09a39ed50 100644 --- a/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff +++ b/src/test/mir-opt/simplify-arm/rustc.id_result.SimplifyBranchSame.diff @@ -29,7 +29,7 @@ ((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25 discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25 StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25 - StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:25: 19:26 + StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6 } @@ -45,7 +45,7 @@ ((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23 discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23 StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23 - StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:23: 18:24 + StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23 goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:17:5: 20:6 } diff --git a/src/test/mir-opt/simplify_try_if_let/rustc.{{impl}}-append.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try_if_let/rustc.{{impl}}-append.SimplifyArmIdentity.diff index aa416049f6613..4471f4d206ca2 100644 --- a/src/test/mir-opt/simplify_try_if_let/rustc.{{impl}}-append.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify_try_if_let/rustc.{{impl}}-append.SimplifyArmIdentity.diff @@ -115,7 +115,7 @@ bb8: { StorageDead(_5); // scope 1 at $DIR/simplify_try_if_let.rs:31:13: 31:14 - StorageDead(_4); // scope 0 at $DIR/simplify_try_if_let.rs:32:9: 32:10 + StorageDead(_4); // scope 0 at $DIR/simplify_try_if_let.rs:31:13: 31:14 goto -> bb9; // scope 0 at $DIR/simplify_try_if_let.rs:21:9: 32:10 } diff --git a/src/test/rustdoc-ui/check-attr-test.rs b/src/test/rustdoc-ui/check-attr-test.rs index c4140bbb70a78..665f330e34ea5 100644 --- a/src/test/rustdoc-ui/check-attr-test.rs +++ b/src/test/rustdoc-ui/check-attr-test.rs @@ -1,6 +1,6 @@ // compile-flags:--test -#![deny(invalid_codeblock_attribute)] +#![deny(invalid_codeblock_attributes)] /// foo /// diff --git a/src/test/rustdoc-ui/check-attr-test.stderr b/src/test/rustdoc-ui/check-attr-test.stderr index 45a2d6ec15e7d..1e067a5d21c44 100644 --- a/src/test/rustdoc-ui/check-attr-test.stderr +++ b/src/test/rustdoc-ui/check-attr-test.stderr @@ -11,8 +11,8 @@ error: unknown attribute `compile-fail`. Did you mean `compile_fail`? note: the lint level is defined here --> $DIR/check-attr-test.rs:3:9 | -3 | #![deny(invalid_codeblock_attribute)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 | #![deny(invalid_codeblock_attributes)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully error: unknown attribute `compilefail`. Did you mean `compile_fail`? diff --git a/src/test/rustdoc-ui/check-attr.rs b/src/test/rustdoc-ui/check-attr.rs index a93ec29131907..9e02eab753e26 100644 --- a/src/test/rustdoc-ui/check-attr.rs +++ b/src/test/rustdoc-ui/check-attr.rs @@ -1,4 +1,4 @@ -#![deny(invalid_codeblock_attribute)] +#![deny(invalid_codeblock_attributes)] /// foo //~^ ERROR diff --git a/src/test/rustdoc-ui/check-attr.stderr b/src/test/rustdoc-ui/check-attr.stderr index 5d6939bd09205..919eb047eefb5 100644 --- a/src/test/rustdoc-ui/check-attr.stderr +++ b/src/test/rustdoc-ui/check-attr.stderr @@ -13,8 +13,8 @@ LL | | /// ``` note: the lint level is defined here --> $DIR/check-attr.rs:1:9 | -LL | #![deny(invalid_codeblock_attribute)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | #![deny(invalid_codeblock_attributes)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully error: unknown attribute `compilefail`. Did you mean `compile_fail`? diff --git a/src/test/ui/consts/const-eval/ub-enum.rs b/src/test/ui/consts/const-eval/ub-enum.rs index c49997c6c33f6..136b33208c293 100644 --- a/src/test/ui/consts/const-eval/ub-enum.rs +++ b/src/test/ui/consts/const-eval/ub-enum.rs @@ -88,9 +88,10 @@ const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::transmute //~^ ERROR is undefined behavior // All variants are uninhabited but also have data. -const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(1u64) }; +// Use `0` as constant to make behavior endianess-independent. +const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(0u64) }; //~^ ERROR is undefined behavior -const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(1u64) }; +const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(0u64) }; //~^ ERROR is undefined behavior fn main() { diff --git a/src/test/ui/consts/const-eval/ub-enum.stderr b/src/test/ui/consts/const-eval/ub-enum.stderr index 217bfb628a018..7b3ee535c8ec6 100644 --- a/src/test/ui/consts/const-eval/ub-enum.stderr +++ b/src/test/ui/consts/const-eval/ub-enum.stderr @@ -87,18 +87,18 @@ LL | const BAD_OPTION_CHAR: Option<(char, char)> = Some(('x', unsafe { mem::tran = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. error[E0080]: it is undefined behavior to use this value - --> $DIR/ub-enum.rs:91:1 + --> $DIR/ub-enum.rs:92:1 | -LL | const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(1u64) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of the never type `!` at ..0.1 +LL | const BAD_UNINHABITED_WITH_DATA1: Result<(i32, Never), (i32, !)> = unsafe { mem::transmute(0u64) }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Never at ..0.1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. error[E0080]: it is undefined behavior to use this value - --> $DIR/ub-enum.rs:93:1 + --> $DIR/ub-enum.rs:94:1 | -LL | const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(1u64) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of uninhabited type Never at ..0.1 +LL | const BAD_UNINHABITED_WITH_DATA2: Result<(i32, !), (i32, Never)> = unsafe { mem::transmute(0u64) }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of the never type `!` at ..0.1 | = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. diff --git a/src/test/ui/issues/issue-29540.rs b/src/test/ui/issues/issue-29540.rs index 2a4d50f613cdc..c0de20822bacf 100644 --- a/src/test/ui/issues/issue-29540.rs +++ b/src/test/ui/issues/issue-29540.rs @@ -283,7 +283,7 @@ pub struct Config { pub mds_beacon_interval: String, pub mds_beacon_grace: String, pub mds_enforce_unique_name: String, - pub mds_blacklist_interval: String, + pub mds_interval: String, pub mds_session_timeout: String, pub mds_freeze_tree_timeout: String, pub mds_session_autoclose: String, diff --git a/src/test/ui/issues/issue-74082.rs b/src/test/ui/issues/issue-74082.rs new file mode 100644 index 0000000000000..982f8ef02538b --- /dev/null +++ b/src/test/ui/issues/issue-74082.rs @@ -0,0 +1,9 @@ +#![allow(dead_code)] + +#[repr(i128)] //~ ERROR: attribute should be applied to enum +struct Foo; + +#[repr(u128)] //~ ERROR: attribute should be applied to enum +struct Bar; + +fn main() {} diff --git a/src/test/ui/issues/issue-74082.stderr b/src/test/ui/issues/issue-74082.stderr new file mode 100644 index 0000000000000..08fe415513d0d --- /dev/null +++ b/src/test/ui/issues/issue-74082.stderr @@ -0,0 +1,19 @@ +error[E0517]: attribute should be applied to enum + --> $DIR/issue-74082.rs:3:8 + | +LL | #[repr(i128)] + | ^^^^ +LL | struct Foo; + | ----------- not an enum + +error[E0517]: attribute should be applied to enum + --> $DIR/issue-74082.rs:6:8 + | +LL | #[repr(u128)] + | ^^^^ +LL | struct Bar; + | ----------- not an enum + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0517`. diff --git a/src/test/ui/match/issue-74050-end-span.rs b/src/test/ui/match/issue-74050-end-span.rs new file mode 100644 index 0000000000000..cc81214e2701b --- /dev/null +++ b/src/test/ui/match/issue-74050-end-span.rs @@ -0,0 +1,13 @@ +fn main() { + let mut args = std::env::args_os(); + let _arg = match args.next() { + Some(arg) => { + match arg.to_str() { + //~^ ERROR `arg` does not live long enough + Some(s) => s, + None => return, + } + } + None => return, + }; +} diff --git a/src/test/ui/match/issue-74050-end-span.stderr b/src/test/ui/match/issue-74050-end-span.stderr new file mode 100644 index 0000000000000..d636a11a91cec --- /dev/null +++ b/src/test/ui/match/issue-74050-end-span.stderr @@ -0,0 +1,15 @@ +error[E0597]: `arg` does not live long enough + --> $DIR/issue-74050-end-span.rs:5:19 + | +LL | let _arg = match args.next() { + | ---- borrow later stored here +LL | Some(arg) => { +LL | match arg.to_str() { + | ^^^ borrowed value does not live long enough +... +LL | } + | - `arg` dropped here while still borrowed + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0597`. diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 2aea4d22700f3..97272f1a9c1b6 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -401,7 +401,7 @@ fn configure_lldb(config: &Config) -> Option { } if let Some(lldb_version) = config.lldb_version.as_ref() { - if is_blacklisted_lldb_version(&lldb_version) { + if lldb_version == "350" { println!( "WARNING: The used version of LLDB ({}) has a \ known issue that breaks debuginfo tests. See \ @@ -979,7 +979,3 @@ fn extract_lldb_version(full_version_line: Option) -> (Option, b } (None, false) } - -fn is_blacklisted_lldb_version(version: &str) -> bool { - version == "350" -} diff --git a/src/tools/rust-installer b/src/tools/rust-installer index 9f66c14c3f91a..d66f476b4d5e7 160000 --- a/src/tools/rust-installer +++ b/src/tools/rust-installer @@ -1 +1 @@ -Subproject commit 9f66c14c3f91a48a118c7817f434167b311c3515 +Subproject commit d66f476b4d5e7fdf1ec215c9ac16c923dc292324