Skip to content

Commit 0ac35c6

Browse files
committed
diagnostics: hide expansion of builtin-like macros
1 parent f8e9e76 commit 0ac35c6

File tree

68 files changed

+17
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+17
-167
lines changed

compiler/rustc_errors/src/emitter.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use rustc_lexer;
2424
use rustc_lint_defs::pluralize;
2525
use rustc_span::hygiene::{ExpnKind, MacroKind};
2626
use rustc_span::source_map::SourceMap;
27-
use rustc_span::{FileLines, FileName, SourceFile, Span, char_width, str_width};
27+
use rustc_span::{FileLines, FileName, SourceFile, Span, char_width, str_width, sym};
2828
use termcolor::{Buffer, BufferWriter, Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
2929
use tracing::{debug, instrument, trace, warn};
3030

@@ -297,9 +297,16 @@ pub trait Emitter: Translate {
297297
// are some which do actually involve macros.
298298
ExpnKind::Desugaring(..) | ExpnKind::AstPass(..) => None,
299299

300-
ExpnKind::Macro(macro_kind, name) => {
301-
Some((macro_kind, name, expn_data.hide_backtrace))
302-
}
300+
ExpnKind::Macro(macro_kind, name) => Some((
301+
macro_kind,
302+
name,
303+
expn_data.hide_backtrace
304+
|| expn_data.allow_internal_unstable.is_some_and(|aiu| {
305+
aiu.contains(&sym::fmt_internals)
306+
|| aiu.contains(&sym::print_internals)
307+
|| aiu.contains(&sym::liballoc_internals)
308+
}),
309+
)),
303310
}
304311
})
305312
.collect();
@@ -311,8 +318,9 @@ pub trait Emitter: Translate {
311318
self.render_multispans_macro_backtrace(span, children, backtrace);
312319

313320
if !backtrace {
314-
// Skip builtin macros, as their expansion isn't relevant to the end user. This includes
315-
// actual intrinsics, like `asm!`.
321+
// Skip some special macros, as their expansion isn't relevant to the end user.
322+
// This includes actual intrinsics and builtins like `asm!`, as well as macros
323+
// that contain implementation details like the formatting macros
316324
if let Some((macro_kind, name, _)) = has_macro_spans.first()
317325
&& let Some((_, _, false)) = has_macro_spans.last()
318326
{

compiler/rustc_span/src/symbol.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ symbols! {
10071007
fmaf64,
10081008
fmt,
10091009
fmt_debug,
1010+
fmt_internals,
10101011
fmul_algebraic,
10111012
fmul_fast,
10121013
fmuladdf128,
@@ -1240,6 +1241,7 @@ symbols! {
12401241
let_else,
12411242
lhs,
12421243
lib,
1244+
liballoc_internals,
12431245
libc,
12441246
lifetime,
12451247
lifetime_capture_rules_2024,
@@ -1623,6 +1625,7 @@ symbols! {
16231625
prelude_import,
16241626
preserves_flags,
16251627
prfchw_target_feature,
1628+
print_internals,
16261629
print_macro,
16271630
println_macro,
16281631
proc_dash_macro: "proc-macro",

tests/ui/asm/parse-error.stderr

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,12 @@ error: asm template must be a string literal
193193
|
194194
LL | asm!(format!("{{{}}}", 0), in(reg) foo);
195195
| ^^^^^^^^^^^^^^^^^^^^
196-
|
197-
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
198196

199197
error: asm template must be a string literal
200198
--> $DIR/parse-error.rs:86:21
201199
|
202200
LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
203201
| ^^^^^^^^^^^^^^^^^^^^
204-
|
205-
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
206202

207203
error: _ cannot be used for input operands
208204
--> $DIR/parse-error.rs:88:28
@@ -357,16 +353,12 @@ error: asm template must be a string literal
357353
|
358354
LL | global_asm!(format!("{{{}}}", 0), const FOO);
359355
| ^^^^^^^^^^^^^^^^^^^^
360-
|
361-
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
362356

363357
error: asm template must be a string literal
364358
--> $DIR/parse-error.rs:143:20
365359
|
366360
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
367361
| ^^^^^^^^^^^^^^^^^^^^
368-
|
369-
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
370362

371363
error: the `in` operand cannot be used with `global_asm!`
372364
--> $DIR/parse-error.rs:146:19

tests/ui/asm/x86_64/type-check-2.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ LL | asm!("{}", in(reg) vec![0]);
2121
| ^^^^^^^
2222
|
2323
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
24-
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
2524

2625
error: cannot use value of type `(i32, i32, i32)` for inline assembly
2726
--> $DIR/type-check-2.rs:52:28

tests/ui/async-await/unreachable-lint-2.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ note: the lint level is defined here
1111
|
1212
LL | #![deny(unreachable_code)]
1313
| ^^^^^^^^^^^^^^^^
14-
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
1514

1615
error: aborting due to 1 previous error
1716

tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ LL | test(&vec![])
88
| argument requires that borrow lasts for `'static`
99
LL | }
1010
| - temporary value is freed at the end of this statement
11-
|
12-
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
1311

1412
error: aborting due to 1 previous error
1513

tests/ui/borrowck/borrowck-and-init.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ LL | println!("{}", false && { i = 5; true });
88
| ----- binding initialized here in some conditions
99
LL | println!("{}", i);
1010
| ^ `i` used here but it is possibly-uninitialized
11-
|
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)
1311

1412
error: aborting due to 1 previous error
1513

tests/ui/borrowck/borrowck-borrowed-uniq-rvalue-2.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LL | let x = defer(&vec!["Goodbye", "world!"]);
88
LL | x.x[0];
99
| ------ borrow later used here
1010
|
11-
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
1211
help: consider using a `let` binding to create a longer lived value
1312
|
1413
LL ~ let binding = vec!["Goodbye", "world!"];

tests/ui/borrowck/borrowck-break-uninit-2.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ LL | let x: isize;
77
LL | println!("{}", x);
88
| ^ `x` used here but it isn't initialized
99
|
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)
1110
help: consider assigning a value
1211
|
1312
LL | let x: isize = 42;

tests/ui/borrowck/borrowck-break-uninit.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ LL | let x: isize;
77
LL | println!("{}", x);
88
| ^ `x` used here but it isn't initialized
99
|
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)
1110
help: consider assigning a value
1211
|
1312
LL | let x: isize = 42;

tests/ui/borrowck/borrowck-or-init.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ LL | println!("{}", false || { i = 5; true });
88
| ----- binding initialized here in some conditions
99
LL | println!("{}", i);
1010
| ^ `i` used here but it is possibly-uninitialized
11-
|
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)
1311

1412
error: aborting due to 1 previous error
1513

tests/ui/borrowck/borrowck-while-break.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ LL | while cond {
88
...
99
LL | println!("{}", v);
1010
| ^ `v` used here but it is possibly-uninitialized
11-
|
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)
1311

1412
error: aborting due to 1 previous error
1513

tests/ui/borrowck/issue-24267-flow-exit.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ LL | loop { x = break; }
77
LL | println!("{}", x);
88
| ^ `x` used here but it isn't initialized
99
|
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)
1110
help: consider assigning a value
1211
|
1312
LL | let x: i32 = 42;
@@ -22,7 +21,6 @@ LL | for _ in 0..10 { x = continue; }
2221
LL | println!("{}", x);
2322
| ^ `x` used here but it isn't initialized
2423
|
25-
= 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)
2624
help: consider assigning a value
2725
|
2826
LL | let x: i32 = 42;

