Remove unnecessary note on errors
Seeing the trait definition doesn't help with implementation not general enough errors, so don't make the error message larger to show it.
This commit is contained in:
parent
638980a07f
commit
c2066cf069
14 changed files with 28 additions and 142 deletions
|
@ -207,10 +207,6 @@ impl NiceRegionError<'me, 'tcx> {
|
||||||
self.tcx().def_path_str(trait_def_id),
|
self.tcx().def_path_str(trait_def_id),
|
||||||
);
|
);
|
||||||
let mut err = self.tcx().sess.struct_span_err(span, &msg);
|
let mut err = self.tcx().sess.struct_span_err(span, &msg);
|
||||||
err.span_label(
|
|
||||||
self.tcx().def_span(trait_def_id),
|
|
||||||
format!("trait `{}` defined here", self.tcx().def_path_str(trait_def_id)),
|
|
||||||
);
|
|
||||||
|
|
||||||
let leading_ellipsis = if let ObligationCauseCode::ItemObligation(def_id) = cause.code {
|
let leading_ellipsis = if let ObligationCauseCode::ItemObligation(def_id) = cause.code {
|
||||||
err.span_label(span, "doesn't satisfy where-clause");
|
err.span_label(span, "doesn't satisfy where-clause");
|
||||||
|
|
|
@ -31,15 +31,8 @@ LL | bar::<IntStruct>();
|
||||||
error: implementation of `TheTrait` is not general enough
|
error: implementation of `TheTrait` is not general enough
|
||||||
--> $DIR/associated-types-eq-hr.rs:96:5
|
--> $DIR/associated-types-eq-hr.rs:96:5
|
||||||
|
|
|
|
||||||
LL | / pub trait TheTrait<T> {
|
LL | tuple_one::<Tuple>();
|
||||||
LL | | type A;
|
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||||
LL | |
|
|
||||||
LL | | fn get(&self, t: T) -> Self::A;
|
|
||||||
LL | | }
|
|
||||||
| |_- trait `TheTrait` defined here
|
|
||||||
...
|
|
||||||
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: `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 `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||||
|
@ -47,15 +40,8 @@ LL | tuple_one::<Tuple>();
|
||||||
error: implementation of `TheTrait` is not general enough
|
error: implementation of `TheTrait` is not general enough
|
||||||
--> $DIR/associated-types-eq-hr.rs:96:5
|
--> $DIR/associated-types-eq-hr.rs:96:5
|
||||||
|
|
|
|
||||||
LL | / pub trait TheTrait<T> {
|
LL | tuple_one::<Tuple>();
|
||||||
LL | | type A;
|
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||||
LL | |
|
|
||||||
LL | | fn get(&self, t: T) -> Self::A;
|
|
||||||
LL | | }
|
|
||||||
| |_- trait `TheTrait` defined here
|
|
||||||
...
|
|
||||||
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: `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 `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||||
|
@ -63,15 +49,8 @@ LL | tuple_one::<Tuple>();
|
||||||
error: implementation of `TheTrait` is not general enough
|
error: implementation of `TheTrait` is not general enough
|
||||||
--> $DIR/associated-types-eq-hr.rs:102:5
|
--> $DIR/associated-types-eq-hr.rs:102:5
|
||||||
|
|
|
|
||||||
LL | / pub trait TheTrait<T> {
|
LL | tuple_two::<Tuple>();
|
||||||
LL | | type A;
|
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||||
LL | |
|
|
||||||
LL | | fn get(&self, t: T) -> Self::A;
|
|
||||||
LL | | }
|
|
||||||
| |_- trait `TheTrait` defined here
|
|
||||||
...
|
|
||||||
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: `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 `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||||
|
@ -79,15 +58,8 @@ LL | tuple_two::<Tuple>();
|
||||||
error: implementation of `TheTrait` is not general enough
|
error: implementation of `TheTrait` is not general enough
|
||||||
--> $DIR/associated-types-eq-hr.rs:102:5
|
--> $DIR/associated-types-eq-hr.rs:102:5
|
||||||
|
|
|
|
||||||
LL | / pub trait TheTrait<T> {
|
LL | tuple_two::<Tuple>();
|
||||||
LL | | type A;
|
| ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||||
LL | |
|
|
||||||
LL | | fn get(&self, t: T) -> Self::A;
|
|
||||||
LL | | }
|
|
||||||
| |_- trait `TheTrait` defined here
|
|
||||||
...
|
|
||||||
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: `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 `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||||
|
@ -95,15 +67,8 @@ LL | tuple_two::<Tuple>();
|
||||||
error: implementation of `TheTrait` is not general enough
|
error: implementation of `TheTrait` is not general enough
|
||||||
--> $DIR/associated-types-eq-hr.rs:112:5
|
--> $DIR/associated-types-eq-hr.rs:112:5
|
||||||
|
|
|
|
||||||
LL | / pub trait TheTrait<T> {
|
LL | tuple_four::<Tuple>();
|
||||||
LL | | type A;
|
| ^^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
|
||||||
LL | |
|
|
||||||
LL | | fn get(&self, t: T) -> Self::A;
|
|
||||||
LL | | }
|
|
||||||
| |_- trait `TheTrait` defined here
|
|
||||||
...
|
|
||||||
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: `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 `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/auto-trait-regions.rs:31:5
|
--> $DIR/auto-trait-regions.rs:31:5
|
||||||
|
|
|
|
||||||
LL | auto trait Foo {}
|
|
||||||
| ----------------- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | assert_foo(gen);
|
LL | assert_foo(gen);
|
||||||
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
|
|
|
|
||||||
|
@ -13,9 +10,6 @@ LL | assert_foo(gen);
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/auto-trait-regions.rs:31:5
|
--> $DIR/auto-trait-regions.rs:31:5
|
||||||
|
|
|
|
||||||
LL | auto trait Foo {}
|
|
||||||
| ----------------- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | assert_foo(gen);
|
LL | assert_foo(gen);
|
||||||
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
|
|
|
|
||||||
|
@ -25,9 +19,6 @@ LL | assert_foo(gen);
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/auto-trait-regions.rs:50:5
|
--> $DIR/auto-trait-regions.rs:50:5
|
||||||
|
|
|
|
||||||
LL | auto trait Foo {}
|
|
||||||
| ----------------- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | assert_foo(gen);
|
LL | assert_foo(gen);
|
||||||
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
|
|
|
|
||||||
|
@ -37,9 +28,6 @@ LL | assert_foo(gen);
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/auto-trait-regions.rs:50:5
|
--> $DIR/auto-trait-regions.rs:50:5
|
||||||
|
|
|
|
||||||
LL | auto trait Foo {}
|
|
||||||
| ----------------- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | assert_foo(gen);
|
LL | assert_foo(gen);
|
||||||
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
|
|
|
|
||||||
|
|
|
@ -3,9 +3,6 @@ error: implementation of `Foo` is not general enough
|
||||||
|
|
|
|
||||||
LL | test::<FooS>(&mut 42);
|
LL | test::<FooS>(&mut 42);
|
||||||
| ^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
| ^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
...
|
|
||||||
LL | trait Foo<'a> {}
|
|
||||||
| ---------------- trait `Foo` defined here
|
|
||||||
|
|
|
|
||||||
= note: `FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`...
|
= note: `FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`...
|
||||||
= note: ...but `FooS<'_>` actually implements `Foo<'1>`, for some specific lifetime `'1`
|
= note: ...but `FooS<'_>` actually implements `Foo<'1>`, for some specific lifetime `'1`
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
error: implementation of `Deserialize` is not general enough
|
error: implementation of `Deserialize` is not general enough
|
||||||
--> $DIR/hrtb-cache-issue-54302.rs:19:5
|
--> $DIR/hrtb-cache-issue-54302.rs:19:5
|
||||||
|
|
|
|
||||||
LL | trait Deserialize<'de> {}
|
|
||||||
| ------------------------- trait `Deserialize` defined here
|
|
||||||
...
|
|
||||||
LL | assert_deserialize_owned::<&'static str>();
|
LL | assert_deserialize_owned::<&'static str>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Deserialize` is not general enough
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Deserialize` is not general enough
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/hrtb-conflate-regions.rs:27:10
|
--> $DIR/hrtb-conflate-regions.rs:27:10
|
||||||
|
|
|
|
||||||
LL | / trait Foo<X> {
|
LL | fn b() { want_foo2::<SomeStruct>(); }
|
||||||
LL | | fn foo(&self, x: X) { }
|
| ^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
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: `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 `SomeStruct` actually implements `Foo<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
error: implementation of `Trait` is not general enough
|
error: implementation of `Trait` is not general enough
|
||||||
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5
|
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5
|
||||||
|
|
|
|
||||||
LL | trait Trait<T> {}
|
|
||||||
| ----------------- trait `Trait` defined here
|
|
||||||
...
|
|
||||||
LL | foo::<()>();
|
LL | foo::<()>();
|
||||||
| ^^^^^^^^^ implementation of `Trait` is not general enough
|
| ^^^^^^^^^ implementation of `Trait` is not general enough
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
error: implementation of `Trait` is not general enough
|
error: implementation of `Trait` is not general enough
|
||||||
--> $DIR/hrtb-exists-forall-trait-invariant.rs:28:5
|
--> $DIR/hrtb-exists-forall-trait-invariant.rs:28:5
|
||||||
|
|
|
|
||||||
LL | trait Trait<T> {}
|
|
||||||
| ----------------- trait `Trait` defined here
|
|
||||||
...
|
|
||||||
LL | foo::<()>();
|
LL | foo::<()>();
|
||||||
| ^^^^^^^^^ implementation of `Trait` is not general enough
|
| ^^^^^^^^^ implementation of `Trait` is not general enough
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/hrtb-just-for-static.rs:24:5
|
--> $DIR/hrtb-just-for-static.rs:24:5
|
||||||
|
|
|
|
||||||
LL | / trait Foo<X> {
|
LL | want_hrtb::<StaticInt>()
|
||||||
LL | | fn foo(&self, x: X) { }
|
| ^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | want_hrtb::<StaticInt>()
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `StaticInt` must implement `Foo<&'0 isize>`, for any lifetime `'0`...
|
= 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 `StaticInt` actually implements `Foo<&'1 isize>`, for some specific lifetime `'1`
|
||||||
|
@ -15,13 +10,8 @@ LL | want_hrtb::<StaticInt>()
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/hrtb-just-for-static.rs:30:5
|
--> $DIR/hrtb-just-for-static.rs:30:5
|
||||||
|
|
|
|
||||||
LL | / trait Foo<X> {
|
LL | want_hrtb::<&'a u32>()
|
||||||
LL | | fn foo(&self, x: X) { }
|
| ^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | want_hrtb::<&'a u32>()
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `Foo<&'0 isize>` would have to be implemented for the type `&'a u32`, for any lifetime `'0`...
|
= 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 some specific lifetime `'1`
|
= note: ...but `Foo<&'1 isize>` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/issue-46989.rs:38:5
|
--> $DIR/issue-46989.rs:38:5
|
||||||
|
|
|
|
||||||
LL | trait Foo {}
|
|
||||||
| ------------ trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | assert_foo::<fn(&i32)>();
|
LL | assert_foo::<fn(&i32)>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
| ^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/issue-54302-cases.rs:63:5
|
--> $DIR/issue-54302-cases.rs:63:5
|
||||||
|
|
|
|
||||||
LL | / trait Foo<'x, T> {
|
LL | <u32 as RefFoo<u32>>::ref_foo(a)
|
||||||
LL | | fn foo(self) -> &'x T;
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | <u32 as RefFoo<u32>>::ref_foo(a)
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `Foo<'static, u32>` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`...
|
= 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 some specific lifetime `'1`
|
= note: ...but `Foo<'_, u32>` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`
|
||||||
|
@ -15,13 +10,8 @@ LL | <u32 as RefFoo<u32>>::ref_foo(a)
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/issue-54302-cases.rs:69:5
|
--> $DIR/issue-54302-cases.rs:69:5
|
||||||
|
|
|
|
||||||
LL | / trait Foo<'x, T> {
|
LL | <i32 as RefFoo<i32>>::ref_foo(a)
|
||||||
LL | | fn foo(self) -> &'x T;
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | <i32 as RefFoo<i32>>::ref_foo(a)
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `Foo<'static, i32>` would have to be implemented for the type `&'0 i32`, for any lifetime `'0`...
|
= 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 some specific lifetime `'1`
|
= note: ...but `Foo<'_, i32>` is actually implemented for the type `&'1 i32`, for some specific lifetime `'1`
|
||||||
|
@ -29,13 +19,8 @@ LL | <i32 as RefFoo<i32>>::ref_foo(a)
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/issue-54302-cases.rs:75:5
|
--> $DIR/issue-54302-cases.rs:75:5
|
||||||
|
|
|
|
||||||
LL | / trait Foo<'x, T> {
|
LL | <u64 as RefFoo<u64>>::ref_foo(a)
|
||||||
LL | | fn foo(self) -> &'x T;
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | <u64 as RefFoo<u64>>::ref_foo(a)
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `Foo<'static, u64>` would have to be implemented for the type `&'0 u64`, for any lifetime `'0`...
|
= 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 some specific lifetime `'1`
|
= note: ...but `Foo<'_, u64>` is actually implemented for the type `&'1 u64`, for some specific lifetime `'1`
|
||||||
|
@ -43,13 +28,8 @@ LL | <u64 as RefFoo<u64>>::ref_foo(a)
|
||||||
error: implementation of `Foo` is not general enough
|
error: implementation of `Foo` is not general enough
|
||||||
--> $DIR/issue-54302-cases.rs:81:5
|
--> $DIR/issue-54302-cases.rs:81:5
|
||||||
|
|
|
|
||||||
LL | / trait Foo<'x, T> {
|
LL | <i64 as RefFoo<i64>>::ref_foo(a)
|
||||||
LL | | fn foo(self) -> &'x T;
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Foo` defined here
|
|
||||||
...
|
|
||||||
LL | <i64 as RefFoo<i64>>::ref_foo(a)
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `Foo<'static, i64>` would have to be implemented for the type `&'0 i64`, for any lifetime `'0`...
|
= 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 some specific lifetime `'1`
|
= note: ...but `Foo<'_, i64>` is actually implemented for the type `&'1 i64`, for some specific lifetime `'1`
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
error: implementation of `Deserialize` is not general enough
|
error: implementation of `Deserialize` is not general enough
|
||||||
--> $DIR/issue-54302.rs:13:5
|
--> $DIR/issue-54302.rs:13:5
|
||||||
|
|
|
|
||||||
LL | trait Deserialize<'de> {}
|
|
||||||
| ------------------------- trait `Deserialize` defined here
|
|
||||||
...
|
|
||||||
LL | assert_deserialize_owned::<&'static str>();
|
LL | assert_deserialize_owned::<&'static str>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Deserialize` is not general enough
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Deserialize` is not general enough
|
||||||
|
|
|
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
error: implementation of `DistributedIteratorMulti` is not general enough
|
error: implementation of `DistributedIteratorMulti` is not general enough
|
||||||
--> $DIR/issue-55731.rs:48:5
|
--> $DIR/issue-55731.rs:48:5
|
||||||
|
|
|
|
||||||
LL | / trait DistributedIteratorMulti<Source> {
|
LL | multi(Map {
|
||||||
LL | | type Item;
|
| ^^^^^ implementation of `DistributedIteratorMulti` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `DistributedIteratorMulti` defined here
|
|
||||||
...
|
|
||||||
LL | multi(Map {
|
|
||||||
| ^^^^^ implementation of `DistributedIteratorMulti` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `DistributedIteratorMulti<&'0 ()>` would have to be implemented for the type `Cloned<&()>`, for any lifetime `'0`...
|
= note: `DistributedIteratorMulti<&'0 ()>` would have to be implemented for the type `Cloned<&()>`, for any lifetime `'0`...
|
||||||
= note: ...but `DistributedIteratorMulti<&'1 ()>` is actually implemented for the type `Cloned<&'1 ()>`, for some specific lifetime `'1`
|
= note: ...but `DistributedIteratorMulti<&'1 ()>` is actually implemented for the type `Cloned<&'1 ()>`, for some specific lifetime `'1`
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
error: implementation of `Bar` is not general enough
|
error: implementation of `Bar` is not general enough
|
||||||
--> $DIR/where-for-self-2.rs:23:5
|
--> $DIR/where-for-self-2.rs:23:5
|
||||||
|
|
|
|
||||||
LL | / trait Bar {
|
LL | foo(&X);
|
||||||
LL | | fn bar(&self);
|
| ^^^ implementation of `Bar` is not general enough
|
||||||
LL | | }
|
|
||||||
| |_- trait `Bar` defined here
|
|
||||||
...
|
|
||||||
LL | foo(&X);
|
|
||||||
| ^^^ implementation of `Bar` is not general enough
|
|
||||||
|
|
|
|
||||||
= note: `Bar` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`...
|
= 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 some specific lifetime `'1`
|
= note: ...but `Bar` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue