Skip to content

Commit

Permalink
Refer to synthetically named lifetimes as "some specific lifetime" ra…
Browse files Browse the repository at this point in the history
…ther than "the specific lifetime"
  • Loading branch information
lqd committed Jan 28, 2019
1 parent e077501 commit c97d135
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,14 @@ impl NiceRegionError<'me, 'gcx, 'tcx> {
if any_self_ty_has_vid {
err.note(&format!(
"but `{}` is actually implemented for the type `{}`, \
for the specific lifetime `'{}`",
for some specific lifetime `'{}`",
actual_trait_ref,
actual_trait_ref.self_ty(),
n
));
} else {
err.note(&format!(
"but `{}` actually implements `{}`, for some lifetime `'{}`",
"but `{}` actually implements `{}`, for some specific lifetime `'{}`",
actual_trait_ref.self_ty(),
actual_trait_ref,
n
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/associated-types/associated-types-eq-hr.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LL | tuple_one::<Tuple>();
|
= note: Due to a where-clause on `tuple_one`,
= note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`
= note: but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some lifetime `'2`
= note: but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`

error: implementation of `TheTrait` is not general enough
--> $DIR/associated-types-eq-hr.rs:96:5
Expand All @@ -52,7 +52,7 @@ LL | tuple_two::<Tuple>();
|
= note: Due to a where-clause on `tuple_two`,
= note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`
= note: but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some lifetime `'2`
= note: but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`

error: implementation of `TheTrait` is not general enough
--> $DIR/associated-types-eq-hr.rs:105:5
Expand All @@ -62,7 +62,7 @@ LL | tuple_four::<Tuple>();
|
= note: Due to a where-clause on `tuple_four`,
= note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`
= note: but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some lifetime `'2`
= note: but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`

error: aborting due to 5 previous errors

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | foo(());
|
= note: Due to a where-clause on `foo`,
= note: `Mirror` would have to be implemented for the type `&'0 ()`, for any lifetime `'0`
= note: but `Mirror` is actually implemented for the type `&'1 ()`, for the specific lifetime `'1`
= note: but `Mirror` is actually implemented for the type `&'1 ()`, for some specific lifetime `'1`

error: aborting due to previous error

4 changes: 2 additions & 2 deletions src/test/ui/generator/auto-trait-regions.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | assert_foo(gen);
| ^^^^^^^^^^
|
= note: `Foo` would have to be implemented for the type `&'0 OnlyFooIfStaticRef`, for any lifetime `'0`
= note: but `Foo` is actually implemented for the type `&'1 OnlyFooIfStaticRef`, for the specific lifetime `'1`
= note: but `Foo` is actually implemented for the type `&'1 OnlyFooIfStaticRef`, for some specific lifetime `'1`

error: implementation of `Foo` is not general enough
--> $DIR/auto-trait-regions.rs:48:5
Expand All @@ -14,7 +14,7 @@ LL | assert_foo(gen);
| ^^^^^^^^^^
|
= note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`
= note: but `Foo` is actually implemented for the type `A<'_, '2>`, for the specific lifetime `'2`
= note: but `Foo` is actually implemented for the type `A<'_, '2>`, for some specific lifetime `'2`

error: aborting due to 2 previous errors

2 changes: 1 addition & 1 deletion src/test/ui/hrtb/hrtb-cache-issue-54302.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | assert_deserialize_owned::<&'static str>(); //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `&'static str` must implement `Deserialize<'0>`, for any lifetime `'0`
= note: but `&str` actually implements `Deserialize<'1>`, for some lifetime `'1`
= note: but `&str` actually implements `Deserialize<'1>`, for some specific lifetime `'1`

error: aborting due to previous error

2 changes: 1 addition & 1 deletion src/test/ui/hrtb/hrtb-conflate-regions.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | fn b() { want_foo2::<SomeStruct>(); } //~ ERROR
|
= note: Due to a where-clause on `want_foo2`,
= note: `SomeStruct` must implement `Foo<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`
= note: but `SomeStruct` actually implements `Foo<(&'2 isize, &'2 isize)>`, for some lifetime `'2`
= note: but `SomeStruct` actually implements `Foo<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`

error: aborting due to previous error

2 changes: 1 addition & 1 deletion src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | foo::<()>(); //~ ERROR not general enough
|
= note: Due to a where-clause on `foo`,
= note: `()` must implement `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>`
= note: but `()` actually implements `Trait<fn(std::cell::Cell<&'0 u32>)>`, for some lifetime `'0`
= note: but `()` actually implements `Trait<fn(std::cell::Cell<&'0 u32>)>`, for some specific lifetime `'0`

error: aborting due to previous error

4 changes: 2 additions & 2 deletions src/test/ui/hrtb/hrtb-just-for-static.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | want_hrtb::<StaticInt>() //~ ERROR
|
= note: Due to a where-clause on `want_hrtb`,
= note: `StaticInt` must implement `Foo<&'0 isize>`, for any lifetime `'0`
= note: but `StaticInt` actually implements `Foo<&'1 isize>`, for some lifetime `'1`
= note: but `StaticInt` actually implements `Foo<&'1 isize>`, for some specific lifetime `'1`

error: implementation of `Foo` is not general enough
--> $DIR/hrtb-just-for-static.rs:30:5
Expand All @@ -16,7 +16,7 @@ LL | want_hrtb::<&'a u32>() //~ ERROR
|
= note: Due to a where-clause on `want_hrtb`,
= note: `Foo<&'0 isize>` would have to be implemented for the type `&'a u32`, for any lifetime `'0`
= note: but `Foo<&'1 isize>` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
= note: but `Foo<&'1 isize>` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`

error: aborting due to 2 previous errors

2 changes: 1 addition & 1 deletion src/test/ui/hrtb/hrtb-perfect-forwarding.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | foo_hrtb_bar_not(&mut t); //~ ERROR not general enough
|
= note: Due to a where-clause on `foo_hrtb_bar_not`,
= note: `&mut T` must implement `Foo<&'0 isize>`, for any lifetime `'0`
= note: but `&mut T` actually implements `Foo<&'1 isize>`, for some lifetime `'1`
= note: but `&mut T` actually implements `Foo<&'1 isize>`, for some specific lifetime `'1`

error: aborting due to previous error

8 changes: 4 additions & 4 deletions src/test/ui/issues/issue-54302-cases.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | <u32 as RefFoo<u32>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Foo<'static, u32>` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`
= note: but `Foo<'_, u32>` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
= note: but `Foo<'_, u32>` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`

error: implementation of `Foo` is not general enough
--> $DIR/issue-54302-cases.rs:69:5
Expand All @@ -14,7 +14,7 @@ LL | <i32 as RefFoo<i32>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Foo<'static, i32>` would have to be implemented for the type `&'0 i32`, for any lifetime `'0`
= note: but `Foo<'_, i32>` is actually implemented for the type `&'1 i32`, for the specific lifetime `'1`
= note: but `Foo<'_, i32>` is actually implemented for the type `&'1 i32`, for some specific lifetime `'1`

error: implementation of `Foo` is not general enough
--> $DIR/issue-54302-cases.rs:75:5
Expand All @@ -23,7 +23,7 @@ LL | <u64 as RefFoo<u64>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Foo<'static, u64>` would have to be implemented for the type `&'0 u64`, for any lifetime `'0`
= note: but `Foo<'_, u64>` is actually implemented for the type `&'1 u64`, for the specific lifetime `'1`
= note: but `Foo<'_, u64>` is actually implemented for the type `&'1 u64`, for some specific lifetime `'1`

error: implementation of `Foo` is not general enough
--> $DIR/issue-54302-cases.rs:81:5
Expand All @@ -32,7 +32,7 @@ LL | <i64 as RefFoo<i64>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Foo<'static, i64>` would have to be implemented for the type `&'0 i64`, for any lifetime `'0`
= note: but `Foo<'_, i64>` is actually implemented for the type `&'1 i64`, for the specific lifetime `'1`
= note: but `Foo<'_, i64>` is actually implemented for the type `&'1 i64`, for some specific lifetime `'1`

error: aborting due to 4 previous errors

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-54302.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | assert_deserialize_owned::<&'static str>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `&'static str` must implement `Deserialize<'0>`, for any lifetime `'0`
= note: but `&str` actually implements `Deserialize<'1>`, for some lifetime `'1`
= note: but `&str` actually implements `Deserialize<'1>`, for some specific lifetime `'1`

error: aborting due to previous error

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-57362-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | let x = <fn (&())>::make_g(); //~ ERROR not general enough
| ^^^^^^^^^^^^^^^^^^
|
= note: `X` would have to be implemented for the type `for<'r> fn(&'r ())`
= note: but `X` is actually implemented for the type `fn(&'0 ())`, for the specific lifetime `'0`
= note: but `X` is actually implemented for the type `fn(&'0 ())`, for some specific lifetime `'0`

error: aborting due to previous error

2 changes: 1 addition & 1 deletion src/test/ui/where-clauses/where-for-self-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | foo(&X); //~ ERROR implementation of `Bar` is not general enough
|
= note: Due to a where-clause on `foo`,
= note: `Bar` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`
= note: but `Bar` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
= note: but `Bar` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`

error: aborting due to previous error

0 comments on commit c97d135

Please sign in to comment.