tests/ui/borrowck/issue-47646.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ LL | println!("{:?}", heap);
1212
...
1313
LL | };
1414
| - ... and the mutable borrow might be used here, when that temporary is dropped and runs the destructor for type `(Option<PeekMut<'_, i32>>, ())`
15-
|
16-
= 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)
1715

1816
error: aborting due to 1 previous error
1917

tests/ui/borrowck/issue-64453.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ LL | static settings_dir: String = format!("");
66
|
77
= note: calls in statics are limited to constant functions, tuple structs and tuple variants
88
= note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
9-
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
109

1110
error[E0507]: cannot move out of static item `settings_dir`
1211
--> $DIR/issue-64453.rs:13:37

tests/ui/borrowck/suggest-assign-rvalue.stderr

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ LL | let my_float: f32;
1919
LL | println!("my_float: {}", my_float);
2020
| ^^^^^^^^ `my_float` used here but it isn't initialized
2121
|
22-
= 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)
2322
help: consider assigning a value
2423
|
2524
LL | let my_float: f32 = 3.14159;
@@ -33,7 +32,6 @@ LL | let demo: Demo;
3332
LL | println!("demo: {:?}", demo);
3433
| ^^^^ `demo` used here but it isn't initialized
3534
|
36-
= 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)
3735
help: consider assigning a value
3836
|
3937
LL | let demo: Demo = Default::default();
@@ -47,7 +45,6 @@ LL | let demo_no: DemoNoDef;
4745
LL | println!("demo_no: {:?}", demo_no);
4846
| ^^^^^^^ `demo_no` used here but it isn't initialized
4947
|
50-
= 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)
5148
help: consider assigning a value
5249
|
5350
LL | let demo_no: DemoNoDef = /* value */;
@@ -61,7 +58,6 @@ LL | let arr: [i32; 5];
6158
LL | println!("arr: {:?}", arr);
6259
| ^^^ `arr` used here but it isn't initialized
6360
|
64-
= 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)
6561
help: consider assigning a value
6662
|
6763
LL | let arr: [i32; 5] = [42; 5];
@@ -75,7 +71,6 @@ LL | let foo: Vec<&str>;
7571
LL | println!("foo: {:?}", foo);
7672
| ^^^ `foo` used here but it isn't initialized
7773
|
78-
= 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)
7974
help: consider assigning a value
8075
|
8176
LL | let foo: Vec<&str> = vec![];
@@ -89,7 +84,6 @@ LL | let my_string: String;
8984
LL | println!("my_string: {}", my_string);
9085
| ^^^^^^^^^ `my_string` used here but it isn't initialized
9186
|
92-
= 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)
9387
help: consider assigning a value
9488
|
9589
LL | let my_string: String = Default::default();
@@ -103,7 +97,6 @@ LL | let my_int: &i32;
10397
LL | println!("my_int: {}", *my_int);
10498
| ^^^^^^^ `*my_int` used here but it isn't initialized
10599
|
106-
= 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)
107100
help: consider assigning a value
108101
|
109102
LL | let my_int: &i32 = &42;
@@ -117,7 +110,6 @@ LL | let hello: &str;
117110
LL | println!("hello: {}", hello);
118111
| ^^^^^ `hello` used here but it isn't initialized
119112
|
120-
= 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)
121113
help: consider assigning a value
122114
|
123115
LL | let hello: &str = "";
@@ -130,8 +122,6 @@ LL | let never: !;
130122
| ----- binding declared here but left uninitialized
131123
LL | println!("never: {}", never);
132124
| ^^^^^ `never` used here but it isn't initialized
133-
|
134-
= 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)
135125

