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

0 commit comments

Comments
 (0)