Skip to content

Commit a693c52

Browse files
committed
Bless/update tests.
1 parent 42fc5ae commit a693c52

Some content is hidden

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

42 files changed

+81
-28
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ 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)
1113

1214
error: aborting due to 1 previous error
1315

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ 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)
1011
help: consider assigning a value
1112
|
1213
LL | let x: isize = 42;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ 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)
1011
help: consider assigning a value
1112
|
1213
LL | let x: isize = 42;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ 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)
1113

1214
error: aborting due to 1 previous error
1315

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ 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)
1113

1214
error: aborting due to 1 previous error
1315

tests/ui/borrowck/clone-on-ref.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LL | drop(x);
3030
| ^ move out of `x` occurs here
3131
LL |
3232
LL | println!("{b}");
33-
| --- borrow later used here
33+
| - borrow later used here
3434
|
3535
help: if `T` implemented `Clone`, you could clone the value
3636
--> $DIR/clone-on-ref.rs:11:8
@@ -57,7 +57,7 @@ LL | drop(x);
5757
| ^ move out of `x` occurs here
5858
LL |
5959
LL | println!("{b:?}");
60-
| ----- borrow later used here
60+
| - borrow later used here
6161
|
6262
note: if `A` implemented `Clone`, you could clone the value
6363
--> $DIR/clone-on-ref.rs:19:1

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ 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)
1011
help: consider assigning a value
1112
|
1213
LL | let x: i32 = 42;
@@ -21,6 +22,7 @@ LL | for _ in 0..10 { x = continue; }
2122
LL | println!("{}", x);
2223
| ^ `x` used here but it isn't initialized
2324
|
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)
2426
help: consider assigning a value
2527
|
2628
LL | let x: i32 = 42;

tests/ui/borrowck/issue-47646.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ 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)
1517

1618
error: aborting due to 1 previous error
1719

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ 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)
2223
help: consider assigning a value
2324
|
2425
LL | let my_float: f32 = 3.14159;
@@ -32,6 +33,7 @@ LL | let demo: Demo;
3233
LL | println!("demo: {:?}", demo);
3334
| ^^^^ `demo` used here but it isn't initialized
3435
|
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)
3537
help: consider assigning a value
3638
|
3739
LL | let demo: Demo = Default::default();
@@ -45,6 +47,7 @@ LL | let demo_no: DemoNoDef;
4547
LL | println!("demo_no: {:?}", demo_no);
4648
| ^^^^^^^ `demo_no` used here but it isn't initialized
4749
|
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)
4851
help: consider assigning a value
4952
|
5053
LL | let demo_no: DemoNoDef = /* value */;
@@ -58,6 +61,7 @@ LL | let arr: [i32; 5];
5861
LL | println!("arr: {:?}", arr);
5962
| ^^^ `arr` used here but it isn't initialized
6063
|
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)
6165
help: consider assigning a value
6266
|
6367
LL | let arr: [i32; 5] = [42; 5];
@@ -71,6 +75,7 @@ LL | let foo: Vec<&str>;
7175
LL | println!("foo: {:?}", foo);
7276
| ^^^ `foo` used here but it isn't initialized
7377
|
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)
7479
help: consider assigning a value
7580
|
7681
LL | let foo: Vec<&str> = vec![];
@@ -84,6 +89,7 @@ LL | let my_string: String;
8489
LL | println!("my_string: {}", my_string);
8590
| ^^^^^^^^^ `my_string` used here but it isn't initialized
8691
|
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)
8793
help: consider assigning a value
8894
|
8995
LL | let my_string: String = Default::default();
@@ -97,6 +103,7 @@ LL | let my_int: &i32;
97103
LL | println!("my_int: {}", *my_int);
98104
| ^^^^^^^ `*my_int` used here but it isn't initialized
99105
|
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)
100107
help: consider assigning a value
101108
|
102109
LL | let my_int: &i32 = &42;
@@ -110,6 +117,7 @@ LL | let hello: &str;
110117
LL | println!("hello: {}", hello);
111118
| ^^^^^ `hello` used here but it isn't initialized
112119
|
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)
113121
help: consider assigning a value
114122
|
115123
LL | let hello: &str = "";
@@ -122,6 +130,8 @@ LL | let never: !;
122130
| ----- binding declared here but left uninitialized
123131
LL | println!("never: {}", never);
124132
| ^^^^^ `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)
125135

126136
error: aborting due to 10 previous errors
127137

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ 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)
5658

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ 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)
2830

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ 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)
1011

1112
error: aborting due to 1 previous error
1213

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ 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)
1618

1719
error: aborting due to 1 previous error
1820

tests/ui/closures/issue-111932.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ 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)
2223

2324
error: aborting due to 2 previous errors
2425

tests/ui/codemap_tests/tab_3.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ 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)
1415
help: you can `clone` the value and consume it, but this might not be your desired behavior
1516
|
1617
LL | some_vec.clone().into_iter();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ note: erroneous constant encountered
2424
LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2626
|
27-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
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)
2828

2929
note: erroneous constant encountered
3030
--> $DIR/issue-44578.rs:26:20
@@ -33,6 +33,7 @@ LL | println!("{}", <Bar<u16, u8> as Foo>::AMT);
3333
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
3434
|
3535
= 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)
3637

3738
error: aborting due to 1 previous error
3839

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
error: queries overflow the depth limit!
2-
--> $DIR/recursive-const-in-impl.rs:11:14
2+
--> $DIR/recursive-const-in-impl.rs:11:20
33
|
44
LL | println!("{}", Thing::<i32>::X);
5-
| ^^^^
5+
| ^^^^^^^^^^^^^^^
66
|
77
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "14"]` attribute to your crate (`recursive_const_in_impl`)
88
= note: query depth increased by 9 when simplifying constant for the type system `main::promoted[1]`
9+
= 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)
910