136126
error: aborting due to 10 previous errors
137127

tests/ui/closures/2229_closure_analysis/diagnostics/arrays.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ LL | println!("{}", arr[3]);
5353
...
5454
LL | c();
5555
| - mutable borrow later used here
56-
|
57-
= 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)
5856

5957
error[E0502]: cannot borrow `arr` as immutable because it is also borrowed as mutable
6058
--> $DIR/arrays.rs:71:24

tests/ui/closures/2229_closure_analysis/diagnostics/box.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ LL | println!("{}", e.0.0.m.x);
2525
LL |
2626
LL | c();
2727
| - mutable borrow later used here
28-
|
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)
3028

3129
error[E0506]: cannot assign to `e.0.0.m.x` because it is borrowed
3230
--> $DIR/box.rs:55:5

tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ LL | println!("{}", foo.x);
77
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
88
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
99
= 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)
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)
1110

1211
error: aborting due to 1 previous error
1312

tests/ui/closures/2229_closure_analysis/diagnostics/simple-struct-min-capture.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ LL | println!("{:?}", p);
1313
LL |
1414
LL | c();
1515
| - mutable borrow later used here
16-
|
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)
1816

1917
error: aborting due to 1 previous error
2018

tests/ui/closures/issue-111932.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ LL | println!("{:?}", foo);
1919
= help: the trait `Sized` is not implemented for `dyn Foo`
2020
note: required by an implicit `Sized` bound in `core::fmt::rt::Argument::<'_>::new_debug`
2121
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
22-
= 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)
2322

