From 3777ebc6ca156092e47318a20c9c2ae40d9813e2 Mon Sep 17 00:00:00 2001 From: Moulins Date: Thu, 18 Dec 2025 19:23:37 +0100 Subject: [PATCH 1/7] Don't expose redundant information in `rustc_public`'s `LayoutShape` Enum variant layouts don't need to store a full `LayoutShape`; just storing the fields offsets is enough and all other information can be inferred from the parent layout: - size, align and ABI don't make much sense for individual variants and should generally be taken from the parent layout instead; - variants always have `fields: FieldsShape::Arbitrary { .. }` and `variant: VariantShape::Single { .. }`. --- compiler/rustc_public/src/abi.rs | 19 ++++++++++++++++++- .../src/unstable/convert/stable/abi.rs | 12 ++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_public/src/abi.rs b/compiler/rustc_public/src/abi.rs index aced39059f6ba..413bc835e50ab 100644 --- a/compiler/rustc_public/src/abi.rs +++ b/compiler/rustc_public/src/abi.rs @@ -188,10 +188,27 @@ pub enum VariantsShape { tag: Scalar, tag_encoding: TagEncoding, tag_field: usize, - variants: Vec, + variants: Vec, }, } +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize)] +pub struct VariantFields { + /// Offsets for the first byte of each field, + /// ordered to match the source definition order. + /// I.e.: It follows the same order as [super::ty::VariantDef::fields()]. + /// This vector does not go in increasing order. + pub offsets: Vec, +} + +impl VariantFields { + pub fn fields_by_offset_order(&self) -> Vec { + let mut indices = (0..self.offsets.len()).collect::>(); + indices.sort_by_key(|idx| self.offsets[*idx]); + indices + } +} + #[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize)] pub enum TagEncoding { /// The tag directly stores the discriminant, but possibly with a smaller layout diff --git a/compiler/rustc_public/src/unstable/convert/stable/abi.rs b/compiler/rustc_public/src/unstable/convert/stable/abi.rs index 03328d084ee94..f6b750f75aeaa 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/abi.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/abi.rs @@ -11,7 +11,7 @@ use rustc_target::callconv; use crate::abi::{ AddressSpace, ArgAbi, CallConvention, FieldsShape, FloatLength, FnAbi, IntegerLength, IntegerType, Layout, LayoutShape, PassMode, Primitive, ReprFlags, ReprOptions, Scalar, - TagEncoding, TyAndLayout, ValueAbi, VariantsShape, WrappingRange, + TagEncoding, TyAndLayout, ValueAbi, VariantFields, VariantsShape, WrappingRange, }; use crate::compiler_interface::BridgeTys; use crate::target::MachineSize as Size; @@ -212,7 +212,15 @@ impl<'tcx> Stable<'tcx> for rustc_abi::Variants VariantFields { + offsets: offsets.iter().as_slice().stable(tables, cx), + }, + _ => panic!("variant layout should be Arbitrary"), + }) + .collect(), } } } From a1a944880f89b275745d1c5838463433980b3f72 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 14 Jan 2026 21:16:54 +0100 Subject: [PATCH 2/7] checksum-freshness: Add binary file inclusion to integration test --- tests/run-make/checksum-freshness/binary_file | 1 + tests/run-make/checksum-freshness/expected.d | 6 ++++-- tests/run-make/checksum-freshness/lib.rs | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 tests/run-make/checksum-freshness/binary_file diff --git a/tests/run-make/checksum-freshness/binary_file b/tests/run-make/checksum-freshness/binary_file new file mode 100644 index 0000000000000..45f1873fb781e --- /dev/null +++ b/tests/run-make/checksum-freshness/binary_file @@ -0,0 +1 @@ +binaryÿ \ No newline at end of file diff --git a/tests/run-make/checksum-freshness/expected.d b/tests/run-make/checksum-freshness/expected.d index 51467af53a20e..4554c509e36e6 100644 --- a/tests/run-make/checksum-freshness/expected.d +++ b/tests/run-make/checksum-freshness/expected.d @@ -1,6 +1,8 @@ -lib.d: lib.rs foo.rs +lib.d: lib.rs foo.rs binary_file lib.rs: foo.rs: -# checksum:blake3=94af75ee4ed805434484c3de51c9025278e5c3ada2315e2592052e102168a503 file_len:120 lib.rs +binary_file: +# checksum:blake3=4ac56f3f877798fb762d714c7bcb72e70133f4cc585f80dbd99c07755ae2c7f6 file_len:222 lib.rs # checksum:blake3=2720e17bfda4f3b2a5c96bb61b7e76ed8ebe3359b34128c0e5d8032c090a4f1a file_len:119 foo.rs +# checksum:blake3=119a5db8711914922c5b1c1908be4958175c5afa95c08888de594725329b5439 file_len:7 binary_file diff --git a/tests/run-make/checksum-freshness/lib.rs b/tests/run-make/checksum-freshness/lib.rs index 7bc6757959b1d..0cd4243423dec 100644 --- a/tests/run-make/checksum-freshness/lib.rs +++ b/tests/run-make/checksum-freshness/lib.rs @@ -1,7 +1,8 @@ // A basic library to be used in tests with no real purpose. mod foo; - +// Binary file with invalid UTF-8 sequence. +static BINARY_FILE: &[u8] = include_bytes!("binary_file"); pub fn sum(a: i32, b: i32) -> i32 { a + b } From 0df94dd94eeb0893d60aee40c9fcdf4d2b43a569 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 14 Jan 2026 21:20:24 +0100 Subject: [PATCH 3/7] checksum-freshness: Fix incorrect hash/file length values of binary dependency files --- .../rustc_builtin_macros/src/source_util.rs | 10 ++++++- compiler/rustc_interface/src/passes.rs | 29 +++++++++---------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/compiler/rustc_builtin_macros/src/source_util.rs b/compiler/rustc_builtin_macros/src/source_util.rs index 0f31de60a8a49..50db19a16d8b3 100644 --- a/compiler/rustc_builtin_macros/src/source_util.rs +++ b/compiler/rustc_builtin_macros/src/source_util.rs @@ -275,7 +275,15 @@ fn load_binary_file( } }; match cx.source_map().load_binary_file(&resolved_path) { - Ok(data) => Ok(data), + Ok(data) => { + cx.sess + .psess + .file_depinfo + .borrow_mut() + .insert(Symbol::intern(&resolved_path.to_string_lossy())); + + Ok(data) + } Err(io_err) => { let mut err = cx.dcx().struct_span_err( macro_span, diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index a0383b187de51..e1d9e2460443e 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -9,6 +9,7 @@ use rustc_ast as ast; use rustc_attr_parsing::{AttributeParser, ShouldEmit}; use rustc_codegen_ssa::traits::CodegenBackend; use rustc_codegen_ssa::{CodegenResults, CrateInfo}; +use rustc_data_structures::indexmap::IndexMap; use rustc_data_structures::jobserver::Proxy; use rustc_data_structures::steal::Steal; use rustc_data_structures::sync::{AppendOnlyIndexVec, FreezeLock, WorkerLocal}; @@ -586,7 +587,7 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P let result: io::Result<()> = try { // Build a list of files used to compile the output and // write Makefile-compatible dependency rules - let mut files: Vec<(String, u64, Option)> = sess + let mut files: IndexMap)> = sess .source_map() .files() .iter() @@ -595,10 +596,12 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P .map(|fmap| { ( escape_dep_filename(&fmap.name.prefer_local_unconditionally().to_string()), - // This needs to be unnormalized, - // as external tools wouldn't know how rustc normalizes them - fmap.unnormalized_source_len as u64, - fmap.checksum_hash, + ( + // This needs to be unnormalized, + // as external tools wouldn't know how rustc normalizes them + fmap.unnormalized_source_len as u64, + fmap.checksum_hash, + ), ) }) .collect(); @@ -616,7 +619,7 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P fn hash_iter_files>( it: impl Iterator, checksum_hash_algo: Option, - ) -> impl Iterator)> { + ) -> impl Iterator))> { it.map(move |path| { match checksum_hash_algo.and_then(|algo| { fs::File::open(path.as_ref()) @@ -632,8 +635,8 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P }) .ok() }) { - Some((file_len, checksum)) => (path, file_len, Some(checksum)), - None => (path, 0, None), + Some((file_len, checksum)) => (path, (file_len, Some(checksum))), + None => (path, (0, None)), } }) } @@ -707,18 +710,14 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P file, "{}: {}\n", path.display(), - files - .iter() - .map(|(path, _file_len, _checksum_hash_algo)| path.as_str()) - .intersperse(" ") - .collect::() + files.keys().map(String::as_str).intersperse(" ").collect::() )?; } // Emit a fake target for each input file to the compilation. This // prevents `make` from spitting out an error if a file is later // deleted. For more info see #28735 - for (path, _file_len, _checksum_hash_algo) in &files { + for path in files.keys() { writeln!(file, "{path}:")?; } @@ -747,7 +746,7 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P if sess.opts.unstable_opts.checksum_hash_algorithm().is_some() { files .iter() - .filter_map(|(path, file_len, hash_algo)| { + .filter_map(|(path, (file_len, hash_algo))| { hash_algo.map(|hash_algo| (path, file_len, hash_algo)) }) .try_for_each(|(path, file_len, checksum_hash)| { From 6ecb3f33f0ed410753b33e04b80bd6c504477294 Mon Sep 17 00:00:00 2001 From: Jonathan Pallant Date: Fri, 9 Jan 2026 08:24:13 +0000 Subject: [PATCH 4/7] Adds two new Tier 3 targets - `aarch64v8r-unknown-none` and `aarch64v8r-unknown-none-softfloat`. The existing `aarch64-unknown-none` target assumes Armv8.0-A as a baseline. However, Arm recently released the Arm Cortex-R82 processor which is the first to implement the Armv8-R AArch64 mode architecture. This architecture is similar to Armv8-A AArch64, however it has a different set of mandatory features, and is based off of Armv8.4. It is largely unrelated to the existing Armv8-R architecture target (`armv8r-none-eabihf`), which only operates in AArch32 mode. The second `aarch64v8r-unknown-none-softfloat` target allows for possible Armv8-R AArch64 CPUs with no FPU, or for use-cases where FPU register stacking is not desired. As with the existing `aarch64-unknown-none` target we have coupled FPU support and Neon support together - there is no 'has FPU but does not have NEON' target proposed even though the architecture technically allows for it. This PR was developed by Ferrous Systems on behalf of Arm. Arm is the owner of these changes. --- compiler/rustc_target/src/spec/mod.rs | 2 + .../spec/targets/aarch64v8r_unknown_none.rs | 37 +++++ .../aarch64v8r_unknown_none_softfloat.rs | 36 +++++ src/bootstrap/src/core/sanity.rs | 2 + src/doc/rustc/src/SUMMARY.md | 1 + src/doc/rustc/src/platform-support.md | 2 + .../aarch64v8r-unknown-none.md | 84 +++++++++++ .../platform-support/armv8r-none-eabihf.md | 3 + src/tools/tidy/src/target_specific_tests.rs | 2 +- tests/assembly-llvm/targets/targets-elf.rs | 6 + tests/codegen-llvm/aarch64v8r-softfloat.rs | 45 ++++++ .../sanitizer/kasan-emits-instrumentation.rs | 4 +- .../kcfi/add-cfi-normalize-integers-flag.rs | 4 +- .../sanitizer/kcfi/add-kcfi-flag.rs | 4 +- .../sanitizer/kcfi/add-kcfi-offset-flag.rs | 4 +- ...t-kcfi-operand-bundle-attr-sanitize-off.rs | 4 +- ...rand-bundle-itanium-cxx-abi-generalized.rs | 4 +- ...-itanium-cxx-abi-normalized-generalized.rs | 4 +- ...erand-bundle-itanium-cxx-abi-normalized.rs | 4 +- ...mit-kcfi-operand-bundle-itanium-cxx-abi.rs | 4 +- .../kcfi/emit-kcfi-operand-bundle.rs | 4 +- .../kcfi/emit-type-metadata-trait-objects.rs | 4 +- .../sanitizer/kcfi/fn-ptr-reify-shim.rs | 4 +- .../sanitizer/kcfi/naked-function.rs | 4 +- .../sanitizer/sanitize-off-asan-kasan.rs | 4 +- tests/ui/asm/aarch64v8r.rs | 140 ++++++++++++++++++ 26 files changed, 401 insertions(+), 15 deletions(-) create mode 100644 compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none.rs create mode 100644 compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none_softfloat.rs create mode 100644 src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md create mode 100644 tests/codegen-llvm/aarch64v8r-softfloat.rs create mode 100644 tests/ui/asm/aarch64v8r.rs diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index fe4b91c53f63f..14e83cf3d2de8 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1709,6 +1709,8 @@ supported_targets! { ("aarch64-unknown-none-softfloat", aarch64_unknown_none_softfloat), ("aarch64_be-unknown-none-softfloat", aarch64_be_unknown_none_softfloat), ("aarch64-unknown-nuttx", aarch64_unknown_nuttx), + ("aarch64v8r-unknown-none", aarch64v8r_unknown_none), + ("aarch64v8r-unknown-none-softfloat", aarch64v8r_unknown_none_softfloat), ("x86_64-fortanix-unknown-sgx", x86_64_fortanix_unknown_sgx), diff --git a/compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none.rs b/compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none.rs new file mode 100644 index 0000000000000..8f8bbb4a41caf --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none.rs @@ -0,0 +1,37 @@ +use crate::spec::{ + Arch, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, StackProbeType, Target, + TargetMetadata, TargetOptions, +}; + +pub(crate) fn target() -> Target { + let opts = TargetOptions { + // based off the aarch64-unknown-none target at time of addition + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), + linker: Some("rust-lld".into()), + supported_sanitizers: SanitizerSet::KCFI | SanitizerSet::KERNELADDRESS, + relocation_model: RelocModel::Static, + disable_redzone: true, + max_atomic_width: Some(128), + stack_probes: StackProbeType::Inline, + panic_strategy: PanicStrategy::Abort, + default_uwtable: true, + + // deviations from aarch64-unknown-none: `+v8a` -> `+v8r`; `+v8r` implies `+neon` + features: "+v8r,+strict-align".into(), + ..Default::default() + }; + Target { + llvm_target: "aarch64-unknown-none".into(), + metadata: TargetMetadata { + description: Some("Bare Armv8-R AArch64, hardfloat".into()), + tier: Some(3), + host_tools: Some(false), + std: Some(false), + }, + pointer_width: 64, + // $ clang-21 -S -emit-llvm -target aarch64 -mcpu=cortex-r82 stub.c + data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(), + arch: Arch::AArch64, + options: opts, + } +} diff --git a/compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none_softfloat.rs new file mode 100644 index 0000000000000..63f518873c609 --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/aarch64v8r_unknown_none_softfloat.rs @@ -0,0 +1,36 @@ +use crate::spec::{ + Abi, Arch, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, SanitizerSet, StackProbeType, + Target, TargetMetadata, TargetOptions, +}; + +pub(crate) fn target() -> Target { + let opts = TargetOptions { + abi: Abi::SoftFloat, + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), + linker: Some("rust-lld".into()), + relocation_model: RelocModel::Static, + disable_redzone: true, + max_atomic_width: Some(128), + supported_sanitizers: SanitizerSet::KCFI | SanitizerSet::KERNELADDRESS, + stack_probes: StackProbeType::Inline, + panic_strategy: PanicStrategy::Abort, + default_uwtable: true, + + // deviations from aarch64-unknown-none: `+v8a` -> `+v8r` + features: "+v8r,+strict-align,-neon".into(), + ..Default::default() + }; + Target { + llvm_target: "aarch64-unknown-none".into(), + metadata: TargetMetadata { + description: Some("Bare Armv8-R AArch64, softfloat".into()), + tier: Some(3), + host_tools: Some(false), + std: Some(false), + }, + pointer_width: 64, + data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(), + arch: Arch::AArch64, + options: opts, + } +} diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index a16a2b17be173..8b6405afa8929 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -46,6 +46,8 @@ const STAGE0_MISSING_TARGETS: &[&str] = &[ "armv6-none-eabi", "armv6-none-eabihf", "thumbv6-none-eabi", + "aarch64v8r-unknown-none", + "aarch64v8r-unknown-none-softfloat", ]; /// Minimum version threshold for libstdc++ required when using prebuilt LLVM diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index 632b9e2fc4312..2ec0c3648bdf7 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -50,6 +50,7 @@ - [aarch64-unknown-linux-gnu](platform-support/aarch64-unknown-linux-gnu.md) - [aarch64-unknown-linux-musl](platform-support/aarch64-unknown-linux-musl.md) - [aarch64-unknown-none*](platform-support/aarch64-unknown-none.md) + - [aarch64v8r-unknown-none*](platform-support/aarch64v8r-unknown-none.md) - [aarch64_be-unknown-none-softfloat](platform-support/aarch64_be-unknown-none-softfloat.md) - [aarch64_be-unknown-linux-musl](platform-support/aarch64_be-unknown-linux-musl.md) - [amdgcn-amd-amdhsa](platform-support/amdgcn-amd-amdhsa.md) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index dff8953347ff7..114f66282afd9 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -275,6 +275,8 @@ target | std | host | notes [`aarch64-unknown-trusty`](platform-support/trusty.md) | ✓ | | [`aarch64-uwp-windows-msvc`](platform-support/uwp-windows-msvc.md) | ✓ | | [`aarch64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | | ARM64 VxWorks OS +[`aarch64v8r-unknown-none`](platform-support/aarch64v8r-unknown-none.md) | * | | Bare Armv8-R in AArch64 mode, hardfloat +[`aarch64v8r-unknown-none-softfloat`](platform-support/aarch64v8r-unknown-none.md) | * | | Bare Armv8-R in AArch64 mode, softfloat [`aarch64_be-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit (big-endian) `aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian) `aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI) diff --git a/src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md b/src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md new file mode 100644 index 0000000000000..9e232b3205162 --- /dev/null +++ b/src/doc/rustc/src/platform-support/aarch64v8r-unknown-none.md @@ -0,0 +1,84 @@ +# `aarch64v8r-unknown-none` and `aarch64v8r-unknown-none-softfloat` + +* **Tier: 3** +* **Library Support:** core and alloc (bare-metal, `#![no_std]`) + +Bare-metal target for CPUs in the Armv8-R architecture family, running in +AArch64 mode. Processors in this family include the +[Arm Cortex-R82][cortex-r82]. + +For Armv8-R CPUs running in AArch32 mode (such as the Arm Cortex-R52), see +[`armv8r-none-eabihf`](armv8r-none-eabihf.md) instead. + +[cortex-r82]: https://developer.arm.com/processors/Cortex-R82 + +## Target maintainers + +- [Rust Embedded Devices Working Group Arm Team] +- [@rust-lang/arm-maintainers][arm_maintainers] ([rust@arm.com][arm_email]) + +[Rust Embedded Devices Working Group Arm Team]: https://github.com/rust-embedded/wg?tab=readme-ov-file#the-arm-team +[arm_maintainers]: https://github.com/rust-lang/team/blob/master/teams/arm-maintainers.toml +[arm_email]: mailto:rust@arm.com + +## Target CPU and Target Feature options + +Unlike AArch64 v8-A processors, not all AArch64 v8-R processors include an FPU +(that is, not all Armv8-R AArch64 processors implement the optional Armv8 +`FEAT_FP` extension). If you do not have an FPU, or have an FPU but wish to use +a soft-float ABI anyway, you should use the `aarch64v8r-unknown-none-softfloat` +target. If you wish to use the standard hard-float Arm AArch64 calling +convention, and you have an FPU, you can use the `aarch64v8r-unknown-none` +target. + +When using the `aarch64v8r-unknown-none` target, the minimum floating-point +features assumed are the Advanced SIMD features (`FEAT_AdvSIMD`, or `+neon`), +the implementation of which is branded Arm NEON. + +If your processor supports a different set of floating-point features than the +default expectations then these should also be enabled or disabled as needed +with [`-C target-feature=(+/-)`][target-feature]. However, note that currently +Rust does not support building hard-float AArch64 targets with Advanced SIMD +support disabled. It is also possible to tell Rust (or LLVM) that you have a +specific model of Arm processor, using the [`-Ctarget-cpu`][target-cpu] option. +Doing so may change the default set of target-features enabled. + +[target-feature]: https://doc.rust-lang.org/rustc/codegen-options/index.html#target-feature +[target-cpu]: https://doc.rust-lang.org/rustc/codegen-options/index.html#target-cpu + +## Requirements + +These targets are cross-compiled and use static linking. + +By default, the `lld` linker included with Rust will be used; however, you may +want to use the GNU linker instead. This can be obtained for Windows/Mac/Linux +from the [Arm Developer Website][arm-gnu-toolchain], or possibly from your OS's +package manager. To use it, add the following to your `.cargo/config.toml`: + +```toml +[target.aarch64-unknown-none] +linker = "aarch64-none-elf-ld" +``` + +The GNU linker can also be used by specifying `aarch64-none-elf-gcc` as the +linker. This is needed when using GCC's link time optimization. + +These targets don't provide a linker script, so you'll need to bring your own +according to the specific device you are using. Pass +`-Clink-arg=-Tyour_script.ld` as a rustc argument to make the linker use +`your_script.ld` during linking. + +[arm-gnu-toolchain]: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain + +## Cross-compilation toolchains and C code + +This target supports C code compiled with the `aarch64-none-elf` target +triple and a suitable `-march` or `-mcpu` flag. + +## Start-up and Low-Level Code + +The [Rust Embedded Devices Working Group Arm Team] maintain the +[`aarch64-cpu`] crate, which may be useful for writing bare-metal code using +this target. + +[`aarch64-cpu`]: https://docs.rs/aarch64-cpu diff --git a/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md b/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md index 85abac3d7eb89..73d88bcb89a15 100644 --- a/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md +++ b/src/doc/rustc/src/platform-support/armv8r-none-eabihf.md @@ -15,6 +15,9 @@ and [Cortex-R52+][cortex-r52-plus]. See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all `arm-none-eabi` targets. +For Armv8-R CPUs running in AArch64 mode (such as the Arm Cortex-R82), see +[`aarch64v8r-unknown-none`](aarch64v8r-unknown-none.md) instead. + [cortex-r52]: https://www.arm.com/products/silicon-ip-cpu/cortex-r/cortex-r52 [cortex-r52-plus]: https://www.arm.com/products/silicon-ip-cpu/cortex-r/cortex-r52-plus diff --git a/src/tools/tidy/src/target_specific_tests.rs b/src/tools/tidy/src/target_specific_tests.rs index 11138de5de764..ea365527a8cdf 100644 --- a/src/tools/tidy/src/target_specific_tests.rs +++ b/src/tools/tidy/src/target_specific_tests.rs @@ -98,7 +98,7 @@ fn arch_to_llvm_component(arch: &str) -> String { // enough for the purpose of this tidy check. match arch { "amdgcn" => "amdgpu".into(), - "aarch64_be" | "arm64_32" | "arm64e" | "arm64ec" => "aarch64".into(), + "aarch64v8r" | "aarch64_be" | "arm64_32" | "arm64e" | "arm64ec" => "aarch64".into(), "i386" | "i586" | "i686" | "x86" | "x86_64" | "x86_64h" => "x86".into(), "loongarch32" | "loongarch64" => "loongarch".into(), "nvptx64" => "nvptx".into(), diff --git a/tests/assembly-llvm/targets/targets-elf.rs b/tests/assembly-llvm/targets/targets-elf.rs index 0d5cd796aa480..c38e86315b272 100644 --- a/tests/assembly-llvm/targets/targets-elf.rs +++ b/tests/assembly-llvm/targets/targets-elf.rs @@ -67,6 +67,12 @@ //@ revisions: aarch64_unknown_none_softfloat //@ [aarch64_unknown_none_softfloat] compile-flags: --target aarch64-unknown-none-softfloat //@ [aarch64_unknown_none_softfloat] needs-llvm-components: aarch64 +//@ revisions: aarch64v8r_unknown_none +//@ [aarch64v8r_unknown_none] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r_unknown_none] needs-llvm-components: aarch64 +//@ revisions: aarch64v8r_unknown_none_softfloat +//@ [aarch64v8r_unknown_none_softfloat] compile-flags: --target aarch64v8r-unknown-none-softfloat +//@ [aarch64v8r_unknown_none_softfloat] needs-llvm-components: aarch64 //@ revisions: aarch64_unknown_nto_qnx700 //@ [aarch64_unknown_nto_qnx700] compile-flags: --target aarch64-unknown-nto-qnx700 //@ [aarch64_unknown_nto_qnx700] needs-llvm-components: aarch64 diff --git a/tests/codegen-llvm/aarch64v8r-softfloat.rs b/tests/codegen-llvm/aarch64v8r-softfloat.rs new file mode 100644 index 0000000000000..5ccda4f3a0aec --- /dev/null +++ b/tests/codegen-llvm/aarch64v8r-softfloat.rs @@ -0,0 +1,45 @@ +//@ add-minicore +//@ compile-flags: --target aarch64v8r-unknown-none-softfloat -Zmerge-functions=disabled +//@ needs-llvm-components: aarch64 +#![crate_type = "lib"] +#![feature(no_core, lang_items)] +#![no_core] + +extern crate minicore; +use minicore::*; + +// CHECK: i64 @pass_f64_C(i64 {{[^,]*}}) +#[no_mangle] +extern "C" fn pass_f64_C(x: f64) -> f64 { + x +} + +// CHECK: i64 @pass_f32_pair_C(i64 {{[^,]*}}) +#[no_mangle] +extern "C" fn pass_f32_pair_C(x: (f32, f32)) -> (f32, f32) { + x +} + +// CHECK: [2 x i64] @pass_f64_pair_C([2 x i64] {{[^,]*}}) +#[no_mangle] +extern "C" fn pass_f64_pair_C(x: (f64, f64)) -> (f64, f64) { + x +} + +// CHECK: i64 @pass_f64_Rust(i64 {{[^,]*}}) +#[no_mangle] +fn pass_f64_Rust(x: f64) -> f64 { + x +} + +// CHECK: i64 @pass_f32_pair_Rust(i64 {{[^,]*}}) +#[no_mangle] +fn pass_f32_pair_Rust(x: (f32, f32)) -> (f32, f32) { + x +} + +// CHECK: void @pass_f64_pair_Rust(ptr {{.*}}%{{[^ ]+}}, ptr {{.*}}%{{[^ ]+}}) +#[no_mangle] +fn pass_f64_pair_Rust(x: (f64, f64)) -> (f64, f64) { + x +} diff --git a/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs b/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs index da0c976d8a53d..f0135cdd00115 100644 --- a/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs +++ b/tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs @@ -2,9 +2,11 @@ //@ add-minicore //@ compile-flags: -Zsanitizer=kernel-address -Copt-level=0 -//@ revisions: aarch64 riscv64imac riscv64gc x86_64 +//@ revisions: aarch64 aarch64v8r riscv64imac riscv64gc x86_64 //@[aarch64] compile-flags: --target aarch64-unknown-none //@[aarch64] needs-llvm-components: aarch64 +//@[aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@[aarch64v8r] needs-llvm-components: aarch64 //@[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf //@[riscv64imac] needs-llvm-components: riscv //@[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf diff --git a/tests/codegen-llvm/sanitizer/kcfi/add-cfi-normalize-integers-flag.rs b/tests/codegen-llvm/sanitizer/kcfi/add-cfi-normalize-integers-flag.rs index 24c5d1be1d60b..53b8c605eb73b 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/add-cfi-normalize-integers-flag.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/add-cfi-normalize-integers-flag.rs @@ -1,9 +1,11 @@ // Verifies that "cfi-normalize-integers" module flag is added. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers diff --git a/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-flag.rs b/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-flag.rs index 53b1a3f2d74a5..9058d5b5cfcb9 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-flag.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-flag.rs @@ -1,9 +1,11 @@ // Verifies that "kcfi" module flag is added. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi diff --git a/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-offset-flag.rs b/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-offset-flag.rs index 82747351e0281..6574302033c82 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-offset-flag.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/add-kcfi-offset-flag.rs @@ -1,9 +1,11 @@ // Verifies that "kcfi-offset" module flag is added. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi -Z patchable-function-entry=4,3 diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-sanitize-off.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-sanitize-off.rs index ee4928053cf9e..eb9ab6b8f90cb 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-sanitize-off.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-attr-sanitize-off.rs @@ -1,9 +1,11 @@ // Verifies that KCFI operand bundles are omitted. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs index 9b861c08ac955..f934a3bfcee76 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs @@ -1,9 +1,11 @@ // Verifies that generalized KCFI type metadata for functions are emitted. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-generalize-pointers diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs index c2410aa9f4d82..b72b6d7ce308e 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs @@ -1,9 +1,11 @@ // Verifies that normalized and generalized KCFI type metadata for functions are emitted. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs index fbad335286cb1..064ab53a18561 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs @@ -1,9 +1,11 @@ // Verifies that normalized KCFI type metadata for functions are emitted. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi.rs index 6c7a8194ec4eb..8410286e49dbf 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle-itanium-cxx-abi.rs @@ -1,9 +1,11 @@ // Verifies that KCFI type metadata for functions are emitted. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle.rs index e22a210f3dfb8..3494854bcffd3 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/emit-kcfi-operand-bundle.rs @@ -1,9 +1,11 @@ // Verifies that KCFI operand bundles are emitted. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 diff --git a/tests/codegen-llvm/sanitizer/kcfi/emit-type-metadata-trait-objects.rs b/tests/codegen-llvm/sanitizer/kcfi/emit-type-metadata-trait-objects.rs index 3312f12f68850..4510e70cbc350 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/emit-type-metadata-trait-objects.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/emit-type-metadata-trait-objects.rs @@ -1,9 +1,11 @@ // Verifies that type metadata identifiers for trait objects are emitted correctly. // //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64v8r aarch64 x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0 diff --git a/tests/codegen-llvm/sanitizer/kcfi/fn-ptr-reify-shim.rs b/tests/codegen-llvm/sanitizer/kcfi/fn-ptr-reify-shim.rs index 676b2af8c8f1d..8cfb6a57a4a97 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/fn-ptr-reify-shim.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/fn-ptr-reify-shim.rs @@ -1,7 +1,9 @@ //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi -Cno-prepopulate-passes -Copt-level=0 diff --git a/tests/codegen-llvm/sanitizer/kcfi/naked-function.rs b/tests/codegen-llvm/sanitizer/kcfi/naked-function.rs index 830689780dce5..6b9d11b192b33 100644 --- a/tests/codegen-llvm/sanitizer/kcfi/naked-function.rs +++ b/tests/codegen-llvm/sanitizer/kcfi/naked-function.rs @@ -1,7 +1,9 @@ //@ add-minicore -//@ revisions: aarch64 x86_64 +//@ revisions: aarch64 aarch64v8r x86_64 //@ [aarch64] compile-flags: --target aarch64-unknown-none //@ [aarch64] needs-llvm-components: aarch64 +//@ [aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@ [aarch64v8r] needs-llvm-components: aarch64 //@ [x86_64] compile-flags: --target x86_64-unknown-none //@ [x86_64] needs-llvm-components: x86 //@ compile-flags: -Ctarget-feature=-crt-static -Zsanitizer=kcfi -Cno-prepopulate-passes -Copt-level=0 diff --git a/tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs b/tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs index c5df311efae09..cef4a650e4775 100644 --- a/tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs +++ b/tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs @@ -3,9 +3,11 @@ // //@ add-minicore //@ compile-flags: -Zsanitizer=kernel-address -Ctarget-feature=-crt-static -Copt-level=0 -//@ revisions: aarch64 riscv64imac riscv64gc x86_64 +//@ revisions: aarch64 aarch64v8r riscv64imac riscv64gc x86_64 //@[aarch64] compile-flags: --target aarch64-unknown-none //@[aarch64] needs-llvm-components: aarch64 +//@[aarch64v8r] compile-flags: --target aarch64v8r-unknown-none +//@[aarch64v8r] needs-llvm-components: aarch64 //@[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf //@[riscv64imac] needs-llvm-components: riscv //@[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf diff --git a/tests/ui/asm/aarch64v8r.rs b/tests/ui/asm/aarch64v8r.rs new file mode 100644 index 0000000000000..6b582bb730f07 --- /dev/null +++ b/tests/ui/asm/aarch64v8r.rs @@ -0,0 +1,140 @@ +// Codegen test of mandatory Armv8-R AArch64 extensions + +//@ add-minicore +//@ revisions: hf sf +//@ [hf] compile-flags: --target aarch64v8r-unknown-none +//@ [hf] needs-llvm-components: aarch64 +//@ [sf] compile-flags: --target aarch64v8r-unknown-none-softfloat +//@ [sf] needs-llvm-components: aarch64 +//@ build-pass +//@ ignore-backends: gcc + +#![feature(no_core)] +#![no_core] +#![no_main] +#![crate_type = "rlib"] +#![deny(dead_code)] // ensures we call all private functions from the public one + +extern crate minicore; +use minicore::*; + +/* # Mandatory extensions + * + * A comment indicates that the extension has no associated assembly instruction and cannot be + * codegen tested + * + * ## References: + * + * - Arm Architecture Reference Manual for R-profile AArch64 architecture (DDI 0628) -- has the + * list of mandatory extensions + * - Arm Architecture Reference Manual for A-profile architecture (ARM DDI 0487) -- has the + * mapping from features to instructions + * - Feature names in A-profile architecture (109697_0100_02_en Version 1.0) -- overview of + * what each extension mean + * */ +pub fn mandatory_extensions() { + /* ## ARMv8.0 */ + feat_aa64(); + // FEAT_AA64EL0 + // FEAT_AA64EL1 + // FEAT_AA64EL2 + feat_crc32(); + // FEAT_EL0 + // FEAT_EL1 + // FEAT_EL2 + // FEAT_IVIPT + + /* ## ARMv8.1 */ + // FEAT_HPDS + feat_lse(); + feat_pan(); + + /* ## ARMv8.2 */ + feat_asmv8p2(); + feat_dpb(); + // FEAT_Debugv8p2 + // FEAT_PAN2 + feat_ras(); + // FEAT_TTCNP + feat_uao(); + // FEAT_XNX + + /* ## ARMv8.3 */ + feat_lrcpc(); + feat_pauth(); + + /* ## ARMv8.4 */ + feat_dit(); + // FEAT_Debugv8p4 + feat_flagm(); + // FEAT_IDST + feat_lrcpc2(); + // FEAT_LSE2 + // FEAT_S2FWB + feat_tlbios(); + feat_tlbirange(); + // FEAT_TTL +} + +fn feat_aa64() { + // CurrentEL register only present when FEAT_AA64 is implemented + unsafe { asm!("mrs x0, CurrentEL") } +} + +fn feat_crc32() { + // instruction is present when FEAT_CRC32 is implemented + unsafe { asm!("crc32b w0, w1, w2") } +} + +fn feat_lse() { + // instruction is present when FEAT_LSE is implemented + unsafe { asm!("casp w0, w1, w2, w3, [x4]") } +} + +fn feat_pan() { + unsafe { asm!("mrs x0, PAN") } +} + +fn feat_asmv8p2() { + unsafe { asm!("BFC w0, #0, #1") } +} + +fn feat_dpb() { + unsafe { asm!("DC CVAP, x0") } +} + +fn feat_ras() { + unsafe { asm!("ESB") } +} + +fn feat_uao() { + unsafe { asm!("mrs x0, UAO") } +} + +fn feat_lrcpc() { + unsafe { asm!("ldaprb w0, [x1]") } +} + +fn feat_pauth() { + unsafe { asm!("xpacd x0") } +} + +fn feat_dit() { + unsafe { asm!("mrs x0, DIT") } +} + +fn feat_flagm() { + unsafe { asm!("cfinv") } +} + +fn feat_lrcpc2() { + unsafe { asm!("stlurb w0, [x1]") } +} + +fn feat_tlbios() { + unsafe { asm!("tlbi VMALLE1OS") } +} + +fn feat_tlbirange() { + unsafe { asm!("tlbi RVAE1IS, x0") } +} From 1f6a55d8ba5d51dda17bec2f90ac48e807de79f5 Mon Sep 17 00:00:00 2001 From: rustbot <47979223+rustbot@users.noreply.github.com> Date: Mon, 26 Jan 2026 18:00:52 +0100 Subject: [PATCH 5/7] Update books --- src/doc/reference | 2 +- src/doc/rust-by-example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/reference b/src/doc/reference index 28b5a54419985..990819b86c22b 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit 28b5a54419985f03db5294de5eede71b6665b594 +Subproject commit 990819b86c22bbf538c0526f0287670f3dc1a67a diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index 8de6ff811315a..bac931ef1673a 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit 8de6ff811315ac3a96ebe01d74057382e42ffdee +Subproject commit bac931ef1673af63fb60c3d691633034713cca20 From d541277ce18c874dd423f2550685762b351c0faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Bla=C5=A1kovi=C4=87?= Date: Mon, 26 Jan 2026 17:08:00 +0000 Subject: [PATCH 6/7] os allow missing_docs --- library/core/src/os/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/os/mod.rs b/library/core/src/os/mod.rs index 897f59f530ed0..5ac2b637941ae 100644 --- a/library/core/src/os/mod.rs +++ b/library/core/src/os/mod.rs @@ -1,6 +1,7 @@ //! OS-specific functionality. #![unstable(feature = "darwin_objc", issue = "145496")] +#![allow(missing_docs)] #[cfg(all( doc, From 4a27be69726a9bd9badaa3b4ae1b5a4a63388235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sat, 8 Nov 2025 22:16:44 +0000 Subject: [PATCH 7/7] Do not mention `-Zmacro-backtrace` for std macros that are a wrapper around a compiler intrinsic --- compiler/rustc_expand/src/base.rs | 14 ++++++++++++- .../tests/ui/recursive_format_impl.stderr | 18 ---------------- .../concurrency/windows_join_main.stderr | 1 - .../dangling_primitive.stderr | 1 - .../out_of_bounds_read.stderr | 1 - .../out_of_bounds_read_neg_offset.stderr | 1 - .../out_of_bounds_write.stderr | 1 - .../miri/tests/fail/erroneous_const2.stderr | 2 -- .../return_pointer_on_unwind.stderr | 1 - .../tests/fail/intrinsics/simd-scatter.stderr | 1 - .../tests/fail/provenance/mix-ptrs1.stderr | 1 - .../tests/fail/provenance/mix-ptrs2.stderr | 1 - src/tools/miri/tests/fail/rc_as_ptr.stderr | 1 - .../fail/stacked_borrows/zst_slice.stderr | 1 - .../parent_read_freezes_raw_mut.stderr | 1 - .../tree_borrows/protector-write-lazy.stderr | 1 - .../tests/pass/alloc-access-tracking.stderr | 2 -- .../main-alongside-macro-calls.fail.stdout | 4 ---- tests/ui/asm/aarch64/type-check-2.stderr | 1 - tests/ui/asm/parse-error.stderr | 8 ------- tests/ui/asm/x86_64/type-check-2.stderr | 1 - .../defaults-not-assumed-fail.stderr | 3 --- .../ui/async-await/unreachable-lint-2.stderr | 1 - ...y-operation-error-on-function-70724.stderr | 4 ---- tests/ui/binop/eq-vec.stderr | 1 - .../function-comparison-errors-59488.stderr | 6 ------ tests/ui/binop/issue-77910-1.stderr | 3 --- .../higher-ranked-outlives-for-capture.stderr | 2 -- tests/ui/borrowck/borrowck-and-init.stderr | 2 -- .../borrowck-borrowed-uniq-rvalue-2.stderr | 1 - .../borrowck/borrowck-break-uninit-2.stderr | 1 - .../ui/borrowck/borrowck-break-uninit.stderr | 1 - tests/ui/borrowck/borrowck-or-init.stderr | 2 -- tests/ui/borrowck/borrowck-while-break.stderr | 2 -- .../ui/borrowck/issue-24267-flow-exit.stderr | 2 -- tests/ui/borrowck/issue-47646.stderr | 2 -- tests/ui/borrowck/issue-64453.stderr | 1 - ...ownership-struct-update-moved-error.stderr | 1 - .../ui/borrowck/suggest-assign-rvalue.stderr | 10 --------- .../diagnostics/arrays.stderr | 2 -- .../diagnostics/box.stderr | 2 -- .../diagnostics/repr_packed.stderr | 1 - .../simple-struct-min-capture.stderr | 2 -- tests/ui/closures/issue-111932.stderr | 1 - tests/ui/codemap_tests/bad-format-args.stderr | 2 -- tests/ui/codemap_tests/tab_3.stderr | 1 - .../vec-macro-in-static-array.stderr | 1 - tests/ui/consts/const-eval/const_panic.stderr | 4 ---- .../consts/const-eval/const_panic_2021.stderr | 4 ---- .../const-eval/const_panic_libcore_bin.stderr | 2 -- tests/ui/consts/const-eval/format.stderr | 2 -- tests/ui/consts/const-eval/issue-44578.stderr | 3 --- .../ui/consts/control-flow/issue-50577.stderr | 2 -- .../min_const_fn/bad_const_fn_body_ice.stderr | 3 --- .../ui/consts/recursive-const-in-impl.stderr | 1 - .../yield-while-ref-reborrowed.stderr | 2 -- .../ice-line-bounds-issue-148732.stderr | 3 --- .../ui/derives/nonsense-input-to-debug.stderr | 2 -- tests/ui/error-codes/E0010-teach.stderr | 2 -- tests/ui/error-codes/E0010.stderr | 3 --- .../span-format_args-issue-140578.stderr | 10 --------- .../expr/if/assert-macro-without-else.stderr | 4 ---- .../feature-gate-global-registration.stderr | 2 -- tests/ui/fmt/format-args-argument-span.stderr | 4 ---- tests/ui/fmt/ifmt-bad-arg.stderr | 2 -- tests/ui/fmt/ifmt-unimpl.stderr | 1 - tests/ui/fmt/non-source-literals.stderr | 4 ---- .../precise-capturing/migration-note.stderr | 1 - ...745-avoid-expr-from-macro-expansion.stderr | 2 -- tests/ui/issues/issue-42796.stderr | 1 - .../iter-macro-not-async-closure.stderr | 2 -- .../lifetimes/borrowck-let-suggestion.stderr | 1 - tests/ui/lint/dead-code/closure-bang.stderr | 1 - tests/ui/lint/fn-ptr-comparisons-some.stderr | 1 - tests/ui/lint/fn-ptr-comparisons-weird.stderr | 2 -- .../ui/liveness/liveness-move-in-while.stderr | 1 - .../liveness/liveness-use-after-move.stderr | 1 - .../liveness/liveness-use-after-send.stderr | 1 - tests/ui/loops/loop-proper-liveness.stderr | 1 - .../macros/assert.with-generic-asset.stderr | 2 -- .../assert.without-generic-asset.stderr | 2 -- .../failed-to-reparse-issue-139445.stderr | 4 ---- tests/ui/macros/format-parse-errors.stderr | 2 -- .../macro-expansion-empty-span-147255.stderr | 1 - .../macros/macro-local-data-key-priv.stderr | 1 - tests/ui/macros/vec-macro-in-pattern.stderr | 3 --- .../mismatched-types-issue-126222.stderr | 4 ---- tests/ui/modules/issue-107649.stderr | 1 - ...es-based-on-type-capture-clause-bad.stderr | 1 - .../nll-problem-case-3-issue-21906.nll.stderr | 2 -- tests/ui/on-unimplemented/no-debug.stderr | 4 ---- ...t-mode-unimplemented-for-constblock.stderr | 3 --- ...fetime_errors_on_promotion_misusage.stderr | 2 -- tests/ui/reachable/expr_again.stderr | 1 - tests/ui/reachable/expr_block.stderr | 2 -- tests/ui/reachable/expr_if.stderr | 2 -- tests/ui/reachable/expr_loop.stderr | 5 ----- tests/ui/reachable/expr_match.stderr | 5 ----- .../ui/reachable/unreachable-code-ret.stderr | 1 - .../underscore-bindings-disambiguators.stderr | 12 ----------- .../diverge-causes-unreachable-code.stderr | 7 ------- .../dbg-macro-move-semantics.stderr | 1 - .../dbg-macro-requires-debug.stderr | 1 - tests/ui/span/coerce-suggestions.stderr | 2 -- tests/ui/span/issue-33884.stderr | 2 -- tests/ui/span/issue-39698.stderr | 2 -- tests/ui/span/slice-borrow.stderr | 1 - .../statics/check-values-constraints.stderr | 21 ------------------- tests/ui/suggestions/bound-suggestions.stderr | 6 ------ tests/ui/suggestions/issue-97760.stderr | 1 - tests/ui/suggestions/path-display.stderr | 2 -- tests/ui/thread-local/no-unstable.stderr | 4 ---- .../ui/traits/const-traits/issue-79450.stderr | 1 - .../try-block-maybe-bad-lifetime.stderr | 1 - tests/ui/try-block/try-block-opt-init.stderr | 2 -- ...ounds_from_bounds_param.edition2024.stderr | 3 --- tests/ui/type-alias-impl-trait/nested.stderr | 1 - ...igned-block-without-tail-expression.stderr | 4 ---- .../closure-ty-mismatch-issue-128561.stderr | 2 -- ...0017-format-into-help-deletes-macro.stderr | 1 - ...2007-leaked-writeln-macro-internals.stderr | 1 - ...stion-mark-operator-suggestion-span.stderr | 1 - ...suggest-clone-in-macro-issue-139253.stderr | 2 -- tests/ui/uninhabited/void-branch.stderr | 2 -- .../use/use-after-move-based-on-type.stderr | 1 - 125 files changed, 13 insertions(+), 314 deletions(-) diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index 6a3c9697a9392..653f2071d8988 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -849,6 +849,9 @@ pub struct SyntaxExtension { /// Should debuginfo for the macro be collapsed to the outermost expansion site (in other /// words, was the macro definition annotated with `#[collapse_debuginfo]`)? pub collapse_debuginfo: bool, + /// Suppresses the "this error originates in the macro" note when a diagnostic points at this + /// macro. + pub hide_backtrace: bool, } impl SyntaxExtension { @@ -882,6 +885,7 @@ impl SyntaxExtension { allow_internal_unsafe: false, local_inner_macros: false, collapse_debuginfo: false, + hide_backtrace: false, } } @@ -912,6 +916,12 @@ impl SyntaxExtension { collapse_table[flag as usize][attr as usize] } + fn get_hide_backtrace(attrs: &[hir::Attribute]) -> bool { + // FIXME(estebank): instead of reusing `#[rustc_diagnostic_item]` as a proxy, introduce a + // new attribute purely for this under the `#[diagnostic]` namespace. + ast::attr::find_by_name(attrs, sym::rustc_diagnostic_item).is_some() + } + /// Constructs a syntax extension with the given properties /// and other properties converted from attributes. pub fn new( @@ -948,6 +958,7 @@ impl SyntaxExtension { // Not a built-in macro None => (None, helper_attrs), }; + let hide_backtrace = builtin_name.is_some() || Self::get_hide_backtrace(attrs); let stability = find_attr!(attrs, AttributeKind::Stability { stability, .. } => *stability); @@ -982,6 +993,7 @@ impl SyntaxExtension { allow_internal_unsafe, local_inner_macros, collapse_debuginfo, + hide_backtrace, } } @@ -1061,7 +1073,7 @@ impl SyntaxExtension { self.allow_internal_unsafe, self.local_inner_macros, self.collapse_debuginfo, - self.builtin_name.is_some(), + self.hide_backtrace, ) } } diff --git a/src/tools/clippy/tests/ui/recursive_format_impl.stderr b/src/tools/clippy/tests/ui/recursive_format_impl.stderr index 31960c7193b44..4361d612bf2a5 100644 --- a/src/tools/clippy/tests/ui/recursive_format_impl.stderr +++ b/src/tools/clippy/tests/ui/recursive_format_impl.stderr @@ -12,72 +12,54 @@ error: using `self` as `Display` in `impl Display` will cause infinite recursion | LL | write!(f, "{}", self) | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Display` in `impl Display` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:86:9 | LL | write!(f, "{}", &self) | ^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Debug` in `impl Debug` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:93:9 | LL | write!(f, "{:?}", &self) | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Display` in `impl Display` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:103:9 | LL | write!(f, "{}", &&&self) | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Display` in `impl Display` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:178:9 | LL | write!(f, "{}", &*self) | ^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Debug` in `impl Debug` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:185:9 | LL | write!(f, "{:?}", &*self) | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Display` in `impl Display` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:202:9 | LL | write!(f, "{}", *self) | ^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Display` in `impl Display` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:219:9 | LL | write!(f, "{}", **&&*self) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: using `self` as `Display` in `impl Display` will cause infinite recursion --> tests/ui/recursive_format_impl.rs:236:9 | LL | write!(f, "{}", &&**&&*self) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 10 previous errors diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr index 3d324ad0bdefa..2f3e41b405bc3 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr @@ -31,7 +31,6 @@ LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_O LL | | } LL | | }) | |______^ - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/dangling_primitive.stderr b/src/tools/miri/tests/fail/dangling_pointers/dangling_primitive.stderr index 24a807afd73df..afc2cb214842e 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/dangling_primitive.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/dangling_primitive.stderr @@ -16,7 +16,6 @@ help: ALLOC was deallocated here: | LL | }; | ^ - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read.stderr b/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read.stderr index b957056ad36ea..836c1bd8af89e 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read.stderr @@ -11,7 +11,6 @@ help: ALLOC was allocated here: | LL | let v: Vec = vec![1, 2]; | ^^^^^^^^^^ - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read_neg_offset.stderr b/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read_neg_offset.stderr index 6cae87b759ee1..5635bb9cc4431 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read_neg_offset.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read_neg_offset.stderr @@ -11,7 +11,6 @@ help: ALLOC was allocated here: | LL | let v: Vec = vec![1, 2]; | ^^^^^^^^^^ - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_write.stderr b/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_write.stderr index 13e83e4696cf1..c18a55d30cc15 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_write.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_write.stderr @@ -11,7 +11,6 @@ help: ALLOC was allocated here: | LL | let mut v: Vec = vec![1, 2]; | ^^^^^^^^^^ - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/erroneous_const2.stderr b/src/tools/miri/tests/fail/erroneous_const2.stderr index 08d2cc124f13b..d9074e6e2498b 100644 --- a/src/tools/miri/tests/fail/erroneous_const2.stderr +++ b/src/tools/miri/tests/fail/erroneous_const2.stderr @@ -23,8 +23,6 @@ note: erroneous constant encountered | LL | println!("{}", FOO); | ^^^ - | - = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_on_unwind.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_on_unwind.stderr index 845b4f977ca3c..364a4b4a74418 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_on_unwind.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_on_unwind.stderr @@ -11,7 +11,6 @@ LL | dbg!(x.0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) Uninitialized memory occurred at ALLOC[0x0..0x4], in this allocation: ALLOC (stack variable, size: 132, align: 4) { diff --git a/src/tools/miri/tests/fail/intrinsics/simd-scatter.stderr b/src/tools/miri/tests/fail/intrinsics/simd-scatter.stderr index 4d1dcec3b5763..cd38ff4355aaf 100644 --- a/src/tools/miri/tests/fail/intrinsics/simd-scatter.stderr +++ b/src/tools/miri/tests/fail/intrinsics/simd-scatter.stderr @@ -16,7 +16,6 @@ help: ALLOC was allocated here: | LL | let mut vec: Vec = vec![10, 11, 12, 13, 14, 15, 16, 17, 18]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/provenance/mix-ptrs1.stderr b/src/tools/miri/tests/fail/provenance/mix-ptrs1.stderr index 92aeb6445b4fb..e1d4b7d95f664 100644 --- a/src/tools/miri/tests/fail/provenance/mix-ptrs1.stderr +++ b/src/tools/miri/tests/fail/provenance/mix-ptrs1.stderr @@ -6,7 +6,6 @@ LL | assert_eq!(*strange_ptr.with_addr(ptr.addr()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/provenance/mix-ptrs2.stderr b/src/tools/miri/tests/fail/provenance/mix-ptrs2.stderr index e00e72a50c6b3..a77f73f81e5fa 100644 --- a/src/tools/miri/tests/fail/provenance/mix-ptrs2.stderr +++ b/src/tools/miri/tests/fail/provenance/mix-ptrs2.stderr @@ -6,7 +6,6 @@ LL | assert_eq!(*ptr, 42); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/rc_as_ptr.stderr b/src/tools/miri/tests/fail/rc_as_ptr.stderr index d2d9d94afd440..d97878f815cc5 100644 --- a/src/tools/miri/tests/fail/rc_as_ptr.stderr +++ b/src/tools/miri/tests/fail/rc_as_ptr.stderr @@ -16,7 +16,6 @@ help: ALLOC was deallocated here: | LL | drop(strong); | ^^^^^^^^^^^^ - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr b/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr index 91b320465624a..c0e4f24a5a154 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr @@ -11,7 +11,6 @@ help: would have been created here, but this is a zero-size retag ([0x0..0 | LL | assert_eq!(*s.as_ptr().add(1), 2); | ^^^^^^^^^^ - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr b/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr index d0cd0088c0be0..791263b95248b 100644 --- a/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr @@ -24,7 +24,6 @@ help: the accessed tag later transitioned to Frozen due to a reborrow (act LL | assert_eq!(root, 0); // Parent Read | ^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of write permissions - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/protector-write-lazy.stderr b/src/tools/miri/tests/fail/tree_borrows/protector-write-lazy.stderr index 6ebc2dd40e297..9606aaadf33cf 100644 --- a/src/tools/miri/tests/fail/tree_borrows/protector-write-lazy.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/protector-write-lazy.stderr @@ -18,7 +18,6 @@ help: the accessed tag later transitioned to Disabled due to a protector r LL | } | ^ = help: this transition corresponds to a loss of read and write permissions - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/pass/alloc-access-tracking.stderr b/src/tools/miri/tests/pass/alloc-access-tracking.stderr index 5dfcd0180e4c1..f1c9241beded7 100644 --- a/src/tools/miri/tests/pass/alloc-access-tracking.stderr +++ b/src/tools/miri/tests/pass/alloc-access-tracking.stderr @@ -15,8 +15,6 @@ note: read access at ALLOC[0..1] | LL | assert_eq!(*ptr, 42); | ^^^^^^^^^^^^^^^^^^^^ tracking was triggered here - | - = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: freed allocation ALLOC --> RUSTLIB/alloc/src/boxed.rs:LL:CC diff --git a/tests/rustdoc-ui/doctest/main-alongside-macro-calls.fail.stdout b/tests/rustdoc-ui/doctest/main-alongside-macro-calls.fail.stdout index 65989a8ef47c7..8c01c6ff5a413 100644 --- a/tests/rustdoc-ui/doctest/main-alongside-macro-calls.fail.stdout +++ b/tests/rustdoc-ui/doctest/main-alongside-macro-calls.fail.stdout @@ -13,8 +13,6 @@ error: macros that expand to items must be delimited with braces or followed by | LL | println!(); | ^^^^^^^^^^ - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: macro expansion ignores `{` and any tokens following --> $SRC_DIR/std/src/macros.rs:LL:COL @@ -35,8 +33,6 @@ error: macros that expand to items must be delimited with braces or followed by | LL | println!(); | ^^^^^^^^^^ - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: macro expansion ignores `{` and any tokens following --> $SRC_DIR/std/src/macros.rs:LL:COL diff --git a/tests/ui/asm/aarch64/type-check-2.stderr b/tests/ui/asm/aarch64/type-check-2.stderr index 84bc5f08b4ed1..2cd767db0334a 100644 --- a/tests/ui/asm/aarch64/type-check-2.stderr +++ b/tests/ui/asm/aarch64/type-check-2.stderr @@ -21,7 +21,6 @@ LL | asm!("{}", in(reg) vec![0]); | ^^^^^^^ | = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot use value of type `(i32, i32, i32)` for inline assembly --> $DIR/type-check-2.rs:36:28 diff --git a/tests/ui/asm/parse-error.stderr b/tests/ui/asm/parse-error.stderr index dff85a601b738..fe6802b0c0c9e 100644 --- a/tests/ui/asm/parse-error.stderr +++ b/tests/ui/asm/parse-error.stderr @@ -193,16 +193,12 @@ error: asm template must be a string literal | LL | asm!(format!("{{{}}}", 0), in(reg) foo); | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: asm template must be a string literal --> $DIR/parse-error.rs:86:21 | LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar); | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: _ cannot be used for input operands --> $DIR/parse-error.rs:88:28 @@ -357,16 +353,12 @@ error: asm template must be a string literal | LL | global_asm!(format!("{{{}}}", 0), const FOO); | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: asm template must be a string literal --> $DIR/parse-error.rs:143:20 | LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR); | ^^^^^^^^^^^^^^^^^^^^ - | - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: the `in` operand cannot be used with `global_asm!` --> $DIR/parse-error.rs:146:19 diff --git a/tests/ui/asm/x86_64/type-check-2.stderr b/tests/ui/asm/x86_64/type-check-2.stderr index d5c5a3ff1f843..e5d39b2fbd053 100644 --- a/tests/ui/asm/x86_64/type-check-2.stderr +++ b/tests/ui/asm/x86_64/type-check-2.stderr @@ -21,7 +21,6 @@ LL | asm!("{}", in(reg) vec![0]); | ^^^^^^^ | = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot use value of type `(i32, i32, i32)` for inline assembly --> $DIR/type-check-2.rs:52:28 diff --git a/tests/ui/associated-consts/defaults-not-assumed-fail.stderr b/tests/ui/associated-consts/defaults-not-assumed-fail.stderr index 40f5f889f361d..8b38905e1c576 100644 --- a/tests/ui/associated-consts/defaults-not-assumed-fail.stderr +++ b/tests/ui/associated-consts/defaults-not-assumed-fail.stderr @@ -23,8 +23,6 @@ note: erroneous constant encountered | LL | assert_eq!(<() as Tr>::B, 0); // causes the error above | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: erroneous constant encountered --> $DIR/defaults-not-assumed-fail.rs:34:5 @@ -33,7 +31,6 @@ LL | assert_eq!(<() as Tr>::B, 0); // causes the error above | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` - = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/async-await/unreachable-lint-2.stderr b/tests/ui/async-await/unreachable-lint-2.stderr index cbebc9951f32d..5e7b328cf5238 100644 --- a/tests/ui/async-await/unreachable-lint-2.stderr +++ b/tests/ui/async-await/unreachable-lint-2.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/binop/binary-operation-error-on-function-70724.stderr b/tests/ui/binop/binary-operation-error-on-function-70724.stderr index 11b0e4ba19c58..2eb980764a39b 100644 --- a/tests/ui/binop/binary-operation-error-on-function-70724.stderr +++ b/tests/ui/binop/binary-operation-error-on-function-70724.stderr @@ -6,8 +6,6 @@ LL | assert_eq!(a, 0); | | | fn() -> i32 {a} | {integer} - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/binary-operation-error-on-function-70724.rs:7:5 @@ -17,7 +15,6 @@ LL | assert_eq!(a, 0); | = note: expected fn item `fn() -> i32 {a}` found type `{integer}` - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn() -> i32 {a}` doesn't implement `Debug` --> $DIR/binary-operation-error-on-function-70724.rs:7:5 @@ -29,7 +26,6 @@ LL | assert_eq!(a, 0); | ^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn() -> i32 {a}` | = help: use parentheses to call this function: `a()` - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/tests/ui/binop/eq-vec.stderr b/tests/ui/binop/eq-vec.stderr index 14739752877ce..158bfe6259344 100644 --- a/tests/ui/binop/eq-vec.stderr +++ b/tests/ui/binop/eq-vec.stderr @@ -12,7 +12,6 @@ note: an implementation of `PartialEq` might be missing for `Foo` | LL | enum Foo { | ^^^^^^^^ must implement `PartialEq` - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `Foo` with `#[derive(PartialEq)]` | LL + #[derive(PartialEq)] diff --git a/tests/ui/binop/function-comparison-errors-59488.stderr b/tests/ui/binop/function-comparison-errors-59488.stderr index 615458bc45b40..43ecd6a36f387 100644 --- a/tests/ui/binop/function-comparison-errors-59488.stderr +++ b/tests/ui/binop/function-comparison-errors-59488.stderr @@ -80,24 +80,18 @@ LL | assert_eq!(Foo::Bar, i); | | | fn(usize) -> Foo {Foo::Bar} | fn(usize) -> Foo {Foo::Bar} - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` --> $DIR/function-comparison-errors-59488.rs:31:5 | LL | assert_eq!(Foo::Bar, i); | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}` - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` --> $DIR/function-comparison-errors-59488.rs:31:5 | LL | assert_eq!(Foo::Bar, i); | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}` - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 10 previous errors diff --git a/tests/ui/binop/issue-77910-1.stderr b/tests/ui/binop/issue-77910-1.stderr index 80c384f39bd1b..9503813f4eb8e 100644 --- a/tests/ui/binop/issue-77910-1.stderr +++ b/tests/ui/binop/issue-77910-1.stderr @@ -6,8 +6,6 @@ LL | assert_eq!(foo, y); | | | for<'a> fn(&'a i32) -> &'a i32 {foo} | _ - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `for<'a> fn(&'a i32) -> &'a i32 {foo}` doesn't implement `Debug` --> $DIR/issue-77910-1.rs:8:5 @@ -19,7 +17,6 @@ LL | assert_eq!(foo, y); | ^^^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `for<'a> fn(&'a i32) -> &'a i32 {foo}` | = help: use parentheses to call this function: `foo(/* &i32 */)` - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0381]: used binding `xs` isn't initialized --> $DIR/issue-77910-1.rs:3:5 diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr index b5c2b662f3159..c82821b04a35c 100644 --- a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr +++ b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr @@ -8,8 +8,6 @@ LL | test(&vec![]) | argument requires that borrow lasts for `'static` LL | } | - temporary value is freed at the end of this statement - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/borrowck-and-init.stderr b/tests/ui/borrowck/borrowck-and-init.stderr index 37386f1c46516..e6d49bc6e4713 100644 --- a/tests/ui/borrowck/borrowck-and-init.stderr +++ b/tests/ui/borrowck/borrowck-and-init.stderr @@ -8,8 +8,6 @@ LL | println!("{}", false && { i = 5; true }); | ----- binding initialized here in some conditions LL | println!("{}", i); | ^ `i` used here but it is possibly-uninitialized - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr index 7f0ecf7b35965..9fd4ee9b99ba0 100644 --- a/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr +++ b/tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr @@ -8,7 +8,6 @@ LL | let x = defer(&vec!["Goodbye", "world!"]); LL | x.x[0]; | ------ borrow later used here | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider using a `let` binding to create a longer lived value | LL ~ let binding = vec!["Goodbye", "world!"]; diff --git a/tests/ui/borrowck/borrowck-break-uninit-2.stderr b/tests/ui/borrowck/borrowck-break-uninit-2.stderr index e23ca534e7454..03730e338ee0c 100644 --- a/tests/ui/borrowck/borrowck-break-uninit-2.stderr +++ b/tests/ui/borrowck/borrowck-break-uninit-2.stderr @@ -7,7 +7,6 @@ LL | let x: isize; LL | println!("{}", x); | ^ `x` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let x: isize = 42; diff --git a/tests/ui/borrowck/borrowck-break-uninit.stderr b/tests/ui/borrowck/borrowck-break-uninit.stderr index 0367d224f801d..6ed095f2e4a35 100644 --- a/tests/ui/borrowck/borrowck-break-uninit.stderr +++ b/tests/ui/borrowck/borrowck-break-uninit.stderr @@ -7,7 +7,6 @@ LL | let x: isize; LL | println!("{}", x); | ^ `x` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let x: isize = 42; diff --git a/tests/ui/borrowck/borrowck-or-init.stderr b/tests/ui/borrowck/borrowck-or-init.stderr index 7b43f2aee30e7..63c0c982351b3 100644 --- a/tests/ui/borrowck/borrowck-or-init.stderr +++ b/tests/ui/borrowck/borrowck-or-init.stderr @@ -8,8 +8,6 @@ LL | println!("{}", false || { i = 5; true }); | ----- binding initialized here in some conditions LL | println!("{}", i); | ^ `i` used here but it is possibly-uninitialized - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/borrowck-while-break.stderr b/tests/ui/borrowck/borrowck-while-break.stderr index e91af728b649e..68333ce0a75d3 100644 --- a/tests/ui/borrowck/borrowck-while-break.stderr +++ b/tests/ui/borrowck/borrowck-while-break.stderr @@ -8,8 +8,6 @@ LL | while cond { ... LL | println!("{}", v); | ^ `v` used here but it is possibly-uninitialized - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/issue-24267-flow-exit.stderr b/tests/ui/borrowck/issue-24267-flow-exit.stderr index 216f8d49b1b0e..e81f00f8c157d 100644 --- a/tests/ui/borrowck/issue-24267-flow-exit.stderr +++ b/tests/ui/borrowck/issue-24267-flow-exit.stderr @@ -7,7 +7,6 @@ LL | loop { x = break; } LL | println!("{}", x); | ^ `x` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let x: i32 = 42; @@ -22,7 +21,6 @@ LL | for _ in 0..10 { x = continue; } LL | println!("{}", x); | ^ `x` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let x: i32 = 42; diff --git a/tests/ui/borrowck/issue-47646.stderr b/tests/ui/borrowck/issue-47646.stderr index cfe6f3f399388..c8d48b76757a0 100644 --- a/tests/ui/borrowck/issue-47646.stderr +++ b/tests/ui/borrowck/issue-47646.stderr @@ -12,8 +12,6 @@ LL | println!("{:?}", heap); ... LL | }; | - ... and the mutable borrow might be used here, when that temporary is dropped and runs the destructor for type `(Option>, ())` - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/issue-64453.stderr b/tests/ui/borrowck/issue-64453.stderr index 29a7363705cd7..9136d6a7dc338 100644 --- a/tests/ui/borrowck/issue-64453.stderr +++ b/tests/ui/borrowck/issue-64453.stderr @@ -8,7 +8,6 @@ note: function `format` is not const --> $SRC_DIR/alloc/src/fmt.rs:LL:COL = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0507]: cannot move out of static item `settings_dir` --> $DIR/issue-64453.rs:13:37 diff --git a/tests/ui/borrowck/ownership-struct-update-moved-error.stderr b/tests/ui/borrowck/ownership-struct-update-moved-error.stderr index 83cfc7bb412cf..f081bea76b7a1 100644 --- a/tests/ui/borrowck/ownership-struct-update-moved-error.stderr +++ b/tests/ui/borrowck/ownership-struct-update-moved-error.stderr @@ -13,7 +13,6 @@ note: `Mine::make_string_bar` takes ownership of the receiver `self`, which move | LL | fn make_string_bar(mut self) -> Mine { | ^^^^ - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/suggest-assign-rvalue.stderr b/tests/ui/borrowck/suggest-assign-rvalue.stderr index daaef6e3892da..6ae893915aa99 100644 --- a/tests/ui/borrowck/suggest-assign-rvalue.stderr +++ b/tests/ui/borrowck/suggest-assign-rvalue.stderr @@ -19,7 +19,6 @@ LL | let my_float: f32; LL | println!("my_float: {}", my_float); | ^^^^^^^^ `my_float` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let my_float: f32 = 3.14159; @@ -33,7 +32,6 @@ LL | let demo: Demo; LL | println!("demo: {:?}", demo); | ^^^^ `demo` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let demo: Demo = Default::default(); @@ -47,7 +45,6 @@ LL | let demo_no: DemoNoDef; LL | println!("demo_no: {:?}", demo_no); | ^^^^^^^ `demo_no` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let demo_no: DemoNoDef = /* value */; @@ -61,7 +58,6 @@ LL | let arr: [i32; 5]; LL | println!("arr: {:?}", arr); | ^^^ `arr` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let arr: [i32; 5] = [42; 5]; @@ -75,7 +71,6 @@ LL | let foo: Vec<&str>; LL | println!("foo: {:?}", foo); | ^^^ `foo` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let foo: Vec<&str> = vec![]; @@ -89,7 +84,6 @@ LL | let my_string: String; LL | println!("my_string: {}", my_string); | ^^^^^^^^^ `my_string` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let my_string: String = Default::default(); @@ -103,7 +97,6 @@ LL | let my_int: &i32; LL | println!("my_int: {}", *my_int); | ^^^^^^^ `*my_int` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let my_int: &i32 = &42; @@ -117,7 +110,6 @@ LL | let hello: &str; LL | println!("hello: {}", hello); | ^^^^^ `hello` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let hello: &str = ""; @@ -130,8 +122,6 @@ LL | let never: !; | ----- binding declared here but left uninitialized LL | println!("never: {}", never); | ^^^^^ `never` used here but it isn't initialized - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 10 previous errors diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.stderr index 97ecdfab82059..4249dea10a360 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/arrays.stderr @@ -53,8 +53,6 @@ LL | println!("{}", arr[3]); ... LL | c(); | - mutable borrow later used here - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0502]: cannot borrow `arr` as immutable because it is also borrowed as mutable --> $DIR/arrays.rs:71:24 diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/box.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/box.stderr index 2e3259e640596..09143f44dc83c 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/box.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/box.stderr @@ -25,8 +25,6 @@ LL | println!("{}", e.0.0.m.x); LL | LL | c(); | - mutable borrow later used here - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0506]: cannot assign to `e.0.0.m.x` because it is borrowed --> $DIR/box.rs:55:5 diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr index 0e93e033c022c..f59be6b7a720d 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr @@ -7,7 +7,6 @@ LL | println!("{}", foo.x); = note: this struct is 1-byte aligned, but the type of this field may require higher alignment = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr index 68fdb3ce131f7..406f7c63b734b 100644 --- a/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr +++ b/tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr @@ -13,8 +13,6 @@ LL | println!("{:?}", p); LL | LL | c(); | - mutable borrow later used here - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/closures/issue-111932.stderr b/tests/ui/closures/issue-111932.stderr index fc3b7b0c6e662..2d10a2657aa00 100644 --- a/tests/ui/closures/issue-111932.stderr +++ b/tests/ui/closures/issue-111932.stderr @@ -17,7 +17,6 @@ LL | println!("{:?}", foo); | required by this formatting parameter | = help: the trait `Sized` is not implemented for `dyn Foo` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/codemap_tests/bad-format-args.stderr b/tests/ui/codemap_tests/bad-format-args.stderr index 8f79beaa9e1b7..ef0fa5f481e52 100644 --- a/tests/ui/codemap_tests/bad-format-args.stderr +++ b/tests/ui/codemap_tests/bad-format-args.stderr @@ -3,8 +3,6 @@ error: requires at least a format string argument | LL | format!(); | ^^^^^^^^^ - | - = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected `,`, found `1` --> $DIR/bad-format-args.rs:3:16 diff --git a/tests/ui/codemap_tests/tab_3.stderr b/tests/ui/codemap_tests/tab_3.stderr index 7ae21a57052fe..2a0a9e2d48f31 100644 --- a/tests/ui/codemap_tests/tab_3.stderr +++ b/tests/ui/codemap_tests/tab_3.stderr @@ -11,7 +11,6 @@ LL | println!("{:?}", some_vec); | note: `into_iter` takes ownership of the receiver `self`, which moves `some_vec` --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: you can `clone` the value and consume it, but this might not be your desired behavior | LL | some_vec.clone().into_iter(); diff --git a/tests/ui/const-generics/vec-macro-in-static-array.stderr b/tests/ui/const-generics/vec-macro-in-static-array.stderr index de21f2274f3a4..63d7b0c89fa1f 100644 --- a/tests/ui/const-generics/vec-macro-in-static-array.stderr +++ b/tests/ui/const-generics/vec-macro-in-static-array.stderr @@ -6,7 +6,6 @@ LL | static VEC: [u32; 256] = vec![]; | = note: expected array `[u32; 256]` found struct `Vec<_>` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/consts/const-eval/const_panic.stderr b/tests/ui/consts/const-eval/const_panic.stderr index a2036e834b0b7..8e0384b2f2af6 100644 --- a/tests/ui/consts/const-eval/const_panic.stderr +++ b/tests/ui/consts/const-eval/const_panic.stderr @@ -21,8 +21,6 @@ error[E0080]: evaluation panicked: not implemented | LL | const X: () = std::unimplemented!(); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `X` failed here - | - = note: this error originates in the macro `std::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: hello --> $DIR/const_panic.rs:19:15 @@ -59,8 +57,6 @@ error[E0080]: evaluation panicked: not implemented | LL | const X_CORE: () = core::unimplemented!(); | ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `X_CORE` failed here - | - = note: this error originates in the macro `core::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: hello --> $DIR/const_panic.rs:37:20 diff --git a/tests/ui/consts/const-eval/const_panic_2021.stderr b/tests/ui/consts/const-eval/const_panic_2021.stderr index ba771a35d0360..a0181ccca3910 100644 --- a/tests/ui/consts/const-eval/const_panic_2021.stderr +++ b/tests/ui/consts/const-eval/const_panic_2021.stderr @@ -21,8 +21,6 @@ error[E0080]: evaluation panicked: not implemented | LL | const D: () = std::unimplemented!(); | ^^^^^^^^^^^^^^^^^^^^^ evaluation of `D` failed here - | - = note: this error originates in the macro `std::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: hello --> $DIR/const_panic_2021.rs:18:15 @@ -53,8 +51,6 @@ error[E0080]: evaluation panicked: not implemented | LL | const D_CORE: () = core::unimplemented!(); | ^^^^^^^^^^^^^^^^^^^^^^ evaluation of `D_CORE` failed here - | - = note: this error originates in the macro `core::unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: hello --> $DIR/const_panic_2021.rs:33:20 diff --git a/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr b/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr index e07b172d426c1..a9dc43caf76ae 100644 --- a/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr +++ b/tests/ui/consts/const-eval/const_panic_libcore_bin.stderr @@ -15,8 +15,6 @@ error[E0080]: evaluation panicked: not implemented | LL | const X: () = unimplemented!(); | ^^^^^^^^^^^^^^^^ evaluation of `X` failed here - | - = note: this error originates in the macro `unimplemented` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/tests/ui/consts/const-eval/format.stderr b/tests/ui/consts/const-eval/format.stderr index 06bada8da011a..67bef0ce6c353 100644 --- a/tests/ui/consts/const-eval/format.stderr +++ b/tests/ui/consts/const-eval/format.stderr @@ -13,7 +13,6 @@ LL | println!("{:?}", 0); | ^^^^^^^^^^^^^^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const function `std::io::_print` in constant functions --> $DIR/format.rs:7:5 @@ -24,7 +23,6 @@ LL | println!("{:?}", 0); note: function `_print` is not const --> $SRC_DIR/std/src/io/stdio.rs:LL:COL = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const formatting macro in constant functions --> $DIR/format.rs:13:5 diff --git a/tests/ui/consts/const-eval/issue-44578.stderr b/tests/ui/consts/const-eval/issue-44578.stderr index fd0b9ae1e17d4..7625664f9ed65 100644 --- a/tests/ui/consts/const-eval/issue-44578.stderr +++ b/tests/ui/consts/const-eval/issue-44578.stderr @@ -23,8 +23,6 @@ note: erroneous constant encountered | LL | println!("{}", as Foo>::AMT); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) note: erroneous constant encountered --> $DIR/issue-44578.rs:26:20 @@ -33,7 +31,6 @@ LL | println!("{}", as Foo>::AMT); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` - = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/consts/control-flow/issue-50577.stderr b/tests/ui/consts/control-flow/issue-50577.stderr index 96b11f71bb3e3..6f62510c88017 100644 --- a/tests/ui/consts/control-flow/issue-50577.stderr +++ b/tests/ui/consts/control-flow/issue-50577.stderr @@ -3,8 +3,6 @@ error[E0308]: mismatched types | LL | Drop = assert_eq!(1, 1), | ^^^^^^^^^^^^^^^^ expected `isize`, found `()` - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr b/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr index 8e52a7aa35e1e..f6ddb19f9634c 100644 --- a/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr +++ b/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr @@ -3,8 +3,6 @@ error[E0010]: allocations are not allowed in constant functions | LL | vec![1, 2, 3] | ^^^^^^^^^^^^^ allocation not allowed in constant functions - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in constant functions --> $DIR/bad_const_fn_body_ice.rs:2:5 @@ -13,7 +11,6 @@ LL | vec![1, 2, 3] | ^^^^^^^^^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/consts/recursive-const-in-impl.stderr b/tests/ui/consts/recursive-const-in-impl.stderr index ec5ad52fadd42..c53ce701566ed 100644 --- a/tests/ui/consts/recursive-const-in-impl.stderr +++ b/tests/ui/consts/recursive-const-in-impl.stderr @@ -6,7 +6,6 @@ LL | println!("{}", Thing::::X); | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "14"]` attribute to your crate (`recursive_const_in_impl`) = note: query depth increased by 9 when simplifying constant for the type system `main::promoted[0]` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/coroutine/yield-while-ref-reborrowed.stderr b/tests/ui/coroutine/yield-while-ref-reborrowed.stderr index 0b2cc92f4b4af..836360b873038 100644 --- a/tests/ui/coroutine/yield-while-ref-reborrowed.stderr +++ b/tests/ui/coroutine/yield-while-ref-reborrowed.stderr @@ -10,8 +10,6 @@ LL | println!("{}", x); | ^ second borrow occurs here LL | Pin::new(&mut b).resume(()); | ------ first borrow later used here - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/delegation/ice-line-bounds-issue-148732.stderr b/tests/ui/delegation/ice-line-bounds-issue-148732.stderr index f34ac0ea306c7..83cc238b5e0c4 100644 --- a/tests/ui/delegation/ice-line-bounds-issue-148732.stderr +++ b/tests/ui/delegation/ice-line-bounds-issue-148732.stderr @@ -3,8 +3,6 @@ error[E0106]: missing lifetime specifier | LL | dbg!(b); | ^^^^^^^ expected named lifetime parameter - | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `a` in this scope --> $DIR/ice-line-bounds-issue-148732.rs:1:7 @@ -37,7 +35,6 @@ LL | dbg!(b); | ^^^^^^^ the trait `Debug` is not implemented for fn item `fn() {b}` | = help: use parentheses to call this function: `b()` - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/derives/nonsense-input-to-debug.stderr b/tests/ui/derives/nonsense-input-to-debug.stderr index 7c97ca93cfc9d..207d7b1969de5 100644 --- a/tests/ui/derives/nonsense-input-to-debug.stderr +++ b/tests/ui/derives/nonsense-input-to-debug.stderr @@ -13,8 +13,6 @@ LL | should_be_vec_t: vec![T], | expected type | in this macro invocation | this macro call doesn't expand to a type - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0392]: type parameter `T` is never used --> $DIR/nonsense-input-to-debug.rs:5:17 diff --git a/tests/ui/error-codes/E0010-teach.stderr b/tests/ui/error-codes/E0010-teach.stderr index 82bbe01aef792..9318e8df7e25c 100644 --- a/tests/ui/error-codes/E0010-teach.stderr +++ b/tests/ui/error-codes/E0010-teach.stderr @@ -5,7 +5,6 @@ LL | const CON: Vec = vec![1, 2, 3]; | ^^^^^^^^^^^^^ allocation not allowed in constants | = note: The runtime heap is not yet available at compile-time, so no runtime heap allocations can be created. - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in constants --> $DIR/E0010-teach.rs:5:23 @@ -14,7 +13,6 @@ LL | const CON: Vec = vec![1, 2, 3]; | ^^^^^^^^^^^^^ | = note: calls in constants are limited to constant functions, tuple structs and tuple variants - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/error-codes/E0010.stderr b/tests/ui/error-codes/E0010.stderr index 87b722b5f6566..d08b7f90afb42 100644 --- a/tests/ui/error-codes/E0010.stderr +++ b/tests/ui/error-codes/E0010.stderr @@ -3,8 +3,6 @@ error[E0010]: allocations are not allowed in constants | LL | const CON: Vec = vec![1, 2, 3]; | ^^^^^^^^^^^^^ allocation not allowed in constants - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in constants --> $DIR/E0010.rs:3:23 @@ -13,7 +11,6 @@ LL | const CON: Vec = vec![1, 2, 3]; | ^^^^^^^^^^^^^ | = note: calls in constants are limited to constant functions, tuple structs and tuple variants - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/errors/span-format_args-issue-140578.stderr b/tests/ui/errors/span-format_args-issue-140578.stderr index 6a273e5cd515c..b5394b6c33afc 100644 --- a/tests/ui/errors/span-format_args-issue-140578.stderr +++ b/tests/ui/errors/span-format_args-issue-140578.stderr @@ -3,40 +3,30 @@ error[E0282]: type annotations needed | LL | print!("{:?} {a} {a:?}", [], a = 1 + 1); | ^^ cannot infer type - | - = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the macro `print` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0282]: type annotations needed --> $DIR/span-format_args-issue-140578.rs:7:30 | LL | println!("{:?} {a} {a:?}", [], a = 1 + 1); | ^^ cannot infer type - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0282]: type annotations needed --> $DIR/span-format_args-issue-140578.rs:12:35 | LL | println!("{:?} {:?} {a} {a:?}", [], [], a = 1 + 1); | ^^ cannot infer type - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0282]: type annotations needed --> $DIR/span-format_args-issue-140578.rs:17:41 | LL | println!("{:?} {:?} {a} {a:?} {b:?}", [], [], a = 1 + 1, b = []); | ^^ cannot infer type - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0282]: type annotations needed --> $DIR/span-format_args-issue-140578.rs:26:9 | LL | [], | ^^ cannot infer type - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/tests/ui/expr/if/assert-macro-without-else.stderr b/tests/ui/expr/if/assert-macro-without-else.stderr index 74179ba899f5f..98f22607bea7d 100644 --- a/tests/ui/expr/if/assert-macro-without-else.stderr +++ b/tests/ui/expr/if/assert-macro-without-else.stderr @@ -11,16 +11,12 @@ error[E0308]: mismatched types | LL | assert_eq!(1, 1) | ^^^^^^^^^^^^^^^^ expected `i32`, found `()` - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/assert-macro-without-else.rs:14:5 | LL | assert_ne!(1, 2) | ^^^^^^^^^^^^^^^^ expected `bool`, found `()` - | - = note: this error originates in the macro `assert_ne` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/assert-macro-without-else.rs:26:9 diff --git a/tests/ui/feature-gates/feature-gate-global-registration.stderr b/tests/ui/feature-gates/feature-gate-global-registration.stderr index 70538ae6f317d..5da1721d99dd7 100644 --- a/tests/ui/feature-gates/feature-gate-global-registration.stderr +++ b/tests/ui/feature-gates/feature-gate-global-registration.stderr @@ -6,8 +6,6 @@ LL | todo!(); | | | expected one of `!` or `::` | in this macro invocation - | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/fmt/format-args-argument-span.stderr b/tests/ui/fmt/format-args-argument-span.stderr index d46cfb438cf6f..a486abe821b74 100644 --- a/tests/ui/fmt/format-args-argument-span.stderr +++ b/tests/ui/fmt/format-args-argument-span.stderr @@ -6,7 +6,6 @@ LL | println!("{x:?} {x} {x:?}"); | = help: the trait `std::fmt::Display` is not implemented for `Option<{integer}>` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `Option<{integer}>` doesn't implement `std::fmt::Display` --> $DIR/format-args-argument-span.rs:15:37 @@ -18,7 +17,6 @@ LL | println!("{x:?} {x} {x:?}", x = Some(1)); | = help: the trait `std::fmt::Display` is not implemented for `Option<{integer}>` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `DisplayOnly` doesn't implement `Debug` --> $DIR/format-args-argument-span.rs:18:19 @@ -28,7 +26,6 @@ LL | println!("{x} {x:?} {x}"); | = help: the trait `Debug` is not implemented for `DisplayOnly` = note: add `#[derive(Debug)]` to `DisplayOnly` or manually `impl Debug for DisplayOnly` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `DisplayOnly` with `#[derive(Debug)]` | LL + #[derive(Debug)] @@ -45,7 +42,6 @@ LL | println!("{x} {x:?} {x}", x = DisplayOnly); | = help: the trait `Debug` is not implemented for `DisplayOnly` = note: add `#[derive(Debug)]` to `DisplayOnly` or manually `impl Debug for DisplayOnly` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `DisplayOnly` with `#[derive(Debug)]` | LL + #[derive(Debug)] diff --git a/tests/ui/fmt/ifmt-bad-arg.stderr b/tests/ui/fmt/ifmt-bad-arg.stderr index b565b836f211e..9018482e70782 100644 --- a/tests/ui/fmt/ifmt-bad-arg.stderr +++ b/tests/ui/fmt/ifmt-bad-arg.stderr @@ -320,7 +320,6 @@ LL | println!("{} {:.*} {}", 1, 3.2, 4); found reference `&{float}` note: associated function defined here --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/ifmt-bad-arg.rs:81:35 @@ -334,7 +333,6 @@ LL | println!("{} {:07$.*} {}", 1, 3.2, 4); found reference `&{float}` note: associated function defined here --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 38 previous errors diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr index 5e80f892dcb5b..5e97e69c7cf31 100644 --- a/tests/ui/fmt/ifmt-unimpl.stderr +++ b/tests/ui/fmt/ifmt-unimpl.stderr @@ -17,7 +17,6 @@ LL | format!("{:X}", "3"); i32 and 9 others = note: required for `&str` to implement `UpperHex` - = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/fmt/non-source-literals.stderr b/tests/ui/fmt/non-source-literals.stderr index 5f042e1e631ae..953a4a64fd8dc 100644 --- a/tests/ui/fmt/non-source-literals.stderr +++ b/tests/ui/fmt/non-source-literals.stderr @@ -10,7 +10,6 @@ help: the trait `std::fmt::Display` is not implemented for `NonDisplay` LL | pub struct NonDisplay; | ^^^^^^^^^^^^^^^^^^^^^ = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `NonDisplay` doesn't implement `std::fmt::Display` --> $DIR/non-source-literals.rs:10:45 @@ -24,7 +23,6 @@ help: the trait `std::fmt::Display` is not implemented for `NonDisplay` LL | pub struct NonDisplay; | ^^^^^^^^^^^^^^^^^^^^^ = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `NonDebug` doesn't implement `Debug` --> $DIR/non-source-literals.rs:11:42 @@ -34,7 +32,6 @@ LL | let _ = format!(concat!("{:", "?}"), NonDebug); | = help: the trait `Debug` is not implemented for `NonDebug` = note: add `#[derive(Debug)]` to `NonDebug` or manually `impl Debug for NonDebug` - = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `NonDebug` with `#[derive(Debug)]` | LL + #[derive(Debug)] @@ -49,7 +46,6 @@ LL | let _ = format!(concat!("{", "0", ":?}"), NonDebug); | = help: the trait `Debug` is not implemented for `NonDebug` = note: add `#[derive(Debug)]` to `NonDebug` or manually `impl Debug for NonDebug` - = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `NonDebug` with `#[derive(Debug)]` | LL + #[derive(Debug)] diff --git a/tests/ui/impl-trait/precise-capturing/migration-note.stderr b/tests/ui/impl-trait/precise-capturing/migration-note.stderr index 880e7878477af..fef0a85bf1aeb 100644 --- a/tests/ui/impl-trait/precise-capturing/migration-note.stderr +++ b/tests/ui/impl-trait/precise-capturing/migration-note.stderr @@ -282,7 +282,6 @@ note: this call may capture more lifetimes than intended, because Rust 2024 has | LL | let x = { let x = display_len(&mut vec![0]); x }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) help: use the precise capturing `use<...>` syntax to make the captures explicit | LL | fn display_len(x: &Vec) -> impl Display + use { diff --git a/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr b/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr index 3de317d2af6d1..ff668f88d4d15 100644 --- a/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr +++ b/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr @@ -3,8 +3,6 @@ error[E0282]: type annotations needed | LL | println!("{:?}", []); | ^^ cannot infer type - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/issues/issue-42796.stderr b/tests/ui/issues/issue-42796.stderr index 670b98c770898..0e7ce9e98c4d7 100644 --- a/tests/ui/issues/issue-42796.stderr +++ b/tests/ui/issues/issue-42796.stderr @@ -9,7 +9,6 @@ LL | let mut s_copy = s; LL | println!("{}", s); | ^ value borrowed here after move | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider cloning the value if the performance cost is acceptable | LL | let mut s_copy = s.clone(); diff --git a/tests/ui/iterators/iter-macro-not-async-closure.stderr b/tests/ui/iterators/iter-macro-not-async-closure.stderr index 2f0343a2d0d62..906ebd482fb6f 100644 --- a/tests/ui/iterators/iter-macro-not-async-closure.stderr +++ b/tests/ui/iterators/iter-macro-not-async-closure.stderr @@ -35,7 +35,6 @@ note: required by a bound in `call_async_once` | LL | async fn call_async_once(f: impl AsyncFnOnce()) { | ^^^^^^^^^^^^^ required by this bound in `call_async_once` - = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied --> $DIR/iter-macro-not-async-closure.rs:25:13 @@ -48,7 +47,6 @@ note: required by a bound in `call_async_once` | LL | async fn call_async_once(f: impl AsyncFnOnce()) { | ^^^^^^^^^^^^^ required by this bound in `call_async_once` - = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `{gen closure@$DIR/iter-macro-not-async-closure.rs:19:21: 19:28}: AsyncFnOnce()` is not satisfied --> $DIR/iter-macro-not-async-closure.rs:30:5 diff --git a/tests/ui/lifetimes/borrowck-let-suggestion.stderr b/tests/ui/lifetimes/borrowck-let-suggestion.stderr index 4703d7f10dc28..6a35f61708d23 100644 --- a/tests/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/tests/ui/lifetimes/borrowck-let-suggestion.stderr @@ -9,7 +9,6 @@ LL | LL | x.use_mut(); | - borrow later used here | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider consuming the `Vec` when turning it into an `Iterator` | LL | let mut x = vec![1].into_iter(); diff --git a/tests/ui/lint/dead-code/closure-bang.stderr b/tests/ui/lint/dead-code/closure-bang.stderr index a0f5962dfe024..c2f83c17179c1 100644 --- a/tests/ui/lint/dead-code/closure-bang.stderr +++ b/tests/ui/lint/dead-code/closure-bang.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/lint/fn-ptr-comparisons-some.stderr b/tests/ui/lint/fn-ptr-comparisons-some.stderr index 522c4399bce1d..8674ce5e4a886 100644 --- a/tests/ui/lint/fn-ptr-comparisons-some.stderr +++ b/tests/ui/lint/fn-ptr-comparisons-some.stderr @@ -18,7 +18,6 @@ LL | assert_eq!(Some::(func), Some(func as unsafe extern "C" fn())); = note: the address of the same function can vary between different codegen units = note: furthermore, different functions could have the same address after being merged together = note: for more information visit - = note: this warning originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) warning: 2 warnings emitted diff --git a/tests/ui/lint/fn-ptr-comparisons-weird.stderr b/tests/ui/lint/fn-ptr-comparisons-weird.stderr index 2014e519c2538..3c76e05016f5c 100644 --- a/tests/ui/lint/fn-ptr-comparisons-weird.stderr +++ b/tests/ui/lint/fn-ptr-comparisons-weird.stderr @@ -61,7 +61,6 @@ LL | let _ = assert_eq!(g, g); = note: the address of the same function can vary between different codegen units = note: furthermore, different functions could have the same address after being merged together = note: for more information visit - = note: this warning originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique --> $DIR/fn-ptr-comparisons-weird.rs:35:13 @@ -72,7 +71,6 @@ LL | let _ = assert_ne!(g, g); = note: the address of the same function can vary between different codegen units = note: furthermore, different functions could have the same address after being merged together = note: for more information visit - = note: this warning originates in the macro `assert_ne` (in Nightly builds, run with -Z macro-backtrace for more info) warning: 7 warnings emitted diff --git a/tests/ui/liveness/liveness-move-in-while.stderr b/tests/ui/liveness/liveness-move-in-while.stderr index dc48c4cc9acfc..1bb97ad68c7c4 100644 --- a/tests/ui/liveness/liveness-move-in-while.stderr +++ b/tests/ui/liveness/liveness-move-in-while.stderr @@ -35,7 +35,6 @@ LL | while true { while true { while true { x = y; x.clone(); } } } | | inside of this loop | inside of this loop | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider cloning the value if the performance cost is acceptable | LL | while true { while true { while true { x = y.clone(); x.clone(); } } } diff --git a/tests/ui/liveness/liveness-use-after-move.stderr b/tests/ui/liveness/liveness-use-after-move.stderr index eab51edca37f4..a94ceae79d562 100644 --- a/tests/ui/liveness/liveness-use-after-move.stderr +++ b/tests/ui/liveness/liveness-use-after-move.stderr @@ -9,7 +9,6 @@ LL | LL | println!("{}", *x); | ^^ value borrowed here after move | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider cloning the value if the performance cost is acceptable | LL | let y = x.clone(); diff --git a/tests/ui/liveness/liveness-use-after-send.stderr b/tests/ui/liveness/liveness-use-after-send.stderr index 2323451a7d2df..da682325347c1 100644 --- a/tests/ui/liveness/liveness-use-after-send.stderr +++ b/tests/ui/liveness/liveness-use-after-send.stderr @@ -13,7 +13,6 @@ note: consider changing this parameter type in function `send` to borrow instead | LL | fn send(ch: Chan, data: T) { | ---- in this function ^ this parameter takes ownership of the value - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider cloning the value if the performance cost is acceptable | LL | send(ch, message.clone()); diff --git a/tests/ui/loops/loop-proper-liveness.stderr b/tests/ui/loops/loop-proper-liveness.stderr index cd4c064bcd19c..5432043c7d242 100644 --- a/tests/ui/loops/loop-proper-liveness.stderr +++ b/tests/ui/loops/loop-proper-liveness.stderr @@ -7,7 +7,6 @@ LL | let x: i32; LL | println!("{:?}", x); | ^ `x` used here but it isn't initialized | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | LL | let x: i32 = 42; diff --git a/tests/ui/macros/assert.with-generic-asset.stderr b/tests/ui/macros/assert.with-generic-asset.stderr index 51d8f28a35c39..5233468306620 100644 --- a/tests/ui/macros/assert.with-generic-asset.stderr +++ b/tests/ui/macros/assert.with-generic-asset.stderr @@ -15,8 +15,6 @@ error: macro requires a boolean expression as an argument | LL | debug_assert!(); | ^^^^^^^^^^^^^^^ boolean expression required - | - = note: this error originates in the macro `debug_assert` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found keyword `struct` --> $DIR/assert.rs:8:19 diff --git a/tests/ui/macros/assert.without-generic-asset.stderr b/tests/ui/macros/assert.without-generic-asset.stderr index 51d8f28a35c39..5233468306620 100644 --- a/tests/ui/macros/assert.without-generic-asset.stderr +++ b/tests/ui/macros/assert.without-generic-asset.stderr @@ -15,8 +15,6 @@ error: macro requires a boolean expression as an argument | LL | debug_assert!(); | ^^^^^^^^^^^^^^^ boolean expression required - | - = note: this error originates in the macro `debug_assert` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found keyword `struct` --> $DIR/assert.rs:8:19 diff --git a/tests/ui/macros/failed-to-reparse-issue-139445.stderr b/tests/ui/macros/failed-to-reparse-issue-139445.stderr index 6f7d88fb34466..fc3a2645e25e9 100644 --- a/tests/ui/macros/failed-to-reparse-issue-139445.stderr +++ b/tests/ui/macros/failed-to-reparse-issue-139445.stderr @@ -9,16 +9,12 @@ error: expected `while`, `for`, `loop` or `{` after a label | LL | assert_eq!(3, 'a,) | ^^^^^^^^^^^^^^^^^^ expected `while`, `for`, `loop` or `{` after a label - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found `` --> $DIR/failed-to-reparse-issue-139445.rs:2:5 | LL | assert_eq!(3, 'a,) | ^^^^^^^^^^^^^^^^^^ expected expression - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/tests/ui/macros/format-parse-errors.stderr b/tests/ui/macros/format-parse-errors.stderr index f9ea4c63377b0..baa29170a7d46 100644 --- a/tests/ui/macros/format-parse-errors.stderr +++ b/tests/ui/macros/format-parse-errors.stderr @@ -3,8 +3,6 @@ error: requires at least a format string argument | LL | format!(); | ^^^^^^^^^ - | - = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected expression, found keyword `struct` --> $DIR/format-parse-errors.rs:5:13 diff --git a/tests/ui/macros/macro-expansion-empty-span-147255.stderr b/tests/ui/macros/macro-expansion-empty-span-147255.stderr index 99396622b34eb..cea691679988e 100644 --- a/tests/ui/macros/macro-expansion-empty-span-147255.stderr +++ b/tests/ui/macros/macro-expansion-empty-span-147255.stderr @@ -8,7 +8,6 @@ LL | println!("{}", x_str); | = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/macros/macro-local-data-key-priv.stderr b/tests/ui/macros/macro-local-data-key-priv.stderr index 8df1aec140d0e..2aced92c41524 100644 --- a/tests/ui/macros/macro-local-data-key-priv.stderr +++ b/tests/ui/macros/macro-local-data-key-priv.stderr @@ -9,7 +9,6 @@ note: the constant `baz` is defined here | LL | thread_local!(static baz: f64 = 0.0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/macros/vec-macro-in-pattern.stderr b/tests/ui/macros/vec-macro-in-pattern.stderr index 71ba0ea5ad4f5..e5723efc0b2df 100644 --- a/tests/ui/macros/vec-macro-in-pattern.stderr +++ b/tests/ui/macros/vec-macro-in-pattern.stderr @@ -5,7 +5,6 @@ LL | Some(vec![43]) => {} | ^^^^^^^^ not a tuple struct or tuple variant | = note: function calls are not allowed in patterns: - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: usage of qualified paths in this context is experimental --> $DIR/vec-macro-in-pattern.rs:7:14 @@ -16,7 +15,6 @@ LL | Some(vec![43]) => {} = note: see issue #86935 for more information = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0164]: expected tuple struct or tuple variant, found associated function `<[_]>::into_vec` --> $DIR/vec-macro-in-pattern.rs:7:14 @@ -25,7 +23,6 @@ LL | Some(vec![43]) => {} | ^^^^^^^^ `fn` calls are not allowed in patterns | = help: for more information, visit https://doc.rust-lang.org/book/ch19-00-patterns.html - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/tests/ui/mismatched_types/mismatched-types-issue-126222.stderr b/tests/ui/mismatched_types/mismatched-types-issue-126222.stderr index 6843cb65a8cdf..09ba15253dc58 100644 --- a/tests/ui/mismatched_types/mismatched-types-issue-126222.stderr +++ b/tests/ui/mismatched_types/mismatched-types-issue-126222.stderr @@ -4,7 +4,6 @@ error[E0308]: mismatched types LL | x => dbg!(x), | ^^^^^^^ expected `()`, found integer | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: you might have meant to return this value | LL | x => return dbg!(x), @@ -16,7 +15,6 @@ error[E0308]: mismatched types LL | dbg!(x) | ^^^^^^^ expected `()`, found integer | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: you might have meant to return this value | LL | return dbg!(x) @@ -28,7 +26,6 @@ error[E0308]: mismatched types LL | _ => dbg!(1) | ^^^^^^^ expected `()`, found integer | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: you might have meant to return this value | LL | _ => return dbg!(1) @@ -40,7 +37,6 @@ error[E0308]: mismatched types LL | _ => {dbg!(1)} | ^^^^^^^ expected `()`, found integer | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: you might have meant to return this value | LL | _ => {return dbg!(1)} diff --git a/tests/ui/modules/issue-107649.stderr b/tests/ui/modules/issue-107649.stderr index 45cb29d10ec2c..40dda93ad015c 100644 --- a/tests/ui/modules/issue-107649.stderr +++ b/tests/ui/modules/issue-107649.stderr @@ -5,7 +5,6 @@ error[E0277]: `Dummy` doesn't implement `Debug` | ^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `Dummy` | = note: add `#[derive(Debug)]` to `Dummy` or manually `impl Debug for Dummy` - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `Dummy` with `#[derive(Debug)]` --> $DIR/auxiliary/dummy_lib.rs:2:1 | diff --git a/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr b/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr index 17049fe67318d..ba729493c9b7b 100644 --- a/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr +++ b/tests/ui/moves/moves-based-on-type-capture-clause-bad.stderr @@ -11,7 +11,6 @@ LL | }); LL | println!("{}", x); | ^ value borrowed here after move | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider cloning the value before moving it into the closure | LL ~ let value = x.clone(); diff --git a/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr b/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr index dc38b8c127e54..e16300886b0b9 100644 --- a/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr +++ b/tests/ui/nll/polonius/nll-problem-case-3-issue-21906.nll.stderr @@ -59,8 +59,6 @@ LL | return Some(y); ... LL | println!("{:?}", x.data); | ^^^^^^ immutable borrow occurs here - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0499]: cannot borrow `*vec` as mutable more than once at a time --> $DIR/nll-problem-case-3-issue-21906.rs:77:9 diff --git a/tests/ui/on-unimplemented/no-debug.stderr b/tests/ui/on-unimplemented/no-debug.stderr index 1e6fa7d52fa01..3c3b8d2e20541 100644 --- a/tests/ui/on-unimplemented/no-debug.stderr +++ b/tests/ui/on-unimplemented/no-debug.stderr @@ -8,7 +8,6 @@ LL | println!("{:?} {:?}", Foo, Bar); | = help: the trait `Debug` is not implemented for `Foo` = note: add `#[derive(Debug)]` to `Foo` or manually `impl Debug for Foo` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `Foo` with `#[derive(Debug)]` | LL + #[derive(Debug)] @@ -24,7 +23,6 @@ LL | println!("{:?} {:?}", Foo, Bar); | required by this formatting parameter | = help: the trait `Debug` is not implemented for `Bar` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `Foo` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:11:23 @@ -40,7 +38,6 @@ help: the trait `std::fmt::Display` is not implemented for `Foo` LL | struct Foo; | ^^^^^^^^^^ = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `Bar` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:11:28 @@ -52,7 +49,6 @@ LL | println!("{} {}", Foo, Bar); | = help: the trait `std::fmt::Display` is not implemented for `Bar` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr b/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr index 43b0ad18a79b7..40615633ea48e 100644 --- a/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr +++ b/tests/ui/pattern/deref-patterns/ice-adjust-mode-unimplemented-for-constblock.stderr @@ -5,7 +5,6 @@ LL | let vec![const { vec![] }]: Vec = vec![]; | ^^^^^^^^^^^^^^^^^^^^^^ not a tuple struct or tuple variant | = note: function calls are not allowed in patterns: - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: usage of qualified paths in this context is experimental --> $DIR/ice-adjust-mode-unimplemented-for-constblock.rs:5:9 @@ -16,7 +15,6 @@ LL | let vec![const { vec![] }]: Vec = vec![]; = note: see issue #86935 for more information = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: arbitrary expressions aren't allowed in patterns --> $DIR/ice-adjust-mode-unimplemented-for-constblock.rs:5:14 @@ -33,7 +31,6 @@ LL | let vec![const { vec![] }]: Vec = vec![]; | ^^^^^^^^^^^^^^^^^^^^^^ `fn` calls are not allowed in patterns | = help: for more information, visit https://doc.rust-lang.org/book/ch19-00-patterns.html - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr b/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr index 4ecc6370d3caa..347ec0a7743ec 100644 --- a/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr +++ b/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr @@ -10,7 +10,6 @@ LL | stuff(phantom_pinned) | -------------- borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0716]: temporary value dropped while borrowed --> $DIR/lifetime_errors_on_promotion_misusage.rs:18:30 @@ -24,7 +23,6 @@ LL | }; | - temporary value is freed at the end of this statement | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/reachable/expr_again.stderr b/tests/ui/reachable/expr_again.stderr index 5dec512ba5def..2e00fdc7b4315 100644 --- a/tests/ui/reachable/expr_again.stderr +++ b/tests/ui/reachable/expr_again.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/reachable/expr_block.stderr b/tests/ui/reachable/expr_block.stderr index d5f248a24910e..aaca4053f27f9 100644 --- a/tests/ui/reachable/expr_block.stderr +++ b/tests/ui/reachable/expr_block.stderr @@ -19,8 +19,6 @@ LL | return; | ------ any code following this expression is unreachable LL | println!("foo"); | ^^^^^^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/reachable/expr_if.stderr b/tests/ui/reachable/expr_if.stderr index ebd0b5a3ebefc..662692ed6f282 100644 --- a/tests/ui/reachable/expr_if.stderr +++ b/tests/ui/reachable/expr_if.stderr @@ -23,8 +23,6 @@ LL | return; ... LL | println!("But I am."); | ^^^^^^^^^^^^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/reachable/expr_loop.stderr b/tests/ui/reachable/expr_loop.stderr index 9185846860507..83b8d024c4fca 100644 --- a/tests/ui/reachable/expr_loop.stderr +++ b/tests/ui/reachable/expr_loop.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:21:5 @@ -20,8 +19,6 @@ LL | loop { return; } | ------ any code following this expression is unreachable LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_loop.rs:32:5 @@ -30,8 +27,6 @@ LL | loop { 'middle: loop { loop { break 'middle; } } } | -------------------------------------------------- any code following this expression is unreachable LL | println!("I am dead."); | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/tests/ui/reachable/expr_match.stderr b/tests/ui/reachable/expr_match.stderr index ae202a6e0c34a..92f6d6758d998 100644 --- a/tests/ui/reachable/expr_match.stderr +++ b/tests/ui/reachable/expr_match.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/expr_match.rs:19:5 @@ -20,8 +19,6 @@ LL | match () { () if false => return, () => return } | ------------------------------------------------ any code following this `match` expression is unreachable, as all arms diverge LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable expression --> $DIR/expr_match.rs:25:25 @@ -42,8 +39,6 @@ LL | | } | |_____- any code following this `match` expression is unreachable, as all arms diverge LL | println!("I am dead"); | ^^^^^^^^^^^^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/reachable/unreachable-code-ret.stderr b/tests/ui/reachable/unreachable-code-ret.stderr index d86def536df8d..f51273eb42071 100644 --- a/tests/ui/reachable/unreachable-code-ret.stderr +++ b/tests/ui/reachable/unreachable-code-ret.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/resolve/underscore-bindings-disambiguators.stderr b/tests/ui/resolve/underscore-bindings-disambiguators.stderr index ec14ede03e3ff..9208b84c43a2f 100644 --- a/tests/ui/resolve/underscore-bindings-disambiguators.stderr +++ b/tests/ui/resolve/underscore-bindings-disambiguators.stderr @@ -21,48 +21,36 @@ error[E0080]: evaluation panicked: not yet implemented | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here - | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: not yet implemented --> $DIR/underscore-bindings-disambiguators.rs:20:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here - | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: not yet implemented --> $DIR/underscore-bindings-disambiguators.rs:21:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here - | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: not yet implemented --> $DIR/underscore-bindings-disambiguators.rs:22:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here - | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: not yet implemented --> $DIR/underscore-bindings-disambiguators.rs:23:19 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `impls::_` failed here - | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation panicked: not yet implemented --> $DIR/underscore-bindings-disambiguators.rs:28:15 | LL | const _: () = todo!(); | ^^^^^^^ evaluation of `_` failed here - | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 8 previous errors diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/diverge-causes-unreachable-code.stderr b/tests/ui/rfcs/rfc-0000-never_patterns/diverge-causes-unreachable-code.stderr index c33a5855d5068..a55d540dc7f29 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/diverge-causes-unreachable-code.stderr +++ b/tests/ui/rfcs/rfc-0000-never_patterns/diverge-causes-unreachable-code.stderr @@ -11,7 +11,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::print` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/diverge-causes-unreachable-code.rs:16:5 @@ -20,8 +19,6 @@ LL | fn ref_never_arg(&!: &Void) -> u32 { | -- any code following a never pattern is unreachable LL | println!(); | ^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `$crate::print` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/diverge-causes-unreachable-code.rs:25:5 @@ -31,8 +28,6 @@ LL | let ! = *ptr; LL | } LL | println!(); | ^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `$crate::print` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable statement --> $DIR/diverge-causes-unreachable-code.rs:34:5 @@ -42,8 +37,6 @@ LL | match *ptr { ! }; LL | } LL | println!(); | ^^^^^^^^^^ unreachable statement - | - = note: this error originates in the macro `$crate::print` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr index fdf5115303ba8..f8ef315b9cc78 100644 --- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr +++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr @@ -8,7 +8,6 @@ LL | let _ = dbg!(a); LL | let _ = dbg!(a); | ^^^^^^^ value used here after move | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider borrowing instead of transferring ownership | LL | let _ = dbg!(&a); diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr index 2c4ce2676b070..4cdeb184bd915 100644 --- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr +++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr @@ -5,7 +5,6 @@ LL | let _: NotDebug = dbg!(NotDebug); | ^^^^^^^^^^^^^^ the trait `Debug` is not implemented for `NotDebug` | = note: add `#[derive(Debug)]` to `NotDebug` or manually `impl Debug for NotDebug` - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `NotDebug` with `#[derive(Debug)]` | LL + #[derive(Debug)] diff --git a/tests/ui/span/coerce-suggestions.stderr b/tests/ui/span/coerce-suggestions.stderr index 77b01ee08b791..d0f76a23edc45 100644 --- a/tests/ui/span/coerce-suggestions.stderr +++ b/tests/ui/span/coerce-suggestions.stderr @@ -56,8 +56,6 @@ error[E0308]: mismatched types | LL | s = format!("foo"); | ^^^^^^^^^^^^^^ expected `&mut String`, found `String` - | - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/tests/ui/span/issue-33884.stderr b/tests/ui/span/issue-33884.stderr index 29490d86fffe7..a5c3e9fa7c457 100644 --- a/tests/ui/span/issue-33884.stderr +++ b/tests/ui/span/issue-33884.stderr @@ -3,8 +3,6 @@ error[E0308]: mismatched types | LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Arguments<'_>`, found `String` - | - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/span/issue-39698.stderr b/tests/ui/span/issue-39698.stderr index eb18969c3c0db..dd57fa0618665 100644 --- a/tests/ui/span/issue-39698.stderr +++ b/tests/ui/span/issue-39698.stderr @@ -71,8 +71,6 @@ LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?} | | binding initialized here in some conditions | binding initialized here in some conditions | binding declared here but left uninitialized - | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/tests/ui/span/slice-borrow.stderr b/tests/ui/span/slice-borrow.stderr index 48ac20feea721..6d37019e91b43 100644 --- a/tests/ui/span/slice-borrow.stderr +++ b/tests/ui/span/slice-borrow.stderr @@ -10,7 +10,6 @@ LL | y.use_ref(); | - borrow later used here | = note: consider using a `let` binding to create a longer lived value - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/statics/check-values-constraints.stderr b/tests/ui/statics/check-values-constraints.stderr index c54f4830533ae..082dd34906039 100644 --- a/tests/ui/statics/check-values-constraints.stderr +++ b/tests/ui/statics/check-values-constraints.stderr @@ -16,8 +16,6 @@ error[E0010]: allocations are not allowed in statics | LL | static STATIC11: Vec = vec![MyOwned]; | ^^^^^^^^^^^^^ allocation not allowed in statics - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in statics --> $DIR/check-values-constraints.rs:81:33 @@ -27,7 +25,6 @@ LL | static STATIC11: Vec = vec![MyOwned]; | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `::to_string` in statics --> $DIR/check-values-constraints.rs:92:38 @@ -50,8 +47,6 @@ error[E0010]: allocations are not allowed in statics | LL | vec![MyOwned], | ^^^^^^^^^^^^^ allocation not allowed in statics - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in statics --> $DIR/check-values-constraints.rs:96:5 @@ -61,15 +56,12 @@ LL | vec![MyOwned], | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0010]: allocations are not allowed in statics --> $DIR/check-values-constraints.rs:98:5 | LL | vec![MyOwned], | ^^^^^^^^^^^^^ allocation not allowed in statics - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in statics --> $DIR/check-values-constraints.rs:98:5 @@ -79,15 +71,12 @@ LL | vec![MyOwned], | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0010]: allocations are not allowed in statics --> $DIR/check-values-constraints.rs:103:6 | LL | &vec![MyOwned], | ^^^^^^^^^^^^^ allocation not allowed in statics - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in statics --> $DIR/check-values-constraints.rs:103:6 @@ -97,15 +86,12 @@ LL | &vec![MyOwned], | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0010]: allocations are not allowed in statics --> $DIR/check-values-constraints.rs:105:6 | LL | &vec![MyOwned], | ^^^^^^^^^^^^^ allocation not allowed in statics - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in statics --> $DIR/check-values-constraints.rs:105:6 @@ -115,15 +101,12 @@ LL | &vec![MyOwned], | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0010]: allocations are not allowed in statics --> $DIR/check-values-constraints.rs:111:31 | LL | static STATIC19: Vec = vec![3]; | ^^^^^^^ allocation not allowed in statics - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in statics --> $DIR/check-values-constraints.rs:111:31 @@ -133,15 +116,12 @@ LL | static STATIC19: Vec = vec![3]; | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0010]: allocations are not allowed in statics --> $DIR/check-values-constraints.rs:117:32 | LL | static x: Vec = vec![3]; | ^^^^^^^ allocation not allowed in statics - | - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0015]: cannot call non-const method `slice::::into_vec::` in statics --> $DIR/check-values-constraints.rs:117:32 @@ -151,7 +131,6 @@ LL | static x: Vec = vec![3]; | = note: calls in statics are limited to constant functions, tuple structs and tuple variants = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)` - = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0507]: cannot move out of static item `x` --> $DIR/check-values-constraints.rs:119:9 diff --git a/tests/ui/suggestions/bound-suggestions.stderr b/tests/ui/suggestions/bound-suggestions.stderr index ec1d23fac458b..ba792578a202d 100644 --- a/tests/ui/suggestions/bound-suggestions.stderr +++ b/tests/ui/suggestions/bound-suggestions.stderr @@ -6,7 +6,6 @@ LL | println!("{:?}", t); | | | required by this formatting parameter | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting opaque type `impl Sized` with trait `Debug` | LL | fn test_impl(t: impl Sized + std::fmt::Debug) { @@ -20,7 +19,6 @@ LL | println!("{:?}", t); | | | required by this formatting parameter | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `T` with trait `Debug` | LL | fn test_no_bounds(t: T) { @@ -34,7 +32,6 @@ LL | println!("{:?}", t); | | | required by this formatting parameter | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `T` with trait `Debug` | LL | fn test_one_bound(t: T) { @@ -48,7 +45,6 @@ LL | println!("{:?} {:?}", x, y); | | | required by this formatting parameter | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `Y` with trait `Debug` | LL | fn test_no_bounds_where(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug { @@ -62,7 +58,6 @@ LL | println!("{:?}", x); | | | required by this formatting parameter | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `X` with trait `Debug` | LL | fn test_one_bound_where(x: X) where X: Sized + std::fmt::Debug { @@ -76,7 +71,6 @@ LL | println!("{:?}", x); | | | required by this formatting parameter | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `X` with trait `Debug` | LL | fn test_many_bounds_where(x: X) where X: Sized + std::fmt::Debug, X: Sized { diff --git a/tests/ui/suggestions/issue-97760.stderr b/tests/ui/suggestions/issue-97760.stderr index c3cf7e13987b6..f3dc3f74efe85 100644 --- a/tests/ui/suggestions/issue-97760.stderr +++ b/tests/ui/suggestions/issue-97760.stderr @@ -6,7 +6,6 @@ LL | println!("{x}"); | = help: the trait `std::fmt::Display` is not implemented for `::Item` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: introduce a type parameter with a trait bound instead of using `impl Trait` | LL ~ pub fn print_values(values: &I) diff --git a/tests/ui/suggestions/path-display.stderr b/tests/ui/suggestions/path-display.stderr index 0c7271b3c1c37..df9e855bb714d 100644 --- a/tests/ui/suggestions/path-display.stderr +++ b/tests/ui/suggestions/path-display.stderr @@ -10,7 +10,6 @@ LL | println!("{}", path); = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data = note: required for `&Path` to implement `std::fmt::Display` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `PathBuf` doesn't implement `std::fmt::Display` --> $DIR/path-display.rs:9:20 @@ -23,7 +22,6 @@ LL | println!("{}", path); = help: the trait `std::fmt::Display` is not implemented for `PathBuf` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/thread-local/no-unstable.stderr b/tests/ui/thread-local/no-unstable.stderr index fbcd804d91785..438020d00b7dd 100644 --- a/tests/ui/thread-local/no-unstable.stderr +++ b/tests/ui/thread-local/no-unstable.stderr @@ -10,7 +10,6 @@ LL | | } = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable = note: the `#[rustc_dummy]` attribute is an internal implementation detail that will never be stable = note: the `#[rustc_dummy]` attribute is used for rustc unit tests - = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of an internal attribute --> $DIR/no-unstable.rs:1:1 @@ -24,7 +23,6 @@ LL | | } = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable = note: the `#[rustc_dummy]` attribute is an internal implementation detail that will never be stable = note: the `#[rustc_dummy]` attribute is used for rustc unit tests - = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: `#[used(linker)]` is currently unstable --> $DIR/no-unstable.rs:1:1 @@ -38,7 +36,6 @@ LL | | } = note: see issue #93798 for more information = help: add `#![feature(used_with_arg)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info) error: `#[used]` attribute cannot be used on constants --> $DIR/no-unstable.rs:1:1 @@ -50,7 +47,6 @@ LL | | } | |_^ | = help: `#[used]` can only be applied to statics - = note: this error originates in the macro `$crate::thread::local_impl::thread_local_process_attrs` which comes from the expansion of the macro `thread_local` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/traits/const-traits/issue-79450.stderr b/tests/ui/traits/const-traits/issue-79450.stderr index 702e93a76a8f0..82d5ea34582fb 100644 --- a/tests/ui/traits/const-traits/issue-79450.stderr +++ b/tests/ui/traits/const-traits/issue-79450.stderr @@ -7,7 +7,6 @@ LL | println!("lul"); note: function `_print` is not const --> $SRC_DIR/std/src/io/stdio.rs:LL:COL = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants - = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/try-block/try-block-maybe-bad-lifetime.stderr b/tests/ui/try-block/try-block-maybe-bad-lifetime.stderr index 71c7e460c3992..7fe1510219767 100644 --- a/tests/ui/try-block/try-block-maybe-bad-lifetime.stderr +++ b/tests/ui/try-block/try-block-maybe-bad-lifetime.stderr @@ -22,7 +22,6 @@ LL | }; LL | println!("{}", x); | ^ value borrowed here after move | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider cloning the value if the performance cost is acceptable | LL | ::std::mem::drop(x.clone()); diff --git a/tests/ui/try-block/try-block-opt-init.stderr b/tests/ui/try-block/try-block-opt-init.stderr index 1679fc2ac18c5..b838af5d53b9d 100644 --- a/tests/ui/try-block/try-block-opt-init.stderr +++ b/tests/ui/try-block/try-block-opt-init.stderr @@ -9,8 +9,6 @@ LL | cfg_res = 5; ... LL | assert_eq!(cfg_res, 5); | ^^^^^^^^^^^^^^^^^^^^^^ `cfg_res` used here but it is possibly-uninitialized - | - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr index a7135e8f05f43..da2099c1ed274 100644 --- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr +++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.edition2024.stderr @@ -35,7 +35,6 @@ note: this call may capture more lifetimes than intended, because Rust 2024 has | LL | let mut thing = test(&mut z); | ^^^^^^^^^^^^ - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) help: use the precise capturing `use<...>` syntax to make the captures explicit | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + use<> { @@ -57,7 +56,6 @@ note: this call may capture more lifetimes than intended, because Rust 2024 has | LL | let mut thing = test(&mut z); | ^^^^^^^^^^^^ - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) help: use the precise capturing `use<...>` syntax to make the captures explicit | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + use<> { @@ -79,7 +77,6 @@ note: this call may capture more lifetimes than intended, because Rust 2024 has | LL | let mut thing = test(&mut z); | ^^^^^^^^^^^^ - = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) help: use the precise capturing `use<...>` syntax to make the captures explicit | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + use<> { diff --git a/tests/ui/type-alias-impl-trait/nested.stderr b/tests/ui/type-alias-impl-trait/nested.stderr index f72830b864d12..9ac0fe5302be9 100644 --- a/tests/ui/type-alias-impl-trait/nested.stderr +++ b/tests/ui/type-alias-impl-trait/nested.stderr @@ -20,7 +20,6 @@ LL | println!("{:?}", bar()); | required by this formatting parameter | = help: the trait `Debug` is not implemented for `Bar` - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/type/binding-assigned-block-without-tail-expression.stderr b/tests/ui/type/binding-assigned-block-without-tail-expression.stderr index ff34facf3892f..ed7ff22e501c0 100644 --- a/tests/ui/type/binding-assigned-block-without-tail-expression.stderr +++ b/tests/ui/type/binding-assigned-block-without-tail-expression.stderr @@ -11,7 +11,6 @@ LL | println!("{}", x); | = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `()` doesn't implement `std::fmt::Display` --> $DIR/binding-assigned-block-without-tail-expression.rs:15:20 @@ -26,7 +25,6 @@ LL | println!("{}", y); | = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `()` doesn't implement `std::fmt::Display` --> $DIR/binding-assigned-block-without-tail-expression.rs:16:20 @@ -41,7 +39,6 @@ LL | println!("{}", z); | = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `()` doesn't implement `std::fmt::Display` --> $DIR/binding-assigned-block-without-tail-expression.rs:17:20 @@ -59,7 +56,6 @@ LL | println!("{}", s); | = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/binding-assigned-block-without-tail-expression.rs:18:18 diff --git a/tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr b/tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr index 0907489f8e8a0..b4bf0e00cfe20 100644 --- a/tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr +++ b/tests/ui/typeck/closure-ty-mismatch-issue-128561.stderr @@ -14,8 +14,6 @@ error[E0308]: mismatched types | LL | b"abc".iter().for_each(|x| dbg!(x)); | ^^^^^^^ expected `()`, found `&u8` - | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> $DIR/closure-ty-mismatch-issue-128561.rs:8:9 diff --git a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.stderr b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.stderr index bc722cdd57a5a..efd8d6e2686c8 100644 --- a/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.stderr +++ b/tests/ui/typeck/issue-110017-format-into-help-deletes-macro.stderr @@ -6,7 +6,6 @@ LL | Err(format!("error: {x}")) | = note: expected struct `Box` found struct `String` - = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) help: call `Into::into` on this expression to convert `String` into `Box` | LL | Err(format!("error: {x}").into()) diff --git a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.stderr b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.stderr index 30d51420b7cb3..cc5a4af880648 100644 --- a/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.stderr +++ b/tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.stderr @@ -12,7 +12,6 @@ LL | | } | = note: expected unit type `()` found enum `Result<(), std::fmt::Error>` - = note: this error originates in the macro `writeln` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider using a semicolon here | LL | }; diff --git a/tests/ui/typeck/question-mark-operator-suggestion-span.stderr b/tests/ui/typeck/question-mark-operator-suggestion-span.stderr index 089b3bcd1988a..f567e553d8b7c 100644 --- a/tests/ui/typeck/question-mark-operator-suggestion-span.stderr +++ b/tests/ui/typeck/question-mark-operator-suggestion-span.stderr @@ -12,7 +12,6 @@ LL | | } | = note: expected unit type `()` found enum `Result<(), std::fmt::Error>` - = note: this error originates in the macro `writeln` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider using a semicolon here | LL | }; diff --git a/tests/ui/typeck/suggestions/suggest-clone-in-macro-issue-139253.stderr b/tests/ui/typeck/suggestions/suggest-clone-in-macro-issue-139253.stderr index 972c2ced00376..6785d48eca602 100644 --- a/tests/ui/typeck/suggestions/suggest-clone-in-macro-issue-139253.stderr +++ b/tests/ui/typeck/suggestions/suggest-clone-in-macro-issue-139253.stderr @@ -26,7 +26,6 @@ error[E0308]: mismatched types LL | let c: S = dbg!(field); | ^^^^^^^^^^^ expected `S`, found `&S` | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider using clone here | LL | let c: S = dbg!(field).clone(); @@ -38,7 +37,6 @@ error[E0308]: mismatched types LL | let c: S = dbg!(dbg!(field)); | ^^^^^^^^^^^^^^^^^ expected `S`, found `&S` | - = note: this error originates in the macro `$crate::macros::dbg_internal` which comes from the expansion of the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider using clone here | LL | let c: S = dbg!(dbg!(field)).clone(); diff --git a/tests/ui/uninhabited/void-branch.stderr b/tests/ui/uninhabited/void-branch.stderr index ee5efb94ed214..15693fc85f4b6 100644 --- a/tests/ui/uninhabited/void-branch.stderr +++ b/tests/ui/uninhabited/void-branch.stderr @@ -16,7 +16,6 @@ note: the lint level is defined here | LL | #![deny(unreachable_code)] | ^^^^^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: unreachable expression --> $DIR/void-branch.rs:25:9 @@ -31,7 +30,6 @@ note: this expression has type `Infallible`, which is uninhabited | LL | infallible(); | ^^^^^^^^^^^^ - = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors diff --git a/tests/ui/use/use-after-move-based-on-type.stderr b/tests/ui/use/use-after-move-based-on-type.stderr index 02a6ed599a920..1e72b3a1e95a5 100644 --- a/tests/ui/use/use-after-move-based-on-type.stderr +++ b/tests/ui/use/use-after-move-based-on-type.stderr @@ -8,7 +8,6 @@ LL | let _y = x; LL | println!("{}", x); | ^ value borrowed here after move | - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider cloning the value if the performance cost is acceptable | LL | let _y = x.clone();