You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #98320 - compiler-errors:macro-backtrace, r=estebank
Mention first and last macro in backtrace
Slight improvement to diagnostic mentioning what macro an error originates from. Not sure if it's worthwhile.
| ^ `i` used here but it is possibly-uninitialized
11
11
|
12
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
12
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/borrowck-break-uninit-2.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ LL | let x: isize;
7
7
LL | println!("{}", x);
8
8
| ^ `x` used here but it isn't initialized
9
9
|
10
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
10
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/borrowck-break-uninit.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ LL | let x: isize;
7
7
LL | println!("{}", x);
8
8
| ^ `x` used here but it isn't initialized
9
9
|
10
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
10
+
= 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)
| ^ `i` used here but it is possibly-uninitialized
11
11
|
12
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
12
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/borrowck-while-break.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ LL | while cond {
9
9
LL | println!("{}", v);
10
10
| ^ `v` used here but it is possibly-uninitialized
11
11
|
12
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
12
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/issue-24267-flow-exit.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ LL | loop { x = break; }
7
7
LL | println!("{}", x);
8
8
| ^ `x` used here but it isn't initialized
9
9
|
10
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
10
+
= 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)
11
11
12
12
error[E0381]: used binding `x` isn't initialized
13
13
--> $DIR/issue-24267-flow-exit.rs:18:20
@@ -18,7 +18,7 @@ LL | for _ in 0..10 { x = continue; }
18
18
LL | println!("{}", x);
19
19
| ^ `x` used here but it isn't initialized
20
20
|
21
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
21
+
= 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: add `#![feature(const_fmt_arguments_new)]` to the crate attributes to enable
8
-
= note: this error originates in the macro `$crate::__export::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
8
+
= 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)
9
9
10
10
error[E0015]: cannot call non-const fn `format` in statics
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/issue-81899.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ LL | panic!()
10
10
| the evaluated program panicked at 'explicit panic', $DIR/issue-81899.rs:12:5
11
11
| inside `f::<[closure@$DIR/issue-81899.rs:4:31: 4:34]>` at $SRC_DIR/std/src/panic.rs:LL:COL
12
12
|
13
-
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
13
+
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/issue-88434-minimal-example.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ LL | panic!()
10
10
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-minimal-example.rs:11:5
11
11
| inside `f::<[closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28]>` at $SRC_DIR/std/src/panic.rs:LL:COL
12
12
|
13
-
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
13
+
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/issue-88434-removal-index-should-be-less.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ LL | panic!()
10
10
| the evaluated program panicked at 'explicit panic', $DIR/issue-88434-removal-index-should-be-less.rs:11:5
11
11
| inside `f::<[closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34]>` at $SRC_DIR/std/src/panic.rs:LL:COL
12
12
|
13
-
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
13
+
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: src/test/ui/borrowck/move-error-snippets.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ LL | let a = $c;
12
12
LL | sss!();
13
13
| ------ in this macro invocation
14
14
|
15
-
= note: this error originates in the macro `aaa` (in Nightly builds, run with -Z macro-backtrace for more info)
15
+
= note: this error originates in the macro `aaa` which comes from the expansion of the macro `sss` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: src/test/ui/closures/2229_closure_analysis/diagnostics/arrays.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ LL | println!("{}", arr[3]);
82
82
LL | c();
83
83
| - mutable borrow later used here
84
84
|
85
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
85
+
= 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)
86
86
87
87
error[E0502]: cannot borrow `arr` as immutable because it is also borrowed as mutable
Copy file name to clipboardExpand all lines: src/test/ui/closures/2229_closure_analysis/diagnostics/box.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ LL |
26
26
LL | c();
27
27
| - mutable borrow later used here
28
28
|
29
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
29
+
= 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)
30
30
31
31
error[E0506]: cannot assign to `e.0.0.m.x` because it is borrowed
Copy file name to clipboardExpand all lines: src/test/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ LL | println!("{}", foo.x);
9
9
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
10
10
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
11
11
= 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)
12
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
12
+
= 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)
13
13
14
14
error: aborting due to previous error
15
15
@@ -25,5 +25,5 @@ LL | println!("{}", foo.x);
25
25
= note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
26
26
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
27
27
= 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)
28
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
28
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ LL |
14
14
LL | c();
15
15
| - mutable borrow later used here
16
16
|
17
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
17
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/codemap_tests/bad-format-args.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ error: requires at least a format string argument
4
4
LL | format!();
5
5
| ^^^^^^^^^
6
6
|
7
-
= note: this error originates in the macro `$crate::__export::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
7
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/codemap_tests/tab_3.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ note: this function takes ownership of the receiver `self`, which moves `some_ve
14
14
|
15
15
LL | fn into_iter(self) -> Self::IntoIter;
16
16
| ^^^^
17
-
= note: this error originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
17
+
= 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)
Copy file name to clipboardExpand all lines: src/test/ui/consts/const-eval/conditional_array_execution.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ LL | println!("{}", FOO);
26
26
|
27
27
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
28
28
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
29
-
= note: this warning originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
29
+
= note: this warning 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)
30
30
31
31
error: aborting due to previous error; 2 warnings emitted
32
32
@@ -60,5 +60,5 @@ LL | #![warn(const_err)]
60
60
| ^^^^^^^^^
61
61
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
62
62
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
63
-
= note: this warning originates in the macro `$crate::format_args_nl` (in Nightly builds, run with -Z macro-backtrace for more info)
63
+
= note: this warning 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)
0 commit comments