Point out if a local trait has no implementations

This commit is contained in:
Michael Goulet 2023-09-10 03:33:07 +00:00
parent 26f4b72724
commit 30e6cea0ae
63 changed files with 658 additions and 6 deletions

View file

@ -90,6 +90,10 @@ pub struct TraitImpls {
}
impl TraitImpls {
pub fn is_empty(&self) -> bool {
self.blanket_impls.is_empty() && self.non_blanket_impls.is_empty()
}
pub fn blanket_impls(&self) -> &[DefId] {
self.blanket_impls.as_slice()
}

View file

@ -40,5 +40,7 @@ trait_selection_no_value_in_rustc_on_unimplemented = this attribute must have a
.label = expected value here
.note = eg `#[rustc_on_unimplemented(message="foo")]`
trait_selection_trait_has_no_impls = this trait has no implementations, consider adding one
trait_selection_ty_alias_overflow = in case this is a recursive type alias, consider using a struct, enum, or union instead
trait_selection_unable_to_construct_constant_value = unable to construct a constant value for the unevaluated constant {$unevaluated}

View file

@ -3009,10 +3009,10 @@ fn try_to_add_help_message(
// Try to report a help message
if is_fn_trait
&& let Ok((implemented_kind, params)) = self.type_implements_fn_trait(
obligation.param_env,
trait_ref.self_ty(),
trait_predicate.skip_binder().polarity,
)
obligation.param_env,
trait_ref.self_ty(),
trait_predicate.skip_binder().polarity,
)
{
self.add_help_message_for_fn_trait(trait_ref, err, implemented_kind, params);
} else if !trait_ref.has_non_region_infer()
@ -3031,6 +3031,15 @@ fn try_to_add_help_message(
None,
obligation.cause.body_id,
);
} else if trait_ref.def_id().is_local()
&& self.tcx.trait_impls_of(trait_ref.def_id()).is_empty()
&& !self.tcx.trait_is_auto(trait_ref.def_id())
&& !self.tcx.trait_is_alias(trait_ref.def_id())
{
err.span_help(
self.tcx.def_span(trait_ref.def_id()),
crate::fluent_generated::trait_selection_trait_has_no_impls,
);
} else if !suggested && !unsatisfied_const {
// Can't show anything else useful, try to find similar impls.
let impl_candidates = self.find_similar_impl_candidates(*trait_predicate);
@ -3041,7 +3050,12 @@ fn try_to_add_help_message(
err,
true,
) {
self.report_similar_impl_candidates_for_root_obligation(&obligation, *trait_predicate, body_def_id, err);
self.report_similar_impl_candidates_for_root_obligation(
&obligation,
*trait_predicate,
body_def_id,
err,
);
}
self.suggest_convert_to_slice(

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
|
LL | const X: [i32; <i32 as Foo>::ID] = [0, 1, 2];
| ^^^ the trait `Foo` is not implemented for `i32`
|
help: this trait has no implementations, consider adding one
--> $DIR/associated-const-array-len.rs:1:1
|
LL | trait Foo {
| ^^^^^^^^^
error: aborting due to previous error

View file

@ -51,6 +51,11 @@ error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
LL | foo::<Demo>()();
| ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-105330.rs:1:1
|
LL | pub trait TraitWAssocConst {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `foo`
--> $DIR/issue-105330.rs:11:11
|
@ -87,6 +92,11 @@ error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
LL | foo::<Demo>();
| ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-105330.rs:1:1
|
LL | pub trait TraitWAssocConst {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `foo`
--> $DIR/issue-105330.rs:11:11
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `(): Add<A>` is not satisfied
|
LL | r = r + a;
| ^ the trait `Add<A>` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:15:1
|
LL | trait Add<RHS=Self> {
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `(T, U): Get` is not satisfied
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
|
help: this trait has no implementations, consider adding one
--> $DIR/associated-types-no-suitable-supertrait.rs:12:1
|
LL | trait Get {
| ^^^^^^^^^
error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-no-suitable-supertrait.rs:17:40

View file

@ -58,6 +58,11 @@ error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
LL | type Assoc: Foo<Self> = ();
| ^^ the trait `Foo<Self>` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/defaults-suitability.rs:27:1
|
LL | trait Foo<T> {
| ^^^^^^^^^^^^
note: required by a bound in `Bar::Assoc`
--> $DIR/defaults-suitability.rs:34:17
|

View file

@ -48,6 +48,12 @@ error[E0277]: the trait bound `(): Foo` is not satisfied
|
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-59324.rs:3:1
|
LL | pub trait Foo: NotFoo {
| ^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Bug: Foo` is not satisfied
--> $DIR/issue-59324.rs:19:10

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied
|
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
| ^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bar<T>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-64855.rs:1:1
|
LL | pub trait Foo {
| ^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `bool: Bar` is not satisfied
LL | type Assoc = bool;
| ^^^^ the trait `Bar` is not implemented for `bool`
|
help: this trait has no implementations, consider adding one
--> $DIR/point-at-type-on-obligation-failure-2.rs:1:1
|
LL | trait Bar {}
| ^^^^^^^^^
note: required by a bound in `Foo::Assoc`
--> $DIR/point-at-type-on-obligation-failure-2.rs:4:17
|
@ -16,6 +21,11 @@ error[E0277]: the trait bound `bool: Bar` is not satisfied
LL | type Assoc = bool;
| ^^^^ the trait `Bar` is not implemented for `bool`
|
help: this trait has no implementations, consider adding one
--> $DIR/point-at-type-on-obligation-failure-2.rs:1:1
|
LL | trait Bar {}
| ^^^^^^^^^
note: required by a bound in `Baz::Assoc`
--> $DIR/point-at-type-on-obligation-failure-2.rs:13:18
|
@ -31,6 +41,11 @@ error[E0277]: the trait bound `bool: Bar` is not satisfied
LL | type Assoc = bool;
| ^^^^ the trait `Bar` is not implemented for `bool`
|
help: this trait has no implementations, consider adding one
--> $DIR/point-at-type-on-obligation-failure-2.rs:1:1
|
LL | trait Bar {}
| ^^^^^^^^^
note: required by a bound in `Bat::Assoc`
--> $DIR/point-at-type-on-obligation-failure-2.rs:24:27
|

View file

@ -6,6 +6,11 @@ LL | takes_t(t);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/coherence-unsafe-trait-object-impl.rs:6:1
|
LL | trait Trait: Sized {
| ^^^^^^^^^^^^^^^^^^
note: required by a bound in `takes_t`
--> $DIR/coherence-unsafe-trait-object-impl.rs:10:15
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `[Adt; std::mem::size_of::<Self::Assoc>()]: Foo` i
|
LL | <[Adt; std::mem::size_of::<Self::Assoc>()] as Foo>::bar()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `[Adt; std::mem::size_of::<Self::Assoc>()]`
|
help: this trait has no implementations, consider adding one
--> $DIR/dont-evaluate-array-len-on-err-1.rs:9:1
|
LL | trait Foo {
| ^^^^^^^^^
error: aborting due to previous error

View file

@ -6,7 +6,11 @@ LL | writes_to_specific_path(&cap);
| |
| required by a bound introduced by this call
|
= help: the trait `Delegates<U>` is implemented for `T`
help: this trait has no implementations, consider adding one
--> $DIR/issue-85848.rs:4:1
|
LL | trait _Contains<T> {
| ^^^^^^^^^^^^^^^^^^
note: required for `&C` to implement `Contains<(), true>`
--> $DIR/issue-85848.rs:21:12
|

View file

@ -6,6 +6,11 @@ LL | z(" ");
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-86530.rs:4:1
|
LL | pub trait X {
| ^^^^^^^^^^^
note: required by a bound in `z`
--> $DIR/issue-86530.rs:10:8
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `i32: Bar<u32>` is not satisfied
LL | where i32: Foo<u32, A>
| ^^^^^^^^^^^^^^^^ the trait `Bar<u32>` is not implemented for `i32`
|
help: this trait has no implementations, consider adding one
--> $DIR/cross-fn-cache-hole.rs:11:1
|
LL | trait Bar<X> { }
| ^^^^^^^^^^^^
= help: see issue #48214
= help: add `#![feature(trivial_bounds)]` to the crate attributes to enable

View file

@ -15,6 +15,11 @@ error[E0277]: the trait bound `Foo: Bar` is not satisfied
LL | let f3: &Fat<dyn Bar> = f2;
| ^^ the trait `Bar` is not implemented for `Foo`
|
help: this trait has no implementations, consider adding one
--> $DIR/dst-bad-coerce1.rs:10:1
|
LL | trait Bar { fn bar(&self) {} }
| ^^^^^^^^^
= note: required for the cast from `&Fat<Foo>` to `&Fat<dyn Bar>`
error[E0308]: mismatched types
@ -34,6 +39,11 @@ error[E0277]: the trait bound `Foo: Bar` is not satisfied
LL | let f3: &(dyn Bar,) = f2;
| ^^ the trait `Bar` is not implemented for `Foo`
|
help: this trait has no implementations, consider adding one
--> $DIR/dst-bad-coerce1.rs:10:1
|
LL | trait Bar { fn bar(&self) {} }
| ^^^^^^^^^
= note: required for the cast from `&(Foo,)` to `&(dyn Bar,)`
error: aborting due to 4 previous errors

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `{integer}: Foo` is not satisfied
|
LL | let dyn_i: dyn* Foo = i;
| ^ the trait `Foo` is not implemented for `{integer}`
|
help: this trait has no implementations, consider adding one
--> $DIR/error.rs:6:1
|
LL | trait Foo {}
| ^^^^^^^^^
error: aborting due to previous error

View file

@ -21,6 +21,11 @@ LL | some_func(5i32);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/E0277.rs:3:1
|
LL | trait Foo {
| ^^^^^^^^^
note: required by a bound in `some_func`
--> $DIR/E0277.rs:7:17
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `for<'a> &'a mut (): Foo<&'a mut ()>` is not satis
LL | (&mut EmptyIter).consume(());
| ^^^^^^^ the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-101020.rs:28:1
|
LL | trait Foo<T> {}
| ^^^^^^^^^^^^
note: required for `&'a mut ()` to implement `for<'a> FuncInput<'a, &'a mut ()>`
--> $DIR/issue-101020.rs:27:20
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
LL | C: StackContext,
| ^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
|
LL | trait BufferMut {}
| ^^^^^^^^^^^^^^^
note: required for `Ctx<()>` to implement `for<'a> BufferUdpStateContext<&'a ()>`
--> $DIR/issue-89118.rs:5:23
|
@ -26,6 +31,11 @@ error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
LL | impl<C> EthernetWorker<C> {}
| ^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
|
LL | trait BufferMut {}
| ^^^^^^^^^^^^^^^
note: required for `Ctx<()>` to implement `for<'a> BufferUdpStateContext<&'a ()>`
--> $DIR/issue-89118.rs:5:23
|
@ -48,6 +58,11 @@ error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
LL | type Handler = Ctx<C::Dispatcher>;
| ^^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
|
LL | trait BufferMut {}
| ^^^^^^^^^^^^^^^
note: required for `Ctx<()>` to implement `for<'a> BufferUdpStateContext<&'a ()>`
--> $DIR/issue-89118.rs:5:23
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `isize: HasState` is not satisfied
|
LL | fn add_state(op: <isize as HasState>::State) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `HasState` is not implemented for `isize`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-18611.rs:5:1
|
LL | trait HasState {
| ^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -6,6 +6,11 @@ LL | do_fold(bot(), ());
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-25076.rs:3:1
|
LL | trait InOut<T> { type Out; }
| ^^^^^^^^^^^^^^
note: required by a bound in `do_fold`
--> $DIR/issue-25076.rs:5:18
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `for<'a> (): Trait2<'a>` is not satisfied
|
LL | fn _ice(param: Box<dyn for <'a> Trait1<<() as Trait2<'a>>::Ty>>) {
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Trait2<'a>` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-35570.rs:4:1
|
LL | trait Trait2<'a> {
| ^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -6,6 +6,11 @@ LL | trigger_error(vec![], |x: &u32| x)
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-60218.rs:7:1
|
LL | pub trait Foo {}
| ^^^^^^^^^^^^^
note: required by a bound in `trigger_error`
--> $DIR/issue-60218.rs:13:72
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `(): _A` is not satisfied
|
LL | _Func::< <() as _A>::AssocT >::func(());
| ^^ the trait `_A` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-66353.rs:7:1
|
LL | trait _A {
| ^^^^^^^^
error[E0277]: the trait bound `(): _Func<_>` is not satisfied
--> $DIR/issue-66353.rs:12:41
@ -11,6 +17,12 @@ LL | _Func::< <() as _A>::AssocT >::func(());
| ----------------------------------- ^^ the trait `_Func<_>` is not implemented for `()`
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-66353.rs:3:1
|
LL | trait _Func<T> {
| ^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `Result<(), _>: Future` is not satisfied
|
LL | fn foo() -> impl Future<Item=(), Error=Box<dyn Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Future` is not implemented for `Result<(), _>`
|
help: this trait has no implementations, consider adding one
--> $DIR/lifetime-elision-return-type-trait.rs:1:1
|
LL | trait Future {
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -114,6 +114,11 @@ LL | check(m1::S{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -128,6 +133,11 @@ LL | check(m2::S{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -142,6 +152,11 @@ LL | check(m2::S);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -156,6 +171,11 @@ LL | check(xm1::S{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -170,6 +190,11 @@ LL | check(xm2::S{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -184,6 +209,11 @@ LL | check(xm2::S);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -198,6 +228,11 @@ LL | check(m3::TS{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -212,6 +247,11 @@ LL | check(m3::TS);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -226,6 +266,11 @@ LL | check(m4::TS{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -240,6 +285,11 @@ LL | check(m4::TS);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -254,6 +304,11 @@ LL | check(xm3::TS{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -268,6 +323,11 @@ LL | check(xm3::TS);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -282,6 +342,11 @@ LL | check(xm4::TS{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -296,6 +361,11 @@ LL | check(xm4::TS);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -310,6 +380,11 @@ LL | check(m5::US{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -324,6 +399,11 @@ LL | check(m5::US);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -338,6 +418,11 @@ LL | check(m6::US{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -352,6 +437,11 @@ LL | check(m6::US);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -366,6 +456,11 @@ LL | check(xm5::US{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -380,6 +475,11 @@ LL | check(xm5::US);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -394,6 +494,11 @@ LL | check(xm6::US{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -408,6 +513,11 @@ LL | check(xm6::US);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -422,6 +532,11 @@ LL | check(m7::V{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -436,6 +551,11 @@ LL | check(m8::V{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -450,6 +570,11 @@ LL | check(m8::V);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -464,6 +589,11 @@ LL | check(xm7::V{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -478,6 +608,11 @@ LL | check(xm8::V{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -492,6 +627,11 @@ LL | check(xm8::V);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -506,6 +646,11 @@ LL | check(m9::TV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -520,6 +665,11 @@ LL | check(m9::TV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -534,6 +684,11 @@ LL | check(mA::TV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -548,6 +703,11 @@ LL | check(mA::TV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -562,6 +722,11 @@ LL | check(xm9::TV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -576,6 +741,11 @@ LL | check(xm9::TV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -590,6 +760,11 @@ LL | check(xmA::TV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -604,6 +779,11 @@ LL | check(xmA::TV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -618,6 +798,11 @@ LL | check(mB::UV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -632,6 +817,11 @@ LL | check(mB::UV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -646,6 +836,11 @@ LL | check(mC::UV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -660,6 +855,11 @@ LL | check(mC::UV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -674,6 +874,11 @@ LL | check(xmB::UV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -688,6 +893,11 @@ LL | check(xmB::UV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -702,6 +912,11 @@ LL | check(xmC::UV{});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|
@ -716,6 +931,11 @@ LL | check(xmC::UV);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/namespace-mix.rs:20:1
|
LL | trait Impossible {}
| ^^^^^^^^^^^^^^^^
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
|

View file

@ -8,6 +8,11 @@ LL | foo(panic!())
| | this tail expression is of type `()`
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/feature-gate-never_type_fallback.rs:7:1
|
LL | trait T {}
| ^^^^^^^
note: required by a bound in `foo`
--> $DIR/feature-gate-never_type_fallback.rs:13:16
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `(): T` is not satisfied
|
LL | fn a() -> Foo {
| ^^^ the trait `T` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/impl_trait_fallback3.rs:5:1
|
LL | trait T {
| ^^^^^^^
error: aborting due to previous error

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `(): T` is not satisfied
|
LL | fn foo() -> impl T {
| ^^^^^^ the trait `T` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/impl_trait_fallback4.rs:3:1
|
LL | trait T {
| ^^^^^^^
error: aborting due to previous error

View file

@ -5,6 +5,11 @@ LL | let y: Option<Vec<u8>> = collect(x.iter()); // this should give approxi
| ^^^^^^^ a collection of type `Option<Vec<u8>>` cannot be built from an iterator over elements of type `&u8`
|
= help: the trait `MyFromIterator<&u8>` is not implemented for `Option<Vec<u8>>`
help: this trait has no implementations, consider adding one
--> $DIR/on-trait.rs:17:1
|
LL | trait MyFromIterator<A> {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `collect`
--> $DIR/on-trait.rs:22:39
|
@ -18,6 +23,11 @@ LL | let x: String = foobar();
| ^^^^^^ test error `String` with `u8` `_` `u32` in `Foo`
|
= help: the trait `Foo<u8, _, u32>` is not implemented for `String`
help: this trait has no implementations, consider adding one
--> $DIR/on-trait.rs:7:3
|
LL | pub trait Foo<Bar, Baz, Quux> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `foobar`
--> $DIR/on-trait.rs:12:24
|

View file

@ -8,6 +8,11 @@ LL | f(Foo {});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/parent-label.rs:6:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `f`
--> $DIR/parent-label.rs:10:9
|
@ -24,6 +29,11 @@ LL | f(Foo {});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/parent-label.rs:6:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `f`
--> $DIR/parent-label.rs:10:9
|
@ -41,6 +51,11 @@ LL | f(Foo {});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/parent-label.rs:6:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `f`
--> $DIR/parent-label.rs:10:9
|
@ -58,6 +73,11 @@ LL | f(Foo {});
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/parent-label.rs:6:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `f`
--> $DIR/parent-label.rs:10:9
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `(): Project` is not satisfied
|
LL | pub fn uwu() -> <() as Project>::Assoc {}
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Project` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/bad-projection.rs:9:1
|
LL | trait Project {
| ^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `u8: Tr` is not satisfied
|
LL | let a: u8 = Tr::C;
| ^^^^^ the trait `Tr` is not implemented for `u8`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-29595.rs:1:1
|
LL | trait Tr {
| ^^^^^^^^
error: aborting due to previous error

View file

@ -14,6 +14,11 @@ error[E0277]: the trait bound `(): Valid` is not satisfied
LL | default type Ty = ();
| ^^ the trait `Valid` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-38091.rs:20:1
|
LL | trait Valid {}
| ^^^^^^^^^^^
note: required by a bound in `Iterate::Ty`
--> $DIR/issue-38091.rs:5:14
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `for<'a> &'a _: Trait` is not satisfied
LL | test(&|| 0);
| ^^^^ the trait `for<'a> Trait` is not implemented for `&'a _`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89333.rs:9:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `test`
--> $DIR/issue-89333.rs:11:55
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `bool: Foo` is not satisfied
|
LL | <bool as Foo>::my_method();
| ^^^^ the trait `Foo` is not implemented for `bool`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-82038.rs:3:1
|
LL | trait Foo {
| ^^^^^^^^^
error: aborting due to previous error

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `u32: Trait` is not satisfied
LL | fn explode(x: Foo<u32>) {}
| ^^^^^^^^ the trait `Trait` is not implemented for `u32`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums-in-fns.rs:1:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `Foo`
--> $DIR/on-structs-and-enums-in-fns.rs:3:14
|
@ -16,6 +21,11 @@ error[E0277]: the trait bound `f32: Trait` is not satisfied
LL | fn kaboom(y: Bar<f32>) {}
| ^^^^^^^^ the trait `Trait` is not implemented for `f32`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums-in-fns.rs:1:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `Bar`
--> $DIR/on-structs-and-enums-in-fns.rs:7:12
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `u16: Trait` is not satisfied
LL | impl PolyTrait<Foo<u16>> for Struct {
| ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `u16`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums-in-impls.rs:1:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `Foo`
--> $DIR/on-structs-and-enums-in-impls.rs:3:14
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `usize: Trait` is not satisfied
LL | let baz: Foo<usize> = loop { };
| ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums-locals.rs:1:1
|
LL | trait Trait {
| ^^^^^^^^^^^
note: required by a bound in `Foo`
--> $DIR/on-structs-and-enums-locals.rs:5:14
|
@ -16,6 +21,11 @@ error[E0277]: the trait bound `{integer}: Trait` is not satisfied
LL | x: 3
| ^ the trait `Trait` is not implemented for `{integer}`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums-locals.rs:1:1
|
LL | trait Trait {
| ^^^^^^^^^^^
note: required by a bound in `Foo`
--> $DIR/on-structs-and-enums-locals.rs:5:14
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `usize: Trait` is not satisfied
LL | static X: Foo<usize> = Foo {
| ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums-static.rs:1:1
|
LL | trait Trait {
| ^^^^^^^^^^^
note: required by a bound in `Foo`
--> $DIR/on-structs-and-enums-static.rs:5:14
|

View file

@ -20,6 +20,11 @@ error[E0277]: the trait bound `isize: Trait` is not satisfied
LL | a: Foo<isize>,
| ^^^^^^^^^^ the trait `Trait` is not implemented for `isize`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums.rs:1:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `Foo`
--> $DIR/on-structs-and-enums.rs:3:14
|
@ -32,6 +37,11 @@ error[E0277]: the trait bound `usize: Trait` is not satisfied
LL | Quux(Bar<usize>),
| ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums.rs:1:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `Bar`
--> $DIR/on-structs-and-enums.rs:7:12
|
@ -76,6 +86,11 @@ error[E0277]: the trait bound `i32: Trait` is not satisfied
LL | Foo<i32>,
| ^^^^^^^^ the trait `Trait` is not implemented for `i32`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums.rs:1:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `Foo`
--> $DIR/on-structs-and-enums.rs:3:14
|
@ -88,6 +103,11 @@ error[E0277]: the trait bound `u8: Trait` is not satisfied
LL | DictionaryLike { field: Bar<u8> },
| ^^^^^^^ the trait `Trait` is not implemented for `u8`
|
help: this trait has no implementations, consider adding one
--> $DIR/on-structs-and-enums.rs:1:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `Bar`
--> $DIR/on-structs-and-enums.rs:7:12
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `dyn NotObject: NotObject` is not satisfied
LL | test_not_object::<dyn NotObject>();
| ^^^^^^^^^^^^^ the trait `NotObject` is not implemented for `dyn NotObject`
|
help: this trait has no implementations, consider adding one
--> $DIR/deny-builtin-object-impl.rs:10:1
|
LL | trait NotObject {}
| ^^^^^^^^^^^^^^^
note: required by a bound in `test_not_object`
--> $DIR/deny-builtin-object-impl.rs:14:23
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `dyn NotObject: NotObject` is not satisfied
LL | test_not_object::<dyn NotObject>();
| ^^^^^^^^^^^^^ the trait `NotObject` is not implemented for `dyn NotObject`
|
help: this trait has no implementations, consider adding one
--> $DIR/deny-builtin-object-impl.rs:10:1
|
LL | trait NotObject {}
| ^^^^^^^^^^^^^^^
note: required by a bound in `test_not_object`
--> $DIR/deny-builtin-object-impl.rs:14:23
|

View file

@ -10,6 +10,11 @@ error[E0277]: the trait bound `for<'a> &'a mut Vec<&'a u32>: Foo<'static, i32>`
LL | <i32 as RefFoo<i32>>::ref_foo(unknown);
| ^^^ the trait `for<'a> Foo<'static, i32>` is not implemented for `&'a mut Vec<&'a u32>`
|
help: this trait has no implementations, consider adding one
--> $DIR/dont-autoderef-ty-with-escaping-var.rs:3:1
|
LL | trait Foo<'x, T> {}
| ^^^^^^^^^^^^^^^^
note: required for `i32` to implement `RefFoo<i32>`
--> $DIR/dont-autoderef-ty-with-escaping-var.rs:9:9
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `isize: Clone2` is not satisfied
LL | impl Getter<isize> for isize {
| ^^^^^ the trait `Clone2` is not implemented for `isize`
|
help: this trait has no implementations, consider adding one
--> $DIR/impl-bounds-checking.rs:1:1
|
LL | pub trait Clone2 {
| ^^^^^^^^^^^^^^^^
note: required by a bound in `Getter`
--> $DIR/impl-bounds-checking.rs:6:17
|

View file

@ -6,6 +6,11 @@ LL | needs_bar(std::mem::discriminant(&x));
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/projection-discr-kind.rs:10:1
|
LL | trait Bar {}
| ^^^^^^^^^
note: required by a bound in `needs_bar`
--> $DIR/projection-discr-kind.rs:11:22
|

View file

@ -13,6 +13,11 @@ error[E0277]: the trait bound `T: Trait` is not satisfied
LL | fail();
| ^^^^ the trait `Trait` is not implemented for `T`
|
help: this trait has no implementations, consider adding one
--> $DIR/fail.rs:6:1
|
LL | trait Trait {}
| ^^^^^^^^^^^
note: required by a bound in `fail`
--> $DIR/fail.rs:10:15
|

View file

@ -6,6 +6,11 @@ LL | fn take_object(f: Box<dyn Foo>) { take_foo(f); }
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/object-does-not-impl-trait.rs:4:1
|
LL | trait Foo {}
| ^^^^^^^^^
note: required by a bound in `take_foo`
--> $DIR/object-does-not-impl-trait.rs:5:15
|

View file

@ -6,6 +6,11 @@ LL | b.gimme_an_a(y)
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/vtable-res-trait-param.rs:1:1
|
LL | trait TraitA {
| ^^^^^^^^^^^^
note: required by a bound in `TraitB::gimme_an_a`
--> $DIR/vtable-res-trait-param.rs:6:21
|

View file

@ -27,6 +27,12 @@ LL | Foo::test(&4i32);
| --------- ^^^^^ the trait `Foo` is not implemented for `i32`
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/trivial-bounds-leak.rs:4:1
|
LL | pub trait Foo {
| ^^^^^^^^^^^^^
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/trivial-bounds-leak.rs:26:22
@ -36,6 +42,11 @@ LL | generic_function(5i32);
| |
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/trivial-bounds-leak.rs:4:1
|
LL | pub trait Foo {
| ^^^^^^^^^^^^^
note: required by a bound in `generic_function`
--> $DIR/trivial-bounds-leak.rs:29:24
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `u8: NotImplemented` is not satisfied
LL | a: <Foo as Identity>::Identity,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotImplemented` is not implemented for `u8`
|
help: this trait has no implementations, consider adding one
--> $DIR/projection-as-union-type-error-2.rs:9:1
|
LL | trait NotImplemented {}
| ^^^^^^^^^^^^^^^^^^^^
note: required for `u8` to implement `Identity`
--> $DIR/projection-as-union-type-error-2.rs:11:25
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `u8: Identity` is not satisfied
|
LL | a: <Foo as Identity>::Identity,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Identity` is not implemented for `u8`
|
help: this trait has no implementations, consider adding one
--> $DIR/projection-as-union-type-error.rs:6:1
|
LL | pub trait Identity {
| ^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `MyCall: Callback` is not satisfied
LL | f::<dyn Processing<Call = MyCall>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Callback` is not implemented for `MyCall`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-75707.rs:1:1
|
LL | pub trait Callback {
| ^^^^^^^^^^^^^^^^^^
note: required by a bound in `f`
--> $DIR/issue-75707.rs:9:9
|

View file

@ -3,12 +3,24 @@ error[E0277]: the trait bound `Bar<'a, T>: Foo` is not satisfied
|
LL | callback: Box<dyn Callback<dyn Callback<Bar<'a, T>>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bar<'a, T>`
|
help: this trait has no implementations, consider adding one
--> $DIR/hir-wf-canonicalized.rs:3:1
|
LL | trait Foo {
| ^^^^^^^^^
error[E0277]: the trait bound `(dyn Callback<Bar<'a, T>, for<'b, 'c, 'd> Output = ()> + 'static): Foo` is not satisfied
--> $DIR/hir-wf-canonicalized.rs:10:15
|
LL | callback: Box<dyn Callback<dyn Callback<Bar<'a, T>>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `(dyn Callback<Bar<'a, T>, for<'b, 'c, 'd> Output = ()> + 'static)`
|
help: this trait has no implementations, consider adding one
--> $DIR/hir-wf-canonicalized.rs:3:1
|
LL | trait Foo {
| ^^^^^^^^^
error[E0277]: the size for values of type `(dyn Callback<Bar<'a, T>, for<'b, 'c, 'd> Output = ()> + 'static)` cannot be known at compilation time
--> $DIR/hir-wf-canonicalized.rs:10:15

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `u8: Trait` is not satisfied
LL | static VAR: Struct<u8>;
| ^^^^^^^^^^ the trait `Trait` is not implemented for `u8`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-95665.rs:4:1
|
LL | pub trait Trait: {}
| ^^^^^^^^^^^^^^^
note: required by a bound in `Struct`
--> $DIR/issue-95665.rs:6:22
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `bool: MyTrait` is not satisfied
LL | type MyItem = Option<((AssertMyTrait<bool>, u8))>;
| ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `bool`
|
help: this trait has no implementations, consider adding one
--> $DIR/wf-complex-assoc-type.rs:1:1
|
LL | trait MyTrait {}
| ^^^^^^^^^^^^^
note: required by a bound in `AssertMyTrait`
--> $DIR/wf-complex-assoc-type.rs:2:25
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `(): Foo` is not satisfied
|
LL | pub fn lint_me() -> <() as Foo>::Assoc;
| ^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/wf-foreign-fn-decl-ret.rs:6:1
|
LL | pub trait Foo {
| ^^^^^^^^^^^^^
error[E0277]: the trait bound `u32: Unsatisfied` is not satisfied
--> $DIR/wf-foreign-fn-decl-ret.rs:14:32
@ -10,6 +16,11 @@ error[E0277]: the trait bound `u32: Unsatisfied` is not satisfied
LL | pub fn lint_me_aswell() -> Bar<u32>;
| ^^^^^^^^ the trait `Unsatisfied` is not implemented for `u32`
|
help: this trait has no implementations, consider adding one
--> $DIR/wf-foreign-fn-decl-ret.rs:1:1
|
LL | pub trait Unsatisfied {}
| ^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `Bar`
--> $DIR/wf-foreign-fn-decl-ret.rs:4:19
|

View file

@ -3,6 +3,12 @@ error[E0277]: the trait bound `DefaultAllocator: Allocator` is not satisfied
|
LL | struct Foo(Matrix<<DefaultAllocator as Allocator>::Buffer>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Allocator` is not implemented for `DefaultAllocator`
|
help: this trait has no implementations, consider adding one
--> $DIR/wf-packed-on-proj-of-type-as-unimpl-trait.rs:23:1
|
LL | pub trait Allocator { type Buffer; }
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied
LL | called()
| ^^^^^^ the trait `for<'b> Foo` is not implemented for `fn(&'b ())`
|
help: this trait has no implementations, consider adding one
--> $DIR/higher-ranked-fn-type.rs:6:1
|
LL | trait Foo {
| ^^^^^^^^^
note: required by a bound in `called`
--> $DIR/higher-ranked-fn-type.rs:12:25
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_t
LL | called()
| ^^^^^^ the trait `for<Region(BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b))> Foo` is not implemented for `fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())`
|
help: this trait has no implementations, consider adding one
--> $DIR/higher-ranked-fn-type.rs:6:1
|
LL | trait Foo {
| ^^^^^^^^^
note: required by a bound in `called`
--> $DIR/higher-ranked-fn-type.rs:12:25
|

View file

@ -4,6 +4,11 @@ error[E0277]: the trait bound `X: Foo<X>` is not satisfied
LL | 1.method::<X>();
| ^ the trait `Foo<X>` is not implemented for `X`
|
help: this trait has no implementations, consider adding one
--> $DIR/where-clause-method-substituion.rs:1:1
|
LL | trait Foo<T> {
| ^^^^^^^^^^^^
note: required by a bound in `Bar::method`
--> $DIR/where-clause-method-substituion.rs:6:34
|