2423
error: aborting due to 2 previous errors
2524

tests/ui/codemap_tests/bad-format-args.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error: requires at least a format string argument
33
|
44
LL | format!();
55
| ^^^^^^^^^
6-
|
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)
86

97
error: expected `,`, found `1`
108
--> $DIR/bad-format-args.rs:3:16

tests/ui/codemap_tests/tab_3.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LL | println!("{:?}", some_vec);
1111
|
1212
note: `into_iter` takes ownership of the receiver `self`, which moves `some_vec`
1313
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
14-
= 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)
1514
help: you can `clone` the value and consume it, but this might not be your desired behavior
1615
|
1716
LL | some_vec.clone().into_iter();

tests/ui/consts/const-eval/format.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ LL | println!("{:?}", 0);
1313
| ^^^^^^^^^^^^^^^^^^^
1414
|
1515
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
16-
= 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)
1716

1817
error[E0015]: cannot call non-const function `_print` in constant functions
1918
--> $DIR/format.rs:7:5
@@ -22,7 +21,6 @@ LL | println!("{:?}", 0);
2221
| ^^^^^^^^^^^^^^^^^^^
2322
|
2423
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
25-
= note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
2624

2725
error[E0015]: cannot call non-const formatting macro in constant functions
2826
--> $DIR/format.rs:13:5

tests/ui/consts/const-eval/issue-44578.stderr

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ note: erroneous constant encountered
2323
|
2424
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
26-
|
27-
= 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)
2826

2927
note: erroneous constant encountered
3028
--> $DIR/issue-44578.rs:26:20
@@ -33,7 +31,6 @@ LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
3331
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
3432
|
3533
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
36-
= 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)
3734

3835
error: aborting due to 1 previous error
3936

tests/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ error[E0010]: allocations are not allowed in constant functions
33
|
44
LL | vec![1, 2, 3]
55
| ^^^^^^^^^^^^^ allocation not allowed in constant functions
6-
|
7-
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
86

97
error[E0015]: cannot call non-const method `slice::<impl [i32]>::into_vec::<std::alloc::Global>` in constant functions
108
--> $DIR/bad_const_fn_body_ice.rs:2:5
@@ -13,7 +11,6 @@ LL | vec![1, 2, 3]
1311
| ^^^^^^^^^^^^^
1412
|
1513
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
16-
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
1714

1815
error: aborting due to 2 previous errors
1916

tests/ui/coroutine/yield-while-ref-reborrowed.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ LL | println!("{}", x);
1010
| ^ second borrow occurs here
1111
LL | Pin::new(&mut b).resume(());
1212
| ------ first borrow later used here
13-
|
14-
= 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)
1513

1614
error: aborting due to 1 previous error
1715

0 commit comments

Comments
 (0)