about summary refs log tree commit diff
path: root/tests/ui/deriving
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-03-11 23:42:36 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-03-14 19:50:03 +0000
commitf0b8e13b59a68d63cf7083be5cd6dcca3abf18ff (patch)
tree08b7bd21fe99866e81f5f2ede1f6f4fb2ffcd4d7 /tests/ui/deriving
parentf7b43542838f0a4a6cfdb17fbeadf45002042a77 (diff)
downloadrust-f0b8e13b59a68d63cf7083be5cd6dcca3abf18ff.tar.gz
rust-f0b8e13b59a68d63cf7083be5cd6dcca3abf18ff.zip
Do not suggest using `-Zmacro-backtrace` for builtin macros
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
Diffstat (limited to 'tests/ui/deriving')
-rw-r--r--tests/ui/deriving/deriving-coerce-pointee-neg.stderr15
-rw-r--r--tests/ui/deriving/do-not-suggest-calling-fn-in-derive-macro.stderr2
-rw-r--r--tests/ui/deriving/issue-103157.stderr1
-rw-r--r--tests/ui/deriving/multiple-defaults.stderr2
4 files changed, 0 insertions, 20 deletions
diff --git a/tests/ui/deriving/deriving-coerce-pointee-neg.stderr b/tests/ui/deriving/deriving-coerce-pointee-neg.stderr
index d3d73132078..6c6e6312875 100644
--- a/tests/ui/deriving/deriving-coerce-pointee-neg.stderr
+++ b/tests/ui/deriving/deriving-coerce-pointee-neg.stderr
@@ -3,40 +3,30 @@ error[E0802]: `CoercePointee` can only be derived on `struct`s with `#[repr(tran
    |
 LL | #[derive(CoercePointee)]
    |          ^^^^^^^^^^^^^
-   |
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0802]: `CoercePointee` can only be derived on `struct`s with at least one field
   --> $DIR/deriving-coerce-pointee-neg.rs:15:10
    |
 LL | #[derive(CoercePointee)]
    |          ^^^^^^^^^^^^^
-   |
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0802]: `CoercePointee` can only be derived on `struct`s with at least one field
   --> $DIR/deriving-coerce-pointee-neg.rs:22:10
    |
 LL | #[derive(CoercePointee)]
    |          ^^^^^^^^^^^^^
-   |
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0802]: `CoercePointee` can only be derived on `struct`s that are generic over at least one type
   --> $DIR/deriving-coerce-pointee-neg.rs:29:10
    |
 LL | #[derive(CoercePointee)]
    |          ^^^^^^^^^^^^^
-   |
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0802]: exactly one generic type parameter must be marked as `#[pointee]` to derive `CoercePointee` traits
   --> $DIR/deriving-coerce-pointee-neg.rs:34:10
    |
 LL | #[derive(CoercePointee)]
    |          ^^^^^^^^^^^^^
-   |
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0802]: only one type parameter can be marked as `#[pointee]` when deriving `CoercePointee` traits
   --> $DIR/deriving-coerce-pointee-neg.rs:43:39
@@ -126,8 +116,6 @@ LL | #[derive(CoercePointee)]
 ...
 LL |     inner: std::rc::Rc<(i32, Box<T>)>,
    |     --------------------------------- `Rc<(i32, Box<T>)>` must be a pointer, reference, or smart pointer that is allowed to be unsized
-   |
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0375]: implementing `CoerceUnsized` does not allow multiple fields to be coerced
   --> $DIR/deriving-coerce-pointee-neg.rs:153:10
@@ -142,7 +130,6 @@ LL |     inner1: Box<T>,
    |     ^^^^^^^^^^^^^^
 LL |     inner2: Box<T>,
    |     ^^^^^^^^^^^^^^
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: for `UsingNonCoercePointeeData<T>` to have a valid implementation of `CoerceUnsized`, it must be possible to coerce the field of type `NotCoercePointeeData<T>`
   --> $DIR/deriving-coerce-pointee-neg.rs:164:10
@@ -152,8 +139,6 @@ LL | #[derive(CoercePointee)]
 LL |
 LL | struct UsingNonCoercePointeeData<T: ?Sized>(NotCoercePointeeData<T>);
    |                                             ----------------------- `NotCoercePointeeData<T>` must be a pointer, reference, or smart pointer that is allowed to be unsized
-   |
-   = note: this error originates in the derive macro `CoercePointee` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0690]: transparent struct needs at most one field with non-trivial size or alignment, but has 2
   --> $DIR/deriving-coerce-pointee-neg.rs:155:1
diff --git a/tests/ui/deriving/do-not-suggest-calling-fn-in-derive-macro.stderr b/tests/ui/deriving/do-not-suggest-calling-fn-in-derive-macro.stderr
index 40464a49c34..af78f645463 100644
--- a/tests/ui/deriving/do-not-suggest-calling-fn-in-derive-macro.stderr
+++ b/tests/ui/deriving/do-not-suggest-calling-fn-in-derive-macro.stderr
@@ -6,8 +6,6 @@ LL | #[derive(PartialEq)]
 LL | pub struct Function {
 LL |     callback: Rc<dyn Fn()>,
    |     ^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/deriving/issue-103157.stderr b/tests/ui/deriving/issue-103157.stderr
index 9754b0289c0..51d4d0a8974 100644
--- a/tests/ui/deriving/issue-103157.stderr
+++ b/tests/ui/deriving/issue-103157.stderr
@@ -20,7 +20,6 @@ LL |     Float(Option<f64>),
    = note: required for `Option<f64>` to implement `Eq`
 note: required by a bound in `AssertParamIsEq`
   --> $SRC_DIR/core/src/cmp.rs:LL:COL
-   = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/deriving/multiple-defaults.stderr b/tests/ui/deriving/multiple-defaults.stderr
index 05fb6fecffa..a662ed248fe 100644
--- a/tests/ui/deriving/multiple-defaults.stderr
+++ b/tests/ui/deriving/multiple-defaults.stderr
@@ -11,7 +11,6 @@ LL |     B,
    |     - additional default
    |
    = note: only one variant can be default
-   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: multiple declared defaults
   --> $DIR/multiple-defaults.rs:18:10
@@ -26,7 +25,6 @@ LL |     A,
    |     - additional default
    |
    = note: only one variant can be default
-   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0428]: the name `A` is defined multiple times
   --> $DIR/multiple-defaults.rs:23:5