Skip to content

Commit f608da2

Browse files
committed
Remove 'this error originates in format_args_nl' from test output.
This message is no longer generated. This is probably a good thing. The relevant span is entirely in user code, and "format_args_nl" is an implementation detail with a name that isn't even public.
1 parent 4ca0f01 commit f608da2

35 files changed

+3
-65
lines changed

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-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<std::collections::binary_heap::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/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

0 commit comments

Comments
 (0)