Avoid repeating self type in placeholder error
This commit is contained in:
parent
c2066cf069
commit
daab6db1a0
6 changed files with 27 additions and 11 deletions
|
|
@ -35,7 +35,7 @@ LL | tuple_one::<Tuple>();
|
|||
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||
|
|
||||
= 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 specific lifetime `'2`
|
||||
= note: ...but it 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
|
||||
|
|
@ -44,7 +44,7 @@ LL | tuple_one::<Tuple>();
|
|||
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||
|
|
||||
= 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 specific lifetime `'2`
|
||||
= note: ...but it 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:102:5
|
||||
|
|
@ -53,7 +53,7 @@ LL | tuple_two::<Tuple>();
|
|||
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||
|
|
||||
= 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 specific lifetime `'2`
|
||||
= note: ...but it 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:102:5
|
||||
|
|
@ -62,7 +62,7 @@ LL | tuple_two::<Tuple>();
|
|||
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||
|
|
||||
= 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 specific lifetime `'2`
|
||||
= note: ...but it 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:112:5
|
||||
|
|
@ -71,7 +71,7 @@ LL | tuple_four::<Tuple>();
|
|||
| ^^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||
|
|
||||
= 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 specific lifetime `'2`
|
||||
= note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | fn b() { want_foo2::<SomeStruct>(); }
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||
|
|
||||
= 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 specific lifetime `'2`
|
||||
= note: ...but it actually implements `Foo<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | foo::<()>();
|
|||
| ^^^^^^^^^ implementation of `Trait` is not general enough
|
||||
|
|
||||
= note: `()` must implement `Trait<for<'b> fn(&'b u32)>`
|
||||
= note: ...but `()` actually implements `Trait<fn(&'0 u32)>`, for some specific lifetime `'0`
|
||||
= note: ...but it actually implements `Trait<fn(&'0 u32)>`, for some specific lifetime `'0`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | foo::<()>();
|
|||
| ^^^^^^^^^ implementation of `Trait` is not general enough
|
||||
|
|
||||
= note: `()` must implement `Trait<for<'b> fn(Cell<&'b u32>)>`
|
||||
= note: ...but `()` actually implements `Trait<fn(Cell<&'0 u32>)>`, for some specific lifetime `'0`
|
||||
= note: ...but it actually implements `Trait<fn(Cell<&'0 u32>)>`, for some specific lifetime `'0`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LL | want_hrtb::<StaticInt>()
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||
|
|
||||
= note: `StaticInt` must implement `Foo<&'0 isize>`, for any lifetime `'0`...
|
||||
= note: ...but `StaticInt` actually implements `Foo<&'1 isize>`, for some specific lifetime `'1`
|
||||
= note: ...but it 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue