Skip to content

Commit a79f135

Browse files
committed
Update test expectations for new placeholder error messages
1 parent ce61b1b commit a79f135

12 files changed

+44
-44
lines changed

src/test/ui/associated-types/associated-types-eq-hr.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ LL | tuple_one::<Tuple>();
4141
| ^^^^^^^^^^^^^^^^^^
4242
|
4343
= note: Due to a where-clause on `tuple_one`,
44-
= note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
45-
= note: but `Tuple` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
44+
= note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
45+
= note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
4646

4747
error: implementation of `TheTrait` is not general enough
4848
--> $DIR/associated-types-eq-hr.rs:96:5
@@ -51,8 +51,8 @@ LL | tuple_two::<Tuple>();
5151
| ^^^^^^^^^^^^^^^^^^
5252
|
5353
= note: Due to a where-clause on `tuple_two`,
54-
= note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
55-
= note: but `Tuple` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
54+
= note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
55+
= note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
5656

5757
error: implementation of `TheTrait` is not general enough
5858
--> $DIR/associated-types-eq-hr.rs:105:5
@@ -61,8 +61,8 @@ LL | tuple_four::<Tuple>();
6161
| ^^^^^^^^^^^^^^^^^^^
6262
|
6363
= note: Due to a where-clause on `tuple_four`,
64-
= note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
65-
= note: but `Tuple` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
64+
= note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
65+
= note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
6666

6767
error: aborting due to 5 previous errors
6868

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error[E0308]: mismatched types
1+
error: implementation of `Mirror` is not general enough
22
--> $DIR/higher-ranked-projection.rs:25:5
33
|
44
LL | foo(());
5-
| ^^^ one type is more general than the other
5+
| ^^^
66
|
7-
= note: expected type `Mirror`
8-
found type `Mirror`
7+
= note: Due to a where-clause on `foo`,
8+
= note: `Mirror` would have to be implemented for the type `&'0 ()`, for any lifetime `'0`
9+
= note: but `Mirror` is actually implemented for the type `&'1 ()`, for the specific lifetime `'1`
910

1011
error: aborting due to previous error
1112

12-
For more information about this error, try `rustc --explain E0308`.

src/test/ui/associated-types/higher-ranked-projection.good.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error: compilation successful
33
|
44
LL | / fn main() { //[good]~ ERROR compilation successful
55
LL | | foo(());
6-
LL | | //[bad]~^ ERROR E0308
6+
LL | | //[bad]~^ ERROR not general enough
77
LL | | }
88
| |_^
99

src/test/ui/generator/auto-trait-regions.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ error: implementation of `Foo` is not general enough
44
LL | assert_foo(gen);
55
| ^^^^^^^^^^
66
|
7-
= note: `&'0 OnlyFooIfStaticRef` must implement `Foo` for any lifetime `'0`
8-
= note: but `&'1 OnlyFooIfStaticRef` only implements `Foo` for the lifetime `'1`
7+
= note: `Foo` would have to be implemented for the type `&'0 OnlyFooIfStaticRef`, for any lifetime `'0`
8+
= note: but `Foo` is actually implemented for the type `&'1 OnlyFooIfStaticRef`, for the specific lifetime `'1`
99

1010
error: implementation of `Foo` is not general enough
1111
--> $DIR/auto-trait-regions.rs:48:5
1212
|
1313
LL | assert_foo(gen);
1414
| ^^^^^^^^^^
1515
|
16-
= note: `A<'0, '1>` must implement `Foo` for any two lifetimes `'0` and `'1`
17-
= note: but `A<'_, '2>` only implements `Foo` for the lifetime `'2`
16+
= note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`
17+
= note: but `Foo` is actually implemented for the type `A<'_, '2>`, for the specific lifetime `'2`
1818

1919
error: aborting due to 2 previous errors
2020

src/test/ui/hrtb/hrtb-cache-issue-54302.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ error: implementation of `Deserialize` is not general enough
44
LL | assert_deserialize_owned::<&'static str>(); //~ ERROR
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `&'static str` must implement `Deserialize<'0>` for any lifetime `'0`
8-
= note: but `&str` only implements `Deserialize<'1>` for some lifetime `'1`
7+
= note: `Deserialize<'0>` would have to be implemented for the type `&'static str`, for any lifetime `'0`
8+
= note: but `Deserialize<'1>` is actually implemented for the type `&str`, for some lifetime `'1`
99

1010
error: aborting due to previous error
1111

src/test/ui/hrtb/hrtb-conflate-regions.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ LL | fn b() { want_foo2::<SomeStruct>(); } //~ ERROR
55
| ^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: Due to a where-clause on `want_foo2`,
8-
= note: `SomeStruct` must implement `Foo<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
9-
= note: but `SomeStruct` only implements `Foo<(&'2 isize, &'2 isize)>` for some lifetime `'2`
8+
= note: `Foo<(&'0 isize, &'1 isize)>` would have to be implemented for the type `SomeStruct`, for any two lifetimes `'0` and `'1`
9+
= note: but `Foo<(&'2 isize, &'2 isize)>` is actually implemented for the type `SomeStruct`, for some lifetime `'2`
1010

1111
error: aborting due to previous error
1212

