Skip to content

Commit bb3d8c5

Browse files
committed
Bless/update tests.
1 parent d6c6ff1 commit bb3d8c5

File tree

14 files changed

+58
-33
lines changed

14 files changed

+58
-33
lines changed

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/consts/recursive-const-in-impl.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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]`

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/issues/issue-27592.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ impl ::std::fmt::Write for Stream {
1515
fn main() {
1616
write(|| format_args!("{}", String::from("Hello world")));
1717
//~^ ERROR cannot return value referencing temporary value
18-
//~| ERROR cannot return reference to temporary value
18+
//~| ERROR cannot return reference to local binding
1919
}

tests/ui/issues/issue-27592.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | write(|| format_args!("{}", String::from("Hello world")));
77
| | temporary value created here
88
| returns a value referencing data owned by the current function
99

10-
error[E0515]: cannot return reference to temporary value
10+
error[E0515]: cannot return reference to local binding
1111
--> $DIR/issue-27592.rs:16:14
1212
|
1313
LL | write(|| format_args!("{}", String::from("Hello world")));

tests/ui/issues/issue-69455.stderr

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
error[E0284]: type annotations needed
2-
--> $DIR/issue-69455.rs:29:41
1+
error[E0283]: type annotations needed
2+
--> $DIR/issue-69455.rs:29:20
33
|
44
LL | println!("{}", 23u64.test(xs.iter().sum()));
55
| ---- ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
@@ -35,5 +35,4 @@ LL | println!("{}", 23u64.test(xs.iter().sum::<S>()));
3535

3636
error: aborting due to 2 previous errors
3737

38-
Some errors have detailed explanations: E0283, E0284.
39-
For more information about an error, try `rustc --explain E0283`.
38+
For more information about this error, try `rustc --explain E0283`.

tests/ui/sized/unsized-binding.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() {
22
let x = *""; //~ ERROR E0277
3-
println!("{}", x);
4-
println!("{}", x);
3+
drop(x);
4+
drop(x);
55
}

tests/ui/suggestions/bound-suggestions.stderr

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ error[E0277]: `impl Sized` doesn't implement `Debug`
22
--> $DIR/bound-suggestions.rs:9:22
33
|
44
LL | println!("{:?}", t);
5-
| ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
5+
| ---- ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
6+
| |
7+
| required by a bound introduced by this call
68
|
79
help: consider restricting opaque type `impl Sized` with trait `Debug`
810
|
@@ -13,7 +15,9 @@ error[E0277]: `T` doesn't implement `Debug`
1315
--> $DIR/bound-suggestions.rs:15:22
1416
|
1517
LL | println!("{:?}", t);
16-
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
18+
| ---- ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
19+
| |
20+
| required by a bound introduced by this call
1721
|
1822
help: consider restricting type parameter `T` with trait `Debug`
1923
|
@@ -24,7 +28,9 @@ error[E0277]: `T` doesn't implement `Debug`
2428
--> $DIR/bound-suggestions.rs:21:22
2529
|
2630
LL | println!("{:?}", t);
27-
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
31+
| ---- ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
32+
| |
33+
| required by a bound introduced by this call
2834
|
2935
help: consider further restricting type parameter `T` with trait `Debug`
3036
|
@@ -47,7 +53,9 @@ error[E0277]: `X` doesn't implement `Debug`
4753
--> $DIR/bound-suggestions.rs:33:22
4854
|
4955
LL | println!("{:?}", x);
50-
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
56+
| ---- ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
57+
| |
58+
| required by a bound introduced by this call
5159
|
5260
help: consider further restricting type parameter `X` with trait `Debug`
5361
|
@@ -58,7 +66,9 @@ error[E0277]: `X` doesn't implement `Debug`
5866
--> $DIR/bound-suggestions.rs:39:22
5967
|
6068
LL | println!("{:?}", x);
61-
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
69+
| ---- ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
70+
| |
71+
| required by a bound introduced by this call
6272
|
6373
help: consider further restricting type parameter `X` with trait `Debug`
6474
|

tests/ui/suggestions/issue-97760.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `<impl IntoIterator as IntoIterator>::Item` doesn't implement `std::fmt::Display`
2-
--> $DIR/issue-97760.rs:4:19
2+
--> $DIR/issue-97760.rs:4:20
33
|
44
LL | println!("{x}");
55
| ^^^ `<impl IntoIterator as IntoIterator>::Item` cannot be formatted with the default formatter

0 commit comments

Comments
 (0)