| ^^^^^^^^^^^^^^^^^^
|
= 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` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+ = note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
+ = note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
error: implementation of `TheTrait` is not general enough
--> $DIR/associated-types-eq-hr.rs:96:5
| ^^^^^^^^^^^^^^^^^^
|
= 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` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+ = note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
+ = note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
error: implementation of `TheTrait` is not general enough
--> $DIR/associated-types-eq-hr.rs:105:5
| ^^^^^^^^^^^^^^^^^^^
|
= 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` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+ = note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
+ = note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
error: aborting due to 5 previous errors
-error[E0308]: mismatched types
+error: implementation of `Mirror` is not general enough
--> $DIR/higher-ranked-projection.rs:25:5
|
LL | foo(());
- | ^^^ one type is more general than the other
+ | ^^^
|
- = note: expected type `Mirror`
- found type `Mirror`
+ = 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`
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0308`.
|
LL | / fn main() { //[good]~ ERROR compilation successful
LL | | foo(());
-LL | | //[bad]~^ ERROR E0308
+LL | | //[bad]~^ ERROR not general enough
LL | | }
| |_^
LL | assert_foo(gen);
| ^^^^^^^^^^
|
- = note: `&'0 OnlyFooIfStaticRef` must implement `Foo` for any lifetime `'0`
- = note: but `&'1 OnlyFooIfStaticRef` only implements `Foo` for the lifetime `'1`
+ = 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`
error: implementation of `Foo` is not general enough
--> $DIR/auto-trait-regions.rs:48:5
LL | assert_foo(gen);
| ^^^^^^^^^^
|
- = note: `A<'0, '1>` must implement `Foo` for any two lifetimes `'0` and `'1`
- = note: but `A<'_, '2>` only implements `Foo` for the lifetime `'2`
+ = 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`
error: aborting due to 2 previous errors
LL | assert_deserialize_owned::<&'static str>(); //~ ERROR
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: `&'static str` must implement `Deserialize<'0>` for any lifetime `'0`
- = note: but `&str` only implements `Deserialize<'1>` for some lifetime `'1`
+ = note: `Deserialize<'0>` would have to be implemented for the type `&'static str`, for any lifetime `'0`
+ = note: but `Deserialize<'1>` is actually implemented for the type `&str`, for some lifetime `'1`
error: aborting due to previous 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` only implements `Foo<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+ = note: `Foo<(&'0 isize, &'1 isize)>` would have to be implemented for the type `SomeStruct`, for any two lifetimes `'0` and `'1`
+ = note: but `Foo<(&'2 isize, &'2 isize)>` is actually implemented for the type `SomeStruct`, for some lifetime `'2`
error: aborting due to previous error
| ^^^^^^^^^
|
= note: Due to a where-clause on `foo`,
- = note: `()` must implement `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>`
- = note: but `()` only implements `Trait<fn(std::cell::Cell<&'0 u32>)>` for some lifetime `'0`
+ = note: `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>` would have to be implemented for the type `()`
+ = note: but `Trait<fn(std::cell::Cell<&'0 u32>)>` is actually implemented for the type `()`, for some lifetime `'0`
error: aborting due to previous error
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: Due to a where-clause on `want_hrtb`,
- = note: `StaticInt` must implement `Foo<&'0 isize>` for any lifetime `'0`
- = note: but `StaticInt` only implements `Foo<&'1 isize>` for some lifetime `'1`
+ = note: `Foo<&'0 isize>` would have to be implemented for the type `StaticInt`, for any lifetime `'0`
+ = note: but `Foo<&'1 isize>` is actually implemented for the type `StaticInt`, for some lifetime `'1`
error: implementation of `Foo` is not general enough
--> $DIR/hrtb-just-for-static.rs:30:5
| ^^^^^^^^^^^^^^^^^^^^
|
= note: Due to a where-clause on `want_hrtb`,
- = note: `&'a u32` must implement `Foo<&'0 isize>` for any lifetime `'0`
- = note: but `&'1 u32` only implements `Foo<&'1 isize>` for the lifetime `'1`
+ = 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`
error: aborting due to 2 previous errors
-error[E0308]: mismatched types
+error: implementation of `Foo` is not general enough
--> $DIR/hrtb-perfect-forwarding.rs:46:5
|
-LL | foo_hrtb_bar_not(&mut t); //~ ERROR E0308
- | ^^^^^^^^^^^^^^^^ one type is more general than the other
+LL | foo_hrtb_bar_not(&mut t); //~ ERROR not general enough
+ | ^^^^^^^^^^^^^^^^
|
- = note: expected type `Foo<&'a isize>`
- found type `Foo<&isize>`
+ = note: Due to a where-clause on `foo_hrtb_bar_not`,
+ = note: `Foo<&'0 isize>` would have to be implemented for the type `&mut T`, for any lifetime `'0`
+ = note: but `Foo<&'1 isize>` is actually implemented for the type `&mut T`, for some lifetime `'1`
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0308`.
LL | <u32 as RefFoo<u32>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: `&'0 u32` must implement `Foo<'static, u32>` for any lifetime `'0`
- = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+ = 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`
error: implementation of `Foo` is not general enough
--> $DIR/issue-54302-cases.rs:69:5
LL | <i32 as RefFoo<i32>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: `&'0 i32` must implement `Foo<'static, i32>` for any lifetime `'0`
- = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+ = 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`
error: implementation of `Foo` is not general enough
--> $DIR/issue-54302-cases.rs:75:5
LL | <u64 as RefFoo<u64>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: `&'0 u64` must implement `Foo<'static, u64>` for any lifetime `'0`
- = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+ = 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`
error: implementation of `Foo` is not general enough
--> $DIR/issue-54302-cases.rs:81:5
LL | <i64 as RefFoo<i64>>::ref_foo(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: `&'0 i64` must implement `Foo<'static, i64>` for any lifetime `'0`
- = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+ = 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`
error: aborting due to 4 previous errors
LL | assert_deserialize_owned::<&'static str>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: `&'static str` must implement `Deserialize<'0>` for any lifetime `'0`
- = note: but `&str` only implements `Deserialize<'1>` for some lifetime `'1`
+ = note: `Deserialize<'0>` would have to be implemented for the type `&'static str`, for any lifetime `'0`
+ = note: but `Deserialize<'1>` is actually implemented for the type `&str`, for some lifetime `'1`
error: aborting due to previous error
| ^^^
|
= note: Due to a where-clause on `foo`,
- = note: `&'0 _` must implement `Bar` for any lifetime `'0`
- = note: but `&'1 u32` only implements `Bar` for the lifetime `'1`
+ = 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`
error: aborting due to previous error