src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ LL | foo::<()>(); //~ ERROR not general enough
55
| ^^^^^^^^^
66
|
77
= note: Due to a where-clause on `foo`,
8-
= note: `()` must implement `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>`
9-
= note: but `()` only implements `Trait<fn(std::cell::Cell<&'0 u32>)>` for some lifetime `'0`
8+
= note: `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>` would have to be implemented for the type `()`
9+
= note: but `Trait<fn(std::cell::Cell<&'0 u32>)>` is actually implemented for the type `()`, for some lifetime `'0`
1010

1111
error: aborting due to previous error
1212

src/test/ui/hrtb/hrtb-just-for-static.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ LL | want_hrtb::<StaticInt>() //~ ERROR
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: Due to a where-clause on `want_hrtb`,
8-
= note: `StaticInt` must implement `Foo<&'0 isize>` for any lifetime `'0`
9-
= note: but `StaticInt` only implements `Foo<&'1 isize>` for some lifetime `'1`
8+
= note: `Foo<&'0 isize>` would have to be implemented for the type `StaticInt`, for any lifetime `'0`
9+
= note: but `Foo<&'1 isize>` is actually implemented for the type `StaticInt`, for some lifetime `'1`
1010

1111
error: implementation of `Foo` is not general enough
1212
--> $DIR/hrtb-just-for-static.rs:30:5
@@ -15,8 +15,8 @@ LL | want_hrtb::<&'a u32>() //~ ERROR
1515
| ^^^^^^^^^^^^^^^^^^^^
1616
|
1717
= note: Due to a where-clause on `want_hrtb`,
18-
= note: `&'a u32` must implement `Foo<&'0 isize>` for any lifetime `'0`
19-
= note: but `&'1 u32` only implements `Foo<&'1 isize>` for the lifetime `'1`
18+
= note: `Foo<&'0 isize>` would have to be implemented for the type `&'a u32`, for any lifetime `'0`
19+
= note: but `Foo<&'1 isize>` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
2020

2121
error: aborting due to 2 previous errors
2222

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
error[E0308]: mismatched types
1+
error: implementation of `Foo` is not general enough
22
--> $DIR/hrtb-perfect-forwarding.rs:46:5
33
|
4-
LL | foo_hrtb_bar_not(&mut t); //~ ERROR E0308
5-
| ^^^^^^^^^^^^^^^^ one type is more general than the other
4+
LL | foo_hrtb_bar_not(&mut t); //~ ERROR not general enough
5+
| ^^^^^^^^^^^^^^^^
66
|
7-
= note: expected type `Foo<&'a isize>`
8-
found type `Foo<&isize>`
7+
= note: Due to a where-clause on `foo_hrtb_bar_not`,
8+
= note: `Foo<&'0 isize>` would have to be implemented for the type `&mut T`, for any lifetime `'0`
9+
= note: but `Foo<&'1 isize>` is actually implemented for the type `&mut T`, for some lifetime `'1`
910

1011
error: aborting due to previous error
1112

12-
For more information about this error, try `rustc --explain E0308`.

src/test/ui/issues/issue-54302-cases.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@ error: implementation of `Foo` is not general enough
44
LL | <u32 as RefFoo<u32>>::ref_foo(a)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `&'0 u32` must implement `Foo<'static, u32>` for any lifetime `'0`
8-
= note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
7+
= note: `Foo<'static, u32>` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`
8+
= note: but `Foo<'_, u32>` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
99

1010
error: implementation of `Foo` is not general enough
1111
--> $DIR/issue-54302-cases.rs:69:5
1212
|
1313
LL | <i32 as RefFoo<i32>>::ref_foo(a)
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515
|
16-
= note: `&'0 i32` must implement `Foo<'static, i32>` for any lifetime `'0`
17-
= note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
16+
= note: `Foo<'static, i32>` would have to be implemented for the type `&'0 i32`, for any lifetime `'0`
17+
= note: but `Foo<'_, i32>` is actually implemented for the type `&'1 i32`, for the specific lifetime `'1`
1818

1919
error: implementation of `Foo` is not general enough
2020
--> $DIR/issue-54302-cases.rs:75:5
2121
|
2222
LL | <u64 as RefFoo<u64>>::ref_foo(a)
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424
|
25-
= note: `&'0 u64` must implement `Foo<'static, u64>` for any lifetime `'0`
26-
= note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
25+
= note: `Foo<'static, u64>` would have to be implemented for the type `&'0 u64`, for any lifetime `'0`
26+
= note: but `Foo<'_, u64>` is actually implemented for the type `&'1 u64`, for the specific lifetime `'1`
2727

2828
error: implementation of `Foo` is not general enough
2929
--> $DIR/issue-54302-cases.rs:81:5
3030
|
3131
LL | <i64 as RefFoo<i64>>::ref_foo(a)
3232
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333
|
34-
= note: `&'0 i64` must implement `Foo<'static, i64>` for any lifetime `'0`
35-
= note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
34+
= note: `Foo<'static, i64>` would have to be implemented for the type `&'0 i64`, for any lifetime `'0`
35+
= note: but `Foo<'_, i64>` is actually implemented for the type `&'1 i64`, for the specific lifetime `'1`
3636

3737
error: aborting due to 4 previous errors
3838

0 commit comments

Comments
 (0)