1011
error: aborting due to 1 previous error
1112

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ 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)
1315

1416
error: aborting due to 1 previous error
1517

tests/ui/fmt/ifmt-unimpl.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ LL | format!("{:X}", "3");
1919
= note: required for `&str` to implement `UpperHex`
2020
note: required by a bound in `core::fmt::rt::Argument::<'_>::new_upper_hex`
2121
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
22+
= 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)
2223

2324
error: aborting due to 1 previous error
2425

tests/ui/impl-trait/precise-capturing/foreign-2021.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | x.push(0);
88
| ^^^^^^^^^ mutable borrow occurs here
99
...
1010
LL | println!("{h}");
11-
| --- immutable borrow later used here
11+
| - immutable borrow later used here
1212
|
1313
note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
1414
--> $DIR/foreign-2021.rs:7:13

tests/ui/impl-trait/precise-capturing/migration-note.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LL | x.push(1);
2323
| ^^^^^^^^^ mutable borrow occurs here
2424
...
2525
LL | println!("{a}");
26-
| --- immutable borrow later used here
26+
| - immutable borrow later used here
2727
|
2828
note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
2929
--> $DIR/migration-note.rs:16:13
@@ -99,7 +99,7 @@ LL | x.push(1);
9999
| ^ second mutable borrow occurs here
100100
...
101101
LL | println!("{a}");
102-
| --- first borrow later used here
102+
| - first borrow later used here
103103
|
104104
note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
105105
--> $DIR/migration-note.rs:63:13
@@ -175,7 +175,7 @@ LL | s.f = 1;
175175
| ^^^^^^^ `s.f` is assigned to here but it was already borrowed
176176
...
177177
LL | println!("{a}");
178-
| --- borrow later used here
178+
| - borrow later used here
179179
|
180180
note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
181181
--> $DIR/migration-note.rs:112:13
@@ -197,7 +197,7 @@ LL | s.f = 1;
197197
| ^^^^^^^ `s.f` is assigned to here but it was already borrowed
198198
...
199199
LL | println!("{a}");
200-
| --- borrow later used here
200+
| - borrow later used here
201201
|
202202
note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
203203
--> $DIR/migration-note.rs:128:13
@@ -219,7 +219,7 @@ LL | s.f;
219219
| ^^^ use of borrowed `s.f`
220220
...
221221
LL | println!("{a}");
222-
| --- borrow later used here
222+
| - borrow later used here
223223
|
224224
note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
225225
--> $DIR/migration-note.rs:140:13

tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.stderr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ error[E0282]: type annotations needed
33
|
44
LL | println!("{:?}", []);
55
| ^^ cannot infer type
6+
|
7+
= 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)
68

79
error: aborting due to 1 previous error
810

tests/ui/issues/issue-42796.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ LL | let mut s_copy = s;
99
LL | println!("{}", s);
1010
| ^ value borrowed here after move
1111
|
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)
1213
help: consider cloning the value if the performance cost is acceptable
1314
|
1415
LL | let mut s_copy = s.clone();

tests/ui/lifetimes/temporary-lifetime-extension-tuple-ctor.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let g = some(&temp());
66
| |
77
| creates a temporary value which is freed while still in use
88
LL | println!("{a:?} {b:?} {c:?} {d:?} {e:?} {f:?} {g:?}");
9-
| ----- borrow later used here
9+
| - borrow later used here
1010
|
1111
help: consider using a `let` binding to create a longer lived value
1212
|

tests/ui/liveness/liveness-move-in-while.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ LL | while true { while true { while true { x = y; x.clone(); } } }
3535
| | inside of this loop
3636
| inside of this loop
3737
|
38+
= 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)
3839
help: consider cloning the value if the performance cost is acceptable
3940
|
4041
LL | while true { while true { while true { x = y.clone(); x.clone(); } } }

tests/ui/liveness/liveness-use-after-move.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ LL |
99
LL | println!("{}", *x);
1010
| ^^ value borrowed here after move
1111
|
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)
1213
help: consider cloning the value if the performance cost is acceptable
1314
|
1415
LL | let y = x.clone();

tests/ui/liveness/liveness-use-after-send.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ note: consider changing this parameter type in function `send` to borrow instead
1313
|
1414
LL | fn send<T:Send + std::fmt::Debug>(ch: Chan<T>, data: T) {
1515
| ---- in this function ^ this parameter takes ownership of the value
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)
1617
help: consider cloning the value if the performance cost is acceptable
1718
|
1819
LL | send(ch, message.clone());

tests/ui/loops/loop-proper-liveness.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ LL | let x: i32;
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)
1011
help: consider assigning a value
1112
|
1213
LL | let x: i32 = 42;

0 commit comments

Comments
 (0)