Use note to point at bound introducing requirement

This commit is contained in:
Esteban Küber 2021-07-31 09:26:55 -07:00 committed by Esteban Kuber
parent 92f3753b07
commit 39f220ce12
333 changed files with 3171 additions and 1929 deletions

View file

@ -1962,7 +1962,7 @@ fn note_obligation_cause_code<T>(
}
ObligationCauseCode::BindingObligation(item_def_id, span) => {
let item_name = tcx.def_path_str(item_def_id);
let msg = format!("required by this bound in `{}`", item_name);
let mut multispan = MultiSpan::from(span);
if let Some(ident) = tcx.opt_item_name(item_def_id) {
let sm = tcx.sess.source_map();
let same_line =
@ -1971,16 +1971,17 @@ fn note_obligation_cause_code<T>(
_ => true,
};
if !ident.span.overlaps(span) && !same_line {
err.span_label(ident.span, "required by a bound in this");
multispan
.push_span_label(ident.span, "required by a bound in this".to_string());
}
}
let descr = format!("required by a bound in `{}`", item_name);
if span != DUMMY_SP {
err.span_label(span, &msg);
let msg = format!("required by this bound in `{}`", item_name);
multispan.push_span_label(span, msg);
err.span_note(multispan, &descr);
} else {
err.span_note(
tcx.def_span(item_def_id),
&format!("required by a bound in `{}`", item_name),
);
err.span_note(tcx.def_span(item_def_id), &descr);
}
}
ObligationCauseCode::ObjectCastObligation(object_ty) => {

View file

@ -5,9 +5,12 @@ LL | f1(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _`
...
|
note: required by a bound in `f1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:25
|
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
| ------------ required by this bound in `f1`
| ^^^^^^^^^^^^ required by this bound in `f1`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:3:5
@ -16,9 +19,12 @@ LL | f2(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _`
...
|
note: required by a bound in `f2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:17:25
|
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
| ----------------------- required by this bound in `f2`
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f2`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
@ -27,9 +33,12 @@ LL | f3(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&(), &'r ()) -> _`
...
|
note: required by a bound in `f3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:29
|
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
| --------------- required by this bound in `f3`
| ^^^^^^^^^^^^^^^ required by this bound in `f3`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:5:5
@ -38,9 +47,12 @@ LL | f4(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _`
...
|
note: required by a bound in `f4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:19:25
|
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
| ----------------------- required by this bound in `f4`
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f4`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
@ -49,9 +61,12 @@ LL | f5(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&'r (), &'r ()) -> _`
...
|
note: required by a bound in `f5`
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:25
|
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
| -------------------------- required by this bound in `f5`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `f5`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:7:5
@ -60,9 +75,12 @@ LL | g1(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&'r (), Box<(dyn for<'s> Fn(&'s ()) + 'static)>) -> _`
...
|
note: required by a bound in `g1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:23:25
|
LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
| ------------------------- required by this bound in `g1`
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g1`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
@ -71,9 +89,12 @@ LL | g2(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
...
|
note: required by a bound in `g2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:24:25
|
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
| ---------------- required by this bound in `g2`
| ^^^^^^^^^^^^^^^^ required by this bound in `g2`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:9:5
@ -82,9 +103,12 @@ LL | g3(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'s> fn(&'s (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _`
...
|
note: required by a bound in `g3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:25:25
|
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
| ------------------------------------ required by this bound in `g3`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g3`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
@ -93,9 +117,12 @@ LL | g4(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
...
|
note: required by a bound in `g4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:26:25
|
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
| --------------------------- required by this bound in `g4`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `g4`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:11:5
@ -104,9 +131,12 @@ LL | h1(|_: (), _: (), _: (), _: ()| {});
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| |
| expected signature of `for<'r, 's> fn(&'r (), Box<(dyn for<'t0> Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _`
...
|
note: required by a bound in `h1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:25
|
LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
| -------------------------------------------- required by this bound in `h1`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h1`
error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
@ -115,9 +145,12 @@ LL | h2(|_: (), _: (), _: (), _: ()| {});
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| |
| expected signature of `for<'r, 't0> fn(&'r (), Box<(dyn for<'s> Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _`
...
|
note: required by a bound in `h2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:25
|
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
| --------------------------------------------------------- required by this bound in `h2`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `h2`
error: aborting due to 11 previous errors

View file

@ -4,12 +4,12 @@ error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be sent between th
LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
|
::: $SRC_DIR/core/src/marker.rs:LL:COL
= help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
note: required by a bound in `Send`
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
LL | pub unsafe auto trait Send {
| -------------------------- required by this bound in `Send`
|
= help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Send`
help: consider further restricting the associated type
|
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
@ -21,12 +21,12 @@ error[E0277]: `<<Self as Case1>::C as Iterator>::Item` is not an iterator
LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<<Self as Case1>::C as Iterator>::Item` is not an iterator
|
::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
= help: the trait `Iterator` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
note: required by a bound in `Iterator`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
LL | pub trait Iterator {
| ------------------ required by this bound in `Iterator`
|
= help: the trait `Iterator` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
| ^^^^^^^^^^^^^^^^^^ required by this bound in `Iterator`
help: consider further restricting the associated type
|
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Iterator {
@ -38,12 +38,12 @@ error[E0277]: `<<Self as Case1>::C as Iterator>::Item` cannot be shared between
LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
|
::: $SRC_DIR/core/src/marker.rs:LL:COL
= help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
note: required by a bound in `Sync`
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
LL | pub unsafe auto trait Sync {
| -------------------------- required by this bound in `Sync`
|
= help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Sync`
help: consider further restricting the associated type
|
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {

View file

@ -4,12 +4,12 @@ error[E0277]: `<<Self as Case1>::A as Iterator>::Item` doesn't implement `Debug`
LL | type A: Iterator<Item: Debug>;
| ^^^^^ `<<Self as Case1>::A as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
::: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
= help: the trait `Debug` is not implemented for `<<Self as Case1>::A as Iterator>::Item`
note: required by a bound in `Debug`
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
LL | pub trait Debug {
| --------------- required by this bound in `Debug`
|
= help: the trait `Debug` is not implemented for `<<Self as Case1>::A as Iterator>::Item`
| ^^^^^^^^^^^^^^^ required by this bound in `Debug`
help: consider further restricting the associated type
|
LL | trait Case1 where <<Self as Case1>::A as Iterator>::Item: Debug {
@ -21,11 +21,11 @@ error[E0277]: the trait bound `<<Self as Foo>::Out as Baz>::Assoc: Default` is n
LL | pub trait Foo { type Out: Baz<Assoc: Default>; }
| ^^^^^^^ the trait `Default` is not implemented for `<<Self as Foo>::Out as Baz>::Assoc`
|
::: $SRC_DIR/core/src/default.rs:LL:COL
note: required by a bound in `Default`
--> $SRC_DIR/core/src/default.rs:LL:COL
|
LL | pub trait Default: Sized {
| ------------------------ required by this bound in `Default`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Default`
help: consider further restricting the associated type
|
LL | pub trait Foo where <<Self as Foo>::Out as Baz>::Assoc: Default { type Out: Baz<Assoc: Default>; }

View file

@ -1,26 +1,32 @@
error[E0277]: the trait bound `for<'a, 'b> <Z as TraitA<'a>>::AsA: TraitB<'a, 'b>` is not satisfied
--> $DIR/issue-83017.rs:36:5
|
LL | foo::<Z>();
| ^^^^^^^^ the trait `for<'a, 'b> TraitB<'a, 'b>` is not implemented for `<Z as TraitA<'a>>::AsA`
|
note: required by a bound in `foo`
--> $DIR/issue-83017.rs:31:32
|
LL | fn foo<T>()
| --- required by a bound in this
LL | where
LL | for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>>,
| ------------------------------------------------------- required by this bound in `foo`
...
LL | foo::<Z>();
| ^^^^^^^^ the trait `for<'a, 'b> TraitB<'a, 'b>` is not implemented for `<Z as TraitA<'a>>::AsA`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
error[E0277]: the trait bound `for<'a, 'b, 'c> <<Z as TraitA<'a>>::AsA as TraitB<'a, 'b>>::AsB: TraitC<'a, 'b, 'c>` is not satisfied
--> $DIR/issue-83017.rs:36:5
|
LL | foo::<Z>();
| ^^^^^^^^ the trait `for<'a, 'b, 'c> TraitC<'a, 'b, 'c>` is not implemented for `<<Z as TraitA<'a>>::AsA as TraitB<'a, 'b>>::AsB`
|
note: required by a bound in `foo`
--> $DIR/issue-83017.rs:31:60
|
LL | fn foo<T>()
| --- required by a bound in this
LL | where
LL | for<'a> T: TraitA<'a, AsA: for<'b> TraitB<'a, 'b, AsB: for<'c> TraitC<'a, 'b, 'c>>>,
| -------------------------- required by this bound in `foo`
...
LL | foo::<Z>();
| ^^^^^^^^ the trait `for<'a, 'b, 'c> TraitC<'a, 'b, 'c>` is not implemented for `<<Z as TraitA<'a>>::AsA as TraitB<'a, 'b>>::AsB`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
error: aborting due to 2 previous errors

View file

@ -1,20 +1,26 @@
error[E0271]: type mismatch resolving `<ModelT as Vehicle>::Color == Blue`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:31:10
|
LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
| ---------- required by this bound in `blue_car`
...
LL | fn b() { blue_car(ModelT); }
| ^^^^^^^^ expected struct `Blue`, found struct `Black`
|
note: required by a bound in `blue_car`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:27:19
|
LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
| ^^^^^^^^^^ required by this bound in `blue_car`
error[E0271]: type mismatch resolving `<ModelU as Vehicle>::Color == Black`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10
|
LL | fn black_car<C:Car<Color=Black>>(c: C) {
| ----------- required by this bound in `black_car`
...
LL | fn c() { black_car(ModelU); }
| ^^^^^^^^^ expected struct `Black`, found struct `Blue`
|
note: required by a bound in `black_car`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:24:20
|
LL | fn black_car<C:Car<Color=Black>>(c: C) {
| ^^^^^^^^^^^ required by this bound in `black_car`
error: aborting due to 2 previous errors

View file

@ -16,11 +16,14 @@ LL | fn foo2<I: Foo<A = Bar>>(x: I) {
error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
--> $DIR/associated-types-eq-3.rs:38:5
|
LL | fn foo1<I: Foo<A=Bar>>(x: I) {
| ----- required by this bound in `foo1`
...
LL | foo1(a);
| ^^^^ expected struct `Bar`, found `usize`
|
note: required by a bound in `foo1`
--> $DIR/associated-types-eq-3.rs:18:16
|
LL | fn foo1<I: Foo<A=Bar>>(x: I) {
| ^^^^^ required by this bound in `foo1`
error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
--> $DIR/associated-types-eq-3.rs:41:9

View file

@ -1,32 +1,36 @@
error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:87:5
|
LL | fn foo<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x isize>,
| ------------- required by this bound in `foo`
...
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected `isize`, found `usize`
|
= note: expected reference `&isize`
found reference `&usize`
note: required by a bound in `foo`
--> $DIR/associated-types-eq-hr.rs:45:36
|
LL | fn foo<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x isize>,
| ^^^^^^^^^^^^^ required by this bound in `foo`
error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
--> $DIR/associated-types-eq-hr.rs:91:5
|
LL | fn bar<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x usize>,
| ------------- required by this bound in `bar`
...
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected `usize`, found `isize`
|
= note: expected reference `&usize`
found reference `&isize`
note: required by a bound in `bar`
--> $DIR/associated-types-eq-hr.rs:52:36
|
LL | fn bar<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x usize>,
| ^^^^^^^^^^^^^ required by this bound in `bar`
error: aborting due to 2 previous errors

View file

@ -1,32 +1,36 @@
error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:87:5
|
LL | fn foo<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x isize>,
| ------------- required by this bound in `foo`
...
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected `isize`, found `usize`
|
= note: expected reference `&isize`
found reference `&usize`
note: required by a bound in `foo`
--> $DIR/associated-types-eq-hr.rs:45:36
|
LL | fn foo<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x isize>,
| ^^^^^^^^^^^^^ required by this bound in `foo`
error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
--> $DIR/associated-types-eq-hr.rs:91:5
|
LL | fn bar<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x usize>,
| ------------- required by this bound in `bar`
...
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected `usize`, found `isize`
|
= note: expected reference `&usize`
found reference `&isize`
note: required by a bound in `bar`
--> $DIR/associated-types-eq-hr.rs:52:36
|
LL | fn bar<T>()
| --- required by a bound in this
LL | where
LL | T: for<'x> TheTrait<&'x isize, A = &'x usize>,
| ^^^^^^^^^^^^^ required by this bound in `bar`
error: implementation of `TheTrait` is not general enough
--> $DIR/associated-types-eq-hr.rs:96:5

View file

@ -1,12 +1,14 @@
error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-for-unimpl-trait.rs:10:40
|
LL | trait Get {
| --------- required by this bound in `Get`
...
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
note: required by a bound in `Get`
--> $DIR/associated-types-for-unimpl-trait.rs:4:1
|
LL | trait Get {
| ^^^^^^^^^ required by this bound in `Get`
help: consider further restricting `Self`
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}

View file

@ -1,9 +1,6 @@
error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>`
--> $DIR/associated-types-issue-20346.rs:34:5
|
LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
| ------ required by this bound in `is_iterator_of`
...
LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
| - this type parameter
...
@ -12,6 +9,11 @@ LL | is_iterator_of::<Option<T>, _>(&adapter);
|
= note: expected enum `Option<T>`
found type `T`
note: required by a bound in `is_iterator_of`
--> $DIR/associated-types-issue-20346.rs:15:34
|
LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
| ^^^^^^ required by this bound in `is_iterator_of`
error: aborting due to previous error

View file

@ -3,12 +3,14 @@ error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`
|
LL | want_y(t);
| ^^^^^^ expected `i32`, found associated type
...
LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
| ----- required by this bound in `want_y`
|
= note: expected type `i32`
found associated type `<T as Foo>::Y`
note: required by a bound in `want_y`
--> $DIR/associated-types-multiple-types-one-trait.rs:44:17
|
LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
| ^^^^^ required by this bound in `want_y`
help: consider constraining the associated type `<T as Foo>::Y` to `i32`
|
LL | fn have_x_want_y<T:Foo<X=u32, Y = i32>>(t: &T)
@ -19,12 +21,14 @@ error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
|
LL | want_x(t);
| ^^^^^^ expected `u32`, found associated type
...
LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
| ----- required by this bound in `want_x`
|
= note: expected type `u32`
found associated type `<T as Foo>::X`
note: required by a bound in `want_x`
--> $DIR/associated-types-multiple-types-one-trait.rs:42:17
|
LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
| ^^^^^ required by this bound in `want_x`
help: consider constraining the associated type `<T as Foo>::X` to `u32`
|
LL | fn have_y_want_x<T:Foo<Y=i32, X = u32>>(t: &T)

View file

@ -1,12 +1,14 @@
error[E0277]: the trait bound `T: Get` is not satisfied
--> $DIR/associated-types-no-suitable-bound.rs:11:21
|
LL | trait Get {
| --------- required by this bound in `Get`
...
LL | fn uhoh<T>(foo: <T as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `T`
|
note: required by a bound in `Get`
--> $DIR/associated-types-no-suitable-bound.rs:1:1
|
LL | trait Get {
| ^^^^^^^^^ required by this bound in `Get`
help: consider restricting type parameter `T`
|
LL | fn uhoh<T: Get>(foo: <T as Get>::Value) {}

View file

@ -1,12 +1,14 @@
error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-no-suitable-supertrait-2.rs:17:40
|
LL | trait Get {
| --------- required by this bound in `Get`
...
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
note: required by a bound in `Get`
--> $DIR/associated-types-no-suitable-supertrait-2.rs:12:1
|
LL | trait Get {
| ^^^^^^^^^ required by this bound in `Get`
help: consider further restricting `Self`
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}

View file

@ -1,12 +1,14 @@
error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-no-suitable-supertrait.rs:17:40
|
LL | trait Get {
| --------- required by this bound in `Get`
...
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
note: required by a bound in `Get`
--> $DIR/associated-types-no-suitable-supertrait.rs:12:1
|
LL | trait Get {
| ^^^^^^^^^ required by this bound in `Get`
help: consider further restricting `Self`
|
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
@ -15,11 +17,14 @@ LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Ge
error[E0277]: the trait bound `(T, U): Get` is not satisfied
--> $DIR/associated-types-no-suitable-supertrait.rs:22:40
|
LL | trait Get {
| --------- required by this bound in `Get`
...
LL | fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
|
note: required by a bound in `Get`
--> $DIR/associated-types-no-suitable-supertrait.rs:12:1
|
LL | trait Get {
| ^^^^^^^^^ required by this bound in `Get`
error: aborting due to 2 previous errors

View file

@ -1,18 +1,26 @@
error[E0284]: type annotations needed: cannot satisfy `<Self as Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding.rs:4:12
|
LL | trait Foo: Iterator<Item = i32> {}
| ---------- required by this bound in `Foo`
LL | trait Bar: Foo<Item = u32> {}
| ^^^^^^^^^^^^^^^ cannot satisfy `<Self as Iterator>::Item == i32`
|
note: required by a bound in `Foo`
--> $DIR/associated-types-overridden-binding.rs:3:21
|
LL | trait Foo: Iterator<Item = i32> {}
| ^^^^^^^^^^ required by this bound in `Foo`
error[E0284]: type annotations needed: cannot satisfy `<Self as Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding.rs:7:21
|
LL | trait I32Iterator = Iterator<Item = i32>;
| ---------- required by this bound in `I32Iterator`
LL | trait U32Iterator = I32Iterator<Item = u32>;
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Self as Iterator>::Item == i32`
|
note: required by a bound in `I32Iterator`
--> $DIR/associated-types-overridden-binding.rs:6:30
|
LL | trait I32Iterator = Iterator<Item = i32>;
| ^^^^^^^^^^ required by this bound in `I32Iterator`
error: aborting due to 2 previous errors

View file

@ -12,11 +12,14 @@ LL | f1(2i32, 4u32);
error[E0277]: the trait bound `u32: Foo` is not satisfied
--> $DIR/associated-types-path-2.rs:29:5
|
LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
| --- required by this bound in `f1`
...
LL | f1(2u32, 4u32);
| ^^ the trait `Foo` is not implemented for `u32`
|
note: required by a bound in `f1`
--> $DIR/associated-types-path-2.rs:13:14
|
LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
| ^^^ required by this bound in `f1`
error[E0277]: the trait bound `u32: Foo` is not satisfied
--> $DIR/associated-types-path-2.rs:29:5
@ -27,11 +30,14 @@ LL | f1(2u32, 4u32);
error[E0277]: the trait bound `u32: Foo` is not satisfied
--> $DIR/associated-types-path-2.rs:35:5
|
LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
| --- required by this bound in `f1`
...
LL | f1(2u32, 4i32);
| ^^ the trait `Foo` is not implemented for `u32`
|
note: required by a bound in `f1`
--> $DIR/associated-types-path-2.rs:13:14
|
LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
| ^^^ required by this bound in `f1`
error[E0277]: the trait bound `u32: Foo` is not satisfied
--> $DIR/associated-types-path-2.rs:35:5

View file

@ -1,12 +1,14 @@
error[E0277]: the trait bound `Self: Get` is not satisfied
--> $DIR/associated-types-projection-to-unrelated-trait-in-method-without-default.rs:10:40
|
LL | trait Get {
| --------- required by this bound in `Get`
...
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value);
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
note: required by a bound in `Get`
--> $DIR/associated-types-projection-to-unrelated-trait-in-method-without-default.rs:5:1
|
LL | trait Get {
| ^^^^^^^^^ required by this bound in `Get`
help: consider further restricting `Self`
|
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get;

View file

@ -2,33 +2,41 @@ error[E0277]: the trait bound `NotClone: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:13:5
|
LL | type Ty: Clone = NotClone;
| ^^^^^^^^^-----^^^^^^^^^^^^
| | |
| | required by this bound in `Tr::Ty`
| the trait `Clone` is not implemented for `NotClone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
|
note: required by a bound in `Tr::Ty`
--> $DIR/defaults-suitability.rs:13:14
|
LL | type Ty: Clone = NotClone;
| ^^^^^ required by this bound in `Tr::Ty`
error[E0277]: the trait bound `NotClone: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:22:5
|
LL | type Ty = NotClone;
| ^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
|
note: required by a bound in `Tr2::Ty`
--> $DIR/defaults-suitability.rs:20:15
|
LL | Self::Ty: Clone,
| ----- required by this bound in `Tr2::Ty`
| ^^^^^ required by this bound in `Tr2::Ty`
LL | {
LL | type Ty = NotClone;
| ^^^^^--^^^^^^^^^^^^
| | |
| | required by a bound in this
| the trait `Clone` is not implemented for `NotClone`
| -- required by a bound in this
error[E0277]: the trait bound `T: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:28:5
|
LL | type Bar: Clone = Vec<T>;
| ^^^^^^^^^^-----^^^^^^^^^^
| | |
| | required by this bound in `Foo::Bar`
| the trait `Clone` is not implemented for `T`
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `T`
|
= note: required because of the requirements on the impl of `Clone` for `Vec<T>`
note: required by a bound in `Foo::Bar`
--> $DIR/defaults-suitability.rs:28:15
|
LL | type Bar: Clone = Vec<T>;
| ^^^^^ required by this bound in `Foo::Bar`
help: consider restricting type parameter `T`
|
LL | trait Foo<T: std::clone::Clone> {
@ -38,33 +46,41 @@ error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
--> $DIR/defaults-suitability.rs:34:5
|
LL | type Assoc: Foo<Self> = ();
| ^^^^^^^^^^^^---------^^^^^^
| | |
| | required by this bound in `Bar::Assoc`
| the trait `Foo<Self>` is not implemented for `()`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo<Self>` is not implemented for `()`
|
note: required by a bound in `Bar::Assoc`
--> $DIR/defaults-suitability.rs:34:17
|
LL | type Assoc: Foo<Self> = ();
| ^^^^^^^^^ required by this bound in `Bar::Assoc`
error[E0277]: the trait bound `NotClone: IsU8<NotClone>` is not satisfied
--> $DIR/defaults-suitability.rs:56:5
|
LL | type Assoc = NotClone;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
|
note: required by a bound in `D::Assoc`
--> $DIR/defaults-suitability.rs:53:18
|
LL | Self::Assoc: IsU8<Self::Assoc>,
| ----------------- required by this bound in `D::Assoc`
| ^^^^^^^^^^^^^^^^^ required by this bound in `D::Assoc`
...
LL | type Assoc = NotClone;
| ^^^^^-----^^^^^^^^^^^^
| | |
| | required by a bound in this
| the trait `IsU8<NotClone>` is not implemented for `NotClone`
| ----- required by a bound in this
error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:65:5
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `Foo2::Bar`
| the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
|
= note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo2<T>>::Baz>`
note: required by a bound in `Foo2::Bar`
--> $DIR/defaults-suitability.rs:65:15
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^ required by this bound in `Foo2::Bar`
help: consider further restricting the associated type
|
LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
@ -74,12 +90,14 @@ error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:74:5
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `Foo25::Bar`
| the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
|
= note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo25<T>>::Baz>`
note: required by a bound in `Foo25::Bar`
--> $DIR/defaults-suitability.rs:74:15
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^ required by this bound in `Foo25::Bar`
help: consider further restricting the associated type
|
LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
@ -88,15 +106,17 @@ LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
error[E0277]: the trait bound `T: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:87:5
|
LL | type Baz = T;
| ^^^^^^^^^^^^^ the trait `Clone` is not implemented for `T`
|
note: required by a bound in `Foo3::Baz`
--> $DIR/defaults-suitability.rs:84:16
|
LL | Self::Baz: Clone,
| ----- required by this bound in `Foo3::Baz`
| ^^^^^ required by this bound in `Foo3::Baz`
...
LL | type Baz = T;
| ^^^^^---^^^^^
| | |
| | required by a bound in this
| the trait `Clone` is not implemented for `T`
|
| --- required by a bound in this
help: consider further restricting type parameter `T`
|
LL | Self::Baz: Clone, T: std::clone::Clone

View file

@ -2,12 +2,14 @@ error[E0277]: `Self` doesn't implement `std::fmt::Display`
--> $DIR/defaults-unsound-62211-1.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| `Self` cannot be formatted with the default formatter
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Self` cannot be formatted with the default formatter
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-1.rs:20:86
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::fmt::Display {
@ -17,11 +19,13 @@ error[E0277]: cannot add-assign `&'static str` to `Self`
--> $DIR/defaults-unsound-62211-1.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| no implementation for `Self += &'static str`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str`
|
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-1.rs:20:47
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
@ -31,11 +35,13 @@ error[E0277]: the trait bound `Self: Deref` is not satisfied
--> $DIR/defaults-unsound-62211-1.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^-------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| the trait `Deref` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deref` is not implemented for `Self`
|
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-1.rs:20:25
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + Deref {
@ -45,11 +51,13 @@ error[E0277]: the trait bound `Self: Copy` is not satisfied
--> $DIR/defaults-unsound-62211-1.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| the trait `Copy` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Self`
|
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-1.rs:20:18
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + Copy {

View file

@ -2,12 +2,14 @@ error[E0277]: `Self` doesn't implement `std::fmt::Display`
--> $DIR/defaults-unsound-62211-2.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| `Self` cannot be formatted with the default formatter
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Self` cannot be formatted with the default formatter
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-2.rs:20:86
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + std::fmt::Display {
@ -17,11 +19,13 @@ error[E0277]: cannot add-assign `&'static str` to `Self`
--> $DIR/defaults-unsound-62211-2.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| no implementation for `Self += &'static str`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str`
|
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-2.rs:20:47
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
@ -31,11 +35,13 @@ error[E0277]: the trait bound `Self: Deref` is not satisfied
--> $DIR/defaults-unsound-62211-2.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^^-------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| the trait `Deref` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Deref` is not implemented for `Self`
|
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-2.rs:20:25
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + Deref {
@ -45,11 +51,13 @@ error[E0277]: the trait bound `Self: Copy` is not satisfied
--> $DIR/defaults-unsound-62211-2.rs:20:5
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `UncheckedCopy::Output`
| the trait `Copy` is not implemented for `Self`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Self`
|
note: required by a bound in `UncheckedCopy::Output`
--> $DIR/defaults-unsound-62211-2.rs:20:18
|
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
| ^^^^ required by this bound in `UncheckedCopy::Output`
help: consider further restricting `Self`
|
LL | trait UncheckedCopy: Sized + Copy {

View file

@ -4,12 +4,12 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
LL | type Ty = Vec<[u8]>;
| ^^^^^^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
= help: the trait `Sized` is not implemented for `[u8]`
note: required by a bound in `Vec`
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
LL | pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| - required by this bound in `Vec`
|
= help: the trait `Sized` is not implemented for `[u8]`
| ^ required by this bound in `Vec`
error: aborting due to previous error

View file

@ -1,17 +1,19 @@
error[E0277]: the trait bound `for<'b> <i32 as X<'b>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-1.rs:12:14
|
LL | trait X<'a>
| - required by a bound in this
LL | where
LL | for<'b> <Self as X<'b>>::U: Clone,
| ----- required by this bound in `X`
...
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<i32 as X<'b>>::U`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-1.rs:3:33
|
LL | trait X<'a>
| - required by a bound in this
LL | where
LL | for<'b> <Self as X<'b>>::U: Clone,
| ^^^^^ required by this bound in `X`
error: aborting due to previous error

View file

@ -1,17 +1,19 @@
error[E0277]: the trait bound `for<'b> <T as X<'b>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-object.rs:7:13
|
LL | trait X<'a>
| - required by a bound in this
LL | where
LL | for<'b> <Self as X<'b>>::U: Clone,
| ----- required by this bound in `X`
...
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) {
| ^^^^^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-object.rs:3:33
|
LL | trait X<'a>
| - required by a bound in this
LL | where
LL | for<'b> <Self as X<'b>>::U: Clone,
| ^^^^^ required by this bound in `X`
error: aborting due to previous error

View file

@ -1,17 +1,19 @@
error[E0277]: the trait bound `for<'b> <u8 as Y<'b, u8>>::V: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-1.rs:14:14
|
LL | trait Y<'a, T: ?Sized>
| - required by a bound in this
...
LL | for<'b> <Self as Y<'b, T>>::V: Clone,
| ----- required by this bound in `Y`
...
LL | type V = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<u8 as Y<'b, u8>>::V`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `Y`
--> $DIR/hr-associated-type-bound-param-1.rs:4:36
|
LL | trait Y<'a, T: ?Sized>
| - required by a bound in this
...
LL | for<'b> <Self as Y<'b, T>>::V: Clone,
| ^^^^^ required by this bound in `Y`
error: aborting due to previous error

View file

@ -1,47 +1,53 @@
error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:4:8
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this
LL | where
LL | T: Z<'a, u16>,
| ^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `<u16 as Z<'b, u16>>::W`
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ----- required by this bound in `Z`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:7:35
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z`
error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:4:8
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this
LL | where
LL | T: Z<'a, u16>,
| ^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `<u16 as Z<'b, u16>>::W`
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ----- required by this bound in `Z`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:7:35
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z`
error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:16:14
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ----- required by this bound in `Z`
...
LL | type W = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<u16 as Z<'b, u16>>::W`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `Z`
--> $DIR/hr-associated-type-bound-param-2.rs:7:35
|
LL | trait Z<'a, T: ?Sized>
| - required by a bound in this
...
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
| ^^^^^ required by this bound in `Z`
error: aborting due to 3 previous errors

View file

@ -1,17 +1,19 @@
error[E0277]: the trait bound `for<'b> <(T,) as X<'b, (T,)>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-3.rs:13:14
|
LL | trait X<'a, T>
| - required by a bound in this
...
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ----- required by this bound in `X`
...
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<(T,) as X<'b, (T,)>>::U`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-3.rs:4:33
|
LL | trait X<'a, T>
| - required by a bound in this
...
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ^^^^^ required by this bound in `X`
error: aborting due to previous error

View file

@ -1,17 +1,19 @@
error[E0277]: the trait bound `for<'b> <(T,) as X<'b, T>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-4.rs:13:14
|
LL | trait X<'a, T>
| - required by a bound in this
...
LL | for<'b> <(T,) as X<'b, T>>::U: Clone,
| ----- required by this bound in `X`
...
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<(T,) as X<'b, T>>::U`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-4.rs:4:36
|
LL | trait X<'a, T>
| - required by a bound in this
...
LL | for<'b> <(T,) as X<'b, T>>::U: Clone,
| ^^^^^ required by this bound in `X`
error: aborting due to previous error

View file

@ -1,62 +1,70 @@
error[E0277]: the trait bound `for<'b> <Box<T> as X<'b, Box<T>>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:27:14
|
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
| - required by a bound in this
...
LL | for<'b> <T::Next as X<'b, T::Next>>::U: Clone,
| ----- required by this bound in `X`
...
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<Box<T> as X<'b, Box<T>>>::U`
|
= help: the following implementations were found:
<&T as Clone>
error[E0277]: the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:27:14
|
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
| - required by a bound in this
LL | where
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ----- required by this bound in `X`
...
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<Vec<T> as X<'b, Vec<T>>>::U`
|
= help: the following implementations were found:
<&T as Clone>
error[E0277]: the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:33:14
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-5.rs:18:45
|
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
| - required by a bound in this
...
LL | for<'b> <T::Next as X<'b, T::Next>>::U: Clone,
| ----- required by this bound in `X`
...
| ^^^^^ required by this bound in `X`
error[E0277]: the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:27:14
|
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<Vec<T> as X<'b, Vec<T>>>::U`
|
= help: the following implementations were found:
<&T as Clone>
error[E0277]: the trait bound `for<'b> <Box<T> as X<'b, Box<T>>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:33:14
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-5.rs:16:33
|
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
| - required by a bound in this
LL | where
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ----- required by this bound in `X`
| ^^^^^ required by this bound in `X`
error[E0277]: the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:33:14
|
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<Vec<T> as X<'b, Vec<T>>>::U`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-5.rs:18:45
|
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
| - required by a bound in this
...
LL | for<'b> <T::Next as X<'b, T::Next>>::U: Clone,
| ^^^^^ required by this bound in `X`
error[E0277]: the trait bound `for<'b> <Box<T> as X<'b, Box<T>>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:33:14
|
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<Box<T> as X<'b, Box<T>>>::U`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-5.rs:16:33
|
LL | trait X<'a, T: Cycle + for<'b> X<'b, T>>
| - required by a bound in this
LL | where
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ^^^^^ required by this bound in `X`
error: aborting due to 4 previous errors

View file

@ -1,30 +1,34 @@
error[E0277]: the trait bound `for<'b> <T as X<'b, T>>::U: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-6.rs:14:14
|
LL | trait X<'a, T>
| - required by a bound in this
...
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ----- required by this bound in `X`
...
LL | type U = str;
| ^^^ the trait `for<'b> Clone` is not implemented for `<T as X<'b, T>>::U`
|
= help: the following implementations were found:
<&T as Clone>
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-6.rs:4:33
|
LL | trait X<'a, T>
| - required by a bound in this
...
LL | for<'b> <T as X<'b, T>>::U: Clone,
| ^^^^^ required by this bound in `X`
error[E0277]: the trait bound `for<'b> T: X<'b, T>` is not satisfied
--> $DIR/hr-associated-type-bound-param-6.rs:12:12
|
LL | impl<S, T> X<'_, T> for (S,) {
| ^^^^^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T`
|
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-param-6.rs:3:16
|
LL | trait X<'a, T>
| - required by a bound in this
LL | where
LL | for<'b> T: X<'b, T>,
| -------- required by this bound in `X`
...
LL | impl<S, T> X<'_, T> for (S,) {
| ^^^^^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T`
|
| ^^^^^^^^ required by this bound in `X`
help: consider restricting type parameter `T`
|
LL | impl<S, T: for<'b> X<'b, T>> X<'_, T> for (S,) {

View file

@ -1,18 +1,20 @@
error[E0277]: the trait bound `for<'b> <T as UnsafeCopy<'b, T>>::Item: Deref` is not satisfied
--> $DIR/hr-associated-type-projection-1.rs:15:17
|
LL | trait UnsafeCopy<'a, T: Copy>
| ---------- required by a bound in this
LL | where
LL | for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>,
| --------------------------- required by this bound in `UnsafeCopy`
...
LL | type Item = T;
| ^ the trait `for<'b> Deref` is not implemented for `<T as UnsafeCopy<'b, T>>::Item`
|
= help: the following implementations were found:
<&T as Deref>
<&mut T as Deref>
note: required by a bound in `UnsafeCopy`
--> $DIR/hr-associated-type-projection-1.rs:3:48
|
LL | trait UnsafeCopy<'a, T: Copy>
| ---------- required by a bound in this
LL | where
LL | for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `UnsafeCopy`
error[E0277]: the trait bound `for<'b> <T as UnsafeCopy<'b, T>>::Item: Deref` is not satisfied
--> $DIR/hr-associated-type-projection-1.rs:13:33

View file

@ -1,12 +1,14 @@
error[E0277]: the size for values of type `Self` cannot be known at compilation time
--> $DIR/issue-20005.rs:10:49
|
LL | trait From<Src> {
| --- required by this bound in `From`
...
LL | ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
note: required by a bound in `From`
--> $DIR/issue-20005.rs:1:12
|
LL | trait From<Src> {
| ^^^ required by this bound in `From`
help: consider further restricting `Self`
|
LL | ) -> <Dst as From<Self>>::Result where Dst: From<Self>, Self: Sized {

View file

@ -1,12 +1,14 @@
error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/issue-27675-unchecked-bounds.rs:15:31
|
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
| ----- required by this bound in `copy`
...
LL | copy::<dyn Setup<From=T>>(t)
| ^ the trait `Copy` is not implemented for `T`
|
note: required by a bound in `copy`
--> $DIR/issue-27675-unchecked-bounds.rs:10:12
|
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
| ^^^^^ required by this bound in `copy`
help: consider restricting type parameter `T`
|
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {

View file

@ -1,12 +1,14 @@
error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/issue-43784-associated-type.rs:14:5
|
LL | type Assoc: Partial<Self>;
| ------------- required by this bound in `Complete::Assoc`
...
LL | type Assoc = T;
| ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
|
note: required by a bound in `Complete::Assoc`
--> $DIR/issue-43784-associated-type.rs:5:17
|
LL | type Assoc: Partial<Self>;
| ^^^^^^^^^^^^^ required by this bound in `Complete::Assoc`
help: consider restricting type parameter `T`
|
LL | impl<T: std::marker::Copy> Complete for T {

View file

@ -2,10 +2,13 @@ error[E0277]: the trait bound `(dyn ToString + 'static): Default` is not satisfi
--> $DIR/issue-43924.rs:7:5
|
LL | type Out: Default + ToString + ?Sized = dyn ToString;
| ^^^^^^^^^^-------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | required by this bound in `Foo::Out`
| the trait `Default` is not implemented for `(dyn ToString + 'static)`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)`
|
note: required by a bound in `Foo::Out`
--> $DIR/issue-43924.rs:7:15
|
LL | type Out: Default + ToString + ?Sized = dyn ToString;
| ^^^^^^^ required by this bound in `Foo::Out`
error[E0599]: no function or associated item named `default` found for trait object `(dyn ToString + 'static)` in the current scope
--> $DIR/issue-43924.rs:14:39

View file

@ -1,13 +1,15 @@
error[E0277]: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
--> $DIR/issue-54108.rs:19:5
|
LL | type Size: Add<Output = Self::Size>;
| ------------------------ required by this bound in `Encoder::Size`
...
LL | type Size = <Self as SubEncoder>::ActualSize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `<T as SubEncoder>::ActualSize + <T as SubEncoder>::ActualSize`
|
= help: the trait `Add` is not implemented for `<T as SubEncoder>::ActualSize`
note: required by a bound in `Encoder::Size`
--> $DIR/issue-54108.rs:4:16
|
LL | type Size: Add<Output = Self::Size>;
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
help: consider further restricting the associated type
|
LL | T: SubEncoder, <T as SubEncoder>::ActualSize: Add

View file

@ -2,11 +2,13 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation
--> $DIR/issue-63593.rs:9:5
|
LL | type This = Self;
| ^^^^^^^^^^^^^^^^^
| |
| doesn't have a size known at compile-time
| required by this bound in `MyTrait::This`
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
note: required by a bound in `MyTrait::This`
--> $DIR/issue-63593.rs:9:5
|
LL | type This = Self;
| ^^^^^^^^^^^^^^^^^ required by this bound in `MyTrait::This`
help: consider further restricting `Self`
|
LL | trait MyTrait: Sized {

View file

@ -2,10 +2,13 @@ error[E0277]: the trait bound `T: MyDisplay` is not satisfied
--> $DIR/issue-65774-1.rs:10:5
|
LL | type MpuConfig: MyDisplay = T;
| ^^^^^^^^^^^^^^^^---------^^^^^
| | |
| | required by this bound in `MPU::MpuConfig`
| the trait `MyDisplay` is not implemented for `T`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyDisplay` is not implemented for `T`
|
note: required by a bound in `MPU::MpuConfig`
--> $DIR/issue-65774-1.rs:10:21
|
LL | type MpuConfig: MyDisplay = T;
| ^^^^^^^^^ required by this bound in `MPU::MpuConfig`
error[E0277]: the trait bound `T: MyDisplay` is not satisfied
--> $DIR/issue-65774-1.rs:44:76

View file

@ -2,10 +2,13 @@ error[E0277]: the trait bound `T: MyDisplay` is not satisfied
--> $DIR/issue-65774-2.rs:10:5
|
LL | type MpuConfig: MyDisplay = T;
| ^^^^^^^^^^^^^^^^---------^^^^^
| | |
| | required by this bound in `MPU::MpuConfig`
| the trait `MyDisplay` is not implemented for `T`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyDisplay` is not implemented for `T`
|
note: required by a bound in `MPU::MpuConfig`
--> $DIR/issue-65774-2.rs:10:21
|
LL | type MpuConfig: MyDisplay = T;
| ^^^^^^^^^ required by this bound in `MPU::MpuConfig`
error[E0277]: the trait bound `T: MyDisplay` is not satisfied
--> $DIR/issue-65774-2.rs:39:25

View file

@ -1,11 +1,14 @@
error[E0271]: type mismatch resolving `<Foo2 as Bar2>::Ok == char`
--> $DIR/issue-72806.rs:14:5
|
LL | type Sibling: Bar2<Ok=char>;
| ------- required by this bound in `Bar::Sibling`
...
LL | type Sibling = Foo2;
| ^^^^^^^^^^^^^^^^^^^^ expected `char`, found `u32`
|
note: required by a bound in `Bar::Sibling`
--> $DIR/issue-72806.rs:3:24
|
LL | type Sibling: Bar2<Ok=char>;
| ^^^^^^^ required by this bound in `Bar::Sibling`
error: aborting due to previous error

View file

@ -1,14 +1,16 @@
error[E0271]: type mismatch resolving `<A as Trait>::Associated == ()`
--> $DIR/issue-87261.rs:56:5
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(a);
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<A as Trait>::Associated`
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
help: consider constraining the associated type `<A as Trait>::Associated` to `()`
|
LL | A: Trait<Associated = ()> + 'static,
@ -17,9 +19,6 @@ LL | A: Trait<Associated = ()> + 'static,
error[E0271]: type mismatch resolving `<B as Trait>::Associated == ()`
--> $DIR/issue-87261.rs:59:5
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(b);
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
@ -27,18 +26,25 @@ LL | accepts_trait(b);
found associated type `<B as Trait>::Associated`
= help: consider constraining the associated type `<B as Trait>::Associated` to `()`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
error[E0271]: type mismatch resolving `<C as Trait>::Associated == ()`
--> $DIR/issue-87261.rs:62:5
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(c);
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<C as Trait>::Associated`
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
help: consider constraining the associated type `<C as Trait>::Associated` to `()`
|
LL | C: Trait<Associated = ()> + Foo,
@ -47,9 +53,6 @@ LL | C: Trait<Associated = ()> + Foo,
error[E0271]: type mismatch resolving `<D as Trait>::Associated == ()`
--> $DIR/issue-87261.rs:65:5
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(d);
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
@ -57,18 +60,25 @@ LL | accepts_trait(d);
found associated type `<D as Trait>::Associated`
= help: consider constraining the associated type `<D as Trait>::Associated` to `()`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
error[E0271]: type mismatch resolving `<E as GenericTrait<()>>::Associated == ()`
--> $DIR/issue-87261.rs:68:5
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_generic_trait`
...
LL | accepts_generic_trait(e);
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<E as GenericTrait<()>>::Associated`
note: required by a bound in `accepts_generic_trait`
--> $DIR/issue-87261.rs:44:46
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
help: consider constraining the associated type `<E as GenericTrait<()>>::Associated` to `()`
|
LL | E: GenericTrait<(), Associated = ()> + 'static,
@ -77,14 +87,16 @@ LL | E: GenericTrait<(), Associated = ()> + 'static,
error[E0271]: type mismatch resolving `<F as GenericTrait<()>>::Associated == ()`
--> $DIR/issue-87261.rs:71:5
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_generic_trait`
...
LL | accepts_generic_trait(f);
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<F as GenericTrait<()>>::Associated`
note: required by a bound in `accepts_generic_trait`
--> $DIR/issue-87261.rs:44:46
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
help: consider constraining the associated type `<F as GenericTrait<()>>::Associated` to `()`
|
LL | F: GenericTrait<(), Associated = ()> + Foo,
@ -93,9 +105,6 @@ LL | F: GenericTrait<(), Associated = ()> + Foo,
error[E0271]: type mismatch resolving `<G as GenericTrait<()>>::Associated == ()`
--> $DIR/issue-87261.rs:74:5
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_generic_trait`
...
LL | accepts_generic_trait(g);
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
|
@ -103,6 +112,11 @@ LL | accepts_generic_trait(g);
found associated type `<G as GenericTrait<()>>::Associated`
= help: consider constraining the associated type `<G as GenericTrait<()>>::Associated` to `()`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: required by a bound in `accepts_generic_trait`
--> $DIR/issue-87261.rs:44:46
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
error[E0271]: type mismatch resolving `<impl Trait as Trait>::Associated == ()`
--> $DIR/issue-87261.rs:79:5
@ -110,14 +124,16 @@ error[E0271]: type mismatch resolving `<impl Trait as Trait>::Associated == ()`
LL | fn returns_opaque() -> impl Trait + 'static {
| -------------------- the found opaque type
...
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(returns_opaque());
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<impl Trait as Trait>::Associated`
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
help: consider constraining the associated type `<impl Trait as Trait>::Associated` to `()`
|
LL | fn returns_opaque() -> impl Trait<Associated = ()> + 'static {
@ -129,14 +145,16 @@ error[E0271]: type mismatch resolving `<impl DerivedTrait as Trait>::Associated
LL | fn returns_opaque_derived() -> impl DerivedTrait + 'static {
| --------------------------- the found opaque type
...
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(returns_opaque_derived());
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<impl DerivedTrait as Trait>::Associated`
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
help: consider constraining the associated type `<impl DerivedTrait as Trait>::Associated` to `()`
|
LL | fn returns_opaque_derived() -> impl DerivedTrait<Associated = ()> + 'static {
@ -148,14 +166,16 @@ error[E0271]: type mismatch resolving `<impl Trait+Foo as Trait>::Associated ==
LL | fn returns_opaque_foo() -> impl Trait + Foo {
| ---------------- the found opaque type
...
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(returns_opaque_foo());
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<impl Trait+Foo as Trait>::Associated`
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
help: consider constraining the associated type `<impl Trait+Foo as Trait>::Associated` to `()`
|
LL | fn returns_opaque_foo() -> impl Trait<Associated = ()> + Foo {
@ -167,9 +187,6 @@ error[E0271]: type mismatch resolving `<impl DerivedTrait+Foo as Trait>::Associa
LL | fn returns_opaque_derived_foo() -> impl DerivedTrait + Foo {
| ----------------------- the found opaque type
...
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_trait`
...
LL | accepts_trait(returns_opaque_derived_foo());
| ^^^^^^^^^^^^^ expected `()`, found associated type
|
@ -177,6 +194,11 @@ LL | accepts_trait(returns_opaque_derived_foo());
found associated type `<impl DerivedTrait+Foo as Trait>::Associated`
= help: consider constraining the associated type `<impl DerivedTrait+Foo as Trait>::Associated` to `()`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: required by a bound in `accepts_trait`
--> $DIR/issue-87261.rs:43:27
|
LL | fn accepts_trait<T: Trait<Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_trait`
error[E0271]: type mismatch resolving `<impl GenericTrait<()> as GenericTrait<()>>::Associated == ()`
--> $DIR/issue-87261.rs:91:5
@ -184,14 +206,16 @@ error[E0271]: type mismatch resolving `<impl GenericTrait<()> as GenericTrait<()
LL | fn returns_opaque_generic() -> impl GenericTrait<()> + 'static {
| ------------------------------- the found opaque type
...
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_generic_trait`
...
LL | accepts_generic_trait(returns_opaque_generic());
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<impl GenericTrait<()> as GenericTrait<()>>::Associated`
note: required by a bound in `accepts_generic_trait`
--> $DIR/issue-87261.rs:44:46
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
help: consider constraining the associated type `<impl GenericTrait<()> as GenericTrait<()>>::Associated` to `()`
|
LL | fn returns_opaque_generic() -> impl GenericTrait<(), Associated = ()> + 'static {
@ -203,14 +227,16 @@ error[E0271]: type mismatch resolving `<impl GenericTrait<()>+Foo as GenericTrai
LL | fn returns_opaque_generic_foo() -> impl GenericTrait<()> + Foo {
| --------------------------- the found opaque type
...
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_generic_trait`
...
LL | accepts_generic_trait(returns_opaque_generic_foo());
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
|
= note: expected unit type `()`
found associated type `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated`
note: required by a bound in `accepts_generic_trait`
--> $DIR/issue-87261.rs:44:46
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
help: consider constraining the associated type `<impl GenericTrait<()>+Foo as GenericTrait<()>>::Associated` to `()`
|
LL | fn returns_opaque_generic_foo() -> impl GenericTrait<(), Associated = ()> + Foo {
@ -222,9 +248,6 @@ error[E0271]: type mismatch resolving `<impl GenericTrait<()>+GenericTrait<u8> a
LL | fn returns_opaque_generic_duplicate() -> impl GenericTrait<()> + GenericTrait<u8> {
| ---------------------------------------- the found opaque type
...
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| --------------- required by this bound in `accepts_generic_trait`
...
LL | accepts_generic_trait(returns_opaque_generic_duplicate());
| ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
|
@ -232,6 +255,11 @@ LL | accepts_generic_trait(returns_opaque_generic_duplicate());
found associated type `<impl GenericTrait<()>+GenericTrait<u8> as GenericTrait<()>>::Associated`
= help: consider constraining the associated type `<impl GenericTrait<()>+GenericTrait<u8> as GenericTrait<()>>::Associated` to `()`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: required by a bound in `accepts_generic_trait`
--> $DIR/issue-87261.rs:44:46
|
LL | fn accepts_generic_trait<T: GenericTrait<(), Associated = ()>>(_: T) {}
| ^^^^^^^^^^^^^^^ required by this bound in `accepts_generic_trait`
error: aborting due to 14 previous errors

View file

@ -1,35 +1,44 @@
error[E0277]: the trait bound `bool: Bar` is not satisfied
--> $DIR/point-at-type-on-obligation-failure-2.rs:8:5
|
LL | type Assoc: Bar;
| --- required by this bound in `Foo::Assoc`
...
LL | type Assoc = bool;
| ^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `bool`
|
note: required by a bound in `Foo::Assoc`
--> $DIR/point-at-type-on-obligation-failure-2.rs:4:17
|
LL | type Assoc: Bar;
| ^^^ required by this bound in `Foo::Assoc`
error[E0277]: the trait bound `bool: Bar` is not satisfied
--> $DIR/point-at-type-on-obligation-failure-2.rs:19:5
|
LL | type Assoc = bool;
| ^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `bool`
|
note: required by a bound in `Baz::Assoc`
--> $DIR/point-at-type-on-obligation-failure-2.rs:13:18
|
LL | Self::Assoc: Bar,
| --- required by this bound in `Baz::Assoc`
| ^^^ required by this bound in `Baz::Assoc`
LL | {
LL | type Assoc;
| ----- required by a bound in this
...
LL | type Assoc = bool;
| ^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `bool`
error[E0277]: the trait bound `bool: Bar` is not satisfied
--> $DIR/point-at-type-on-obligation-failure-2.rs:30:5
|
LL | type Assoc = bool;
| ^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `bool`
|
note: required by a bound in `Bat::Assoc`
--> $DIR/point-at-type-on-obligation-failure-2.rs:24:27
|
LL | <Self as Bat>::Assoc: Bar,
| --- required by this bound in `Bat::Assoc`
| ^^^ required by this bound in `Bat::Assoc`
LL | {
LL | type Assoc;
| ----- required by a bound in this
...
LL | type Assoc = bool;
| ^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `bool`
error: aborting due to 3 previous errors

View file

@ -1,11 +1,14 @@
error[E0271]: type mismatch resolving `<Foo2 as Bar2>::Ok == ()`
--> $DIR/point-at-type-on-obligation-failure.rs:14:5
|
LL | type Sibling: Bar2<Ok=Self::Ok>;
| ----------- required by this bound in `Bar::Sibling`
...
LL | type Sibling = Foo2;
| ^^^^^^^^^^^^^^^^^^^^ expected `()`, found `u32`
|
note: required by a bound in `Bar::Sibling`
--> $DIR/point-at-type-on-obligation-failure.rs:3:24
|
LL | type Sibling: Bar2<Ok=Self::Ok>;
| ^^^^^^^^^^^ required by this bound in `Bar::Sibling`
error: aborting due to previous error

View file

@ -4,11 +4,11 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation
LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> {}
| ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/core/src/ops/arith.rs:LL:COL
note: required by a bound in `Add`
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
LL | pub trait Add<Rhs = Self> {
| --- required by this bound in `Add`
|
| ^^^ required by this bound in `Add`
help: consider further restricting `Self`
|
LL | trait ArithmeticOps: Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + Div<Output=Self> + Sized {}

View file

@ -1,9 +1,6 @@
error: future cannot be sent between threads safely
--> $DIR/async-fn-nonsend.rs:49:5
|
LL | fn assert_send(_: impl Send) {}
| ---- required by this bound in `assert_send`
...
LL | assert_send(local_dropped_before_await());
| ^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send`
|
@ -18,13 +15,15 @@ LL | fut().await;
| ^^^^^^^^^^^ await occurs here, with `x` maybe used later
LL | }
| - `x` is later dropped here
note: required by a bound in `assert_send`
--> $DIR/async-fn-nonsend.rs:46:24
|
LL | fn assert_send(_: impl Send) {}
| ^^^^ required by this bound in `assert_send`
error: future cannot be sent between threads safely
--> $DIR/async-fn-nonsend.rs:51:5
|
LL | fn assert_send(_: impl Send) {}
| ---- required by this bound in `assert_send`
...
LL | assert_send(non_send_temporary_in_match());
| ^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
|
@ -39,13 +38,15 @@ LL | Some(_) => fut().await,
...
LL | }
| - `non_send()` is later dropped here
note: required by a bound in `assert_send`
--> $DIR/async-fn-nonsend.rs:46:24
|
LL | fn assert_send(_: impl Send) {}
| ^^^^ required by this bound in `assert_send`
error: future cannot be sent between threads safely
--> $DIR/async-fn-nonsend.rs:53:5
|
LL | fn assert_send(_: impl Send) {}
| ---- required by this bound in `assert_send`
...
LL | assert_send(non_sync_with_method_call());
| ^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
|
@ -61,6 +62,11 @@ LL | fut().await;
LL | }
LL | }
| - `f` is later dropped here
note: required by a bound in `assert_send`
--> $DIR/async-fn-nonsend.rs:46:24
|
LL | fn assert_send(_: impl Send) {}
| ^^^^ required by this bound in `assert_send`
error: aborting due to 3 previous errors

View file

@ -1,9 +1,6 @@
error: future cannot be shared between threads safely
--> $DIR/issue-64130-1-sync.rs:21:5
|
LL | fn is_sync<T: Sync>(t: T) { }
| ---- required by this bound in `is_sync`
...
LL | is_sync(bar());
| ^^^^^^^ future returned by `bar` is not `Sync`
|
@ -17,6 +14,11 @@ LL | baz().await;
| ^^^^^^^^^^^ await occurs here, with `x` maybe used later
LL | }
| - `x` is later dropped here
note: required by a bound in `is_sync`
--> $DIR/issue-64130-1-sync.rs:11:15
|
LL | fn is_sync<T: Sync>(t: T) { }
| ^^^^ required by this bound in `is_sync`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error: future cannot be sent between threads safely
--> $DIR/issue-64130-2-send.rs:21:5
|
LL | fn is_send<T: Send>(t: T) { }
| ---- required by this bound in `is_send`
...
LL | is_send(bar());
| ^^^^^^^ future returned by `bar` is not `Send`
|
@ -17,6 +14,11 @@ LL | baz().await;
| ^^^^^^^^^^^ await occurs here, with `x` maybe used later
LL | }
| - `x` is later dropped here
note: required by a bound in `is_send`
--> $DIR/issue-64130-2-send.rs:11:15
|
LL | fn is_send<T: Send>(t: T) { }
| ^^^^ required by this bound in `is_send`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error[E0277]: the trait bound `Foo: Qux` is not satisfied in `impl Future`
--> $DIR/issue-64130-3-other.rs:24:5
|
LL | fn is_qux<T: Qux>(t: T) { }
| --- required by this bound in `is_qux`
LL |
LL | async fn bar() {
| - within this `impl Future`
...
@ -19,6 +16,11 @@ LL | baz().await;
| ^^^^^^^^^^^ await occurs here, with `x` maybe used later
LL | }
| - `x` is later dropped here
note: required by a bound in `is_qux`
--> $DIR/issue-64130-3-other.rs:14:14
|
LL | fn is_qux<T: Qux>(t: T) { }
| ^^^ required by this bound in `is_qux`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error: future cannot be sent between threads safely
--> $DIR/issue-64130-non-send-future-diags.rs:21:5
|
LL | fn is_send<T: Send>(t: T) { }
| ---- required by this bound in `is_send`
...
LL | is_send(foo());
| ^^^^^^^ future returned by `foo` is not `Send`
|
@ -17,6 +14,11 @@ LL | baz().await;
| ^^^^^^^^^^^ await occurs here, with `g` maybe used later
LL | }
| - `g` is later dropped here
note: required by a bound in `is_send`
--> $DIR/issue-64130-non-send-future-diags.rs:7:15
|
LL | fn is_send<T: Send>(t: T) { }
| ^^^^ required by this bound in `is_send`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error: future cannot be sent between threads safely
--> $DIR/issue-67252-unnamed-future.rs:18:5
|
LL | fn spawn<T: Send>(_: T) {}
| ---- required by this bound in `spawn`
...
LL | spawn(async {
| ^^^^^ future created by async block is not `Send`
|
@ -17,6 +14,11 @@ LL | AFuture.await;
| ^^^^^^^^^^^^^ await occurs here, with `_a` maybe used later
LL | });
| - `_a` is later dropped here
note: required by a bound in `spawn`
--> $DIR/issue-67252-unnamed-future.rs:6:13
|
LL | fn spawn<T: Send>(_: T) {}
| ^^^^ required by this bound in `spawn`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error: future cannot be sent between threads safely
--> $DIR/issue-68112.rs:34:5
|
LL | fn require_send(_: impl Send) {}
| ---- required by this bound in `require_send`
...
LL | require_send(send_fut);
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
@ -13,13 +10,15 @@ note: future is not `Send` as it awaits another future which is not `Send`
|
LL | let _ = non_send_fut.await;
| ^^^^^^^^^^^^ await occurs here on type `impl Future`, which is not `Send`
note: required by a bound in `require_send`
--> $DIR/issue-68112.rs:11:25
|
LL | fn require_send(_: impl Send) {}
| ^^^^ required by this bound in `require_send`
error: future cannot be sent between threads safely
--> $DIR/issue-68112.rs:43:5
|
LL | fn require_send(_: impl Send) {}
| ---- required by this bound in `require_send`
...
LL | require_send(send_fut);
| ^^^^^^^^^^^^ future created by async block is not `Send`
|
@ -29,13 +28,15 @@ note: future is not `Send` as it awaits another future which is not `Send`
|
LL | let _ = make_non_send_future1().await;
| ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl Future`, which is not `Send`
note: required by a bound in `require_send`
--> $DIR/issue-68112.rs:11:25
|
LL | fn require_send(_: impl Send) {}
| ^^^^ required by this bound in `require_send`
error[E0277]: `RefCell<i32>` cannot be shared between threads safely
--> $DIR/issue-68112.rs:60:5
|
LL | fn require_send(_: impl Send) {}
| ---- required by this bound in `require_send`
...
LL | require_send(send_fut);
| ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
|
@ -50,6 +51,11 @@ LL | require_send(send_fut);
= note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:55:26: 59:6]`
= note: required because it appears within the type `from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:55:26: 59:6]>`
= note: required because it appears within the type `impl Future`
note: required by a bound in `require_send`
--> $DIR/issue-68112.rs:11:25
|
LL | fn require_send(_: impl Send) {}
| ^^^^ required by this bound in `require_send`
error: aborting due to 3 previous errors

View file

@ -1,9 +1,6 @@
error: future cannot be sent between threads safely
--> $DIR/issue-71137.rs:20:3
|
LL | fn fake_spawn<F: Future + Send + 'static>(f: F) { }
| ---- required by this bound in `fake_spawn`
...
LL | fake_spawn(wrong_mutex());
| ^^^^^^^^^^ future returned by `wrong_mutex` is not `Send`
|
@ -18,6 +15,11 @@ LL | (async { "right"; }).await;
LL | *guard += 1;
LL | }
| - `mut guard` is later dropped here
note: required by a bound in `fake_spawn`
--> $DIR/issue-71137.rs:6:27
|
LL | fn fake_spawn<F: Future + Send + 'static>(f: F) { }
| ^^^^ required by this bound in `fake_spawn`
error: aborting due to previous error

View file

@ -4,10 +4,11 @@ error[E0277]: the trait bound `Option<&str>: AsRef<Path>` is not satisfied
LL | let mut f = File::open(path.to_str())?;
| ^^^^^^^^^^^^^ the trait `AsRef<Path>` is not implemented for `Option<&str>`
|
::: $SRC_DIR/std/src/fs.rs:LL:COL
note: required by a bound in `File::open`
--> $SRC_DIR/std/src/fs.rs:LL:COL
|
LL | pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> {
| ----------- required by this bound in `File::open`
| ^^^^^^^^^^^ required by this bound in `File::open`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error: future cannot be sent between threads safely
--> $DIR/issue-65436-raw-ptr-not-send.rs:12:5
|
LL | fn assert_send<T: Send>(_: T) {}
| ---- required by this bound in `assert_send`
...
LL | assert_send(async {
| ^^^^^^^^^^^ future created by async block is not `Send`
|
@ -25,6 +22,11 @@ help: consider moving this into a `let` binding to create a shorter lived borrow
|
LL | bar(Foo(std::ptr::null())).await;
| ^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `assert_send`
--> $DIR/issue-65436-raw-ptr-not-send.rs:9:19
|
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error[E0277]: `MutexGuard<'_, ()>` cannot be sent between threads safely
--> $DIR/issue-67893.rs:9:5
|
LL | fn g(_: impl Send) {}
| ---- required by this bound in `g`
...
LL | g(issue_67893::run())
| ^ `MutexGuard<'_, ()>` cannot be sent between threads safely
|
@ -18,6 +15,11 @@ LL | pub async fn run() {
= note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{closure#0}]>`
= note: required because it appears within the type `impl Future`
= note: required because it appears within the type `impl Future`
note: required by a bound in `g`
--> $DIR/issue-67893.rs:6:14
|
LL | fn g(_: impl Send) {}
| ^^^^ required by this bound in `g`
error: aborting due to previous error

View file

@ -1,13 +1,15 @@
error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied in `(MyS2, MyS)`
--> $DIR/typeck-default-trait-impl-constituent-types-2.rs:17:5
|
LL | fn is_mytrait<T: MyTrait>() {}
| ------- required by this bound in `is_mytrait`
...
LL | is_mytrait::<(MyS2, MyS)>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ within `(MyS2, MyS)`, the trait `MyTrait` is not implemented for `MyS2`
|
= note: required because it appears within the type `(MyS2, MyS)`
note: required by a bound in `is_mytrait`
--> $DIR/typeck-default-trait-impl-constituent-types-2.rs:12:18
|
LL | fn is_mytrait<T: MyTrait>() {}
| ^^^^^^^ required by this bound in `is_mytrait`
error: aborting due to previous error

View file

@ -1,11 +1,14 @@
error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied
--> $DIR/typeck-default-trait-impl-constituent-types.rs:21:18
|
LL | fn is_mytrait<T: MyTrait>() {}
| ------- required by this bound in `is_mytrait`
...
LL | is_mytrait::<MyS2>();
| ^^^^ the trait `MyTrait` is not implemented for `MyS2`
|
note: required by a bound in `is_mytrait`
--> $DIR/typeck-default-trait-impl-constituent-types.rs:16:18
|
LL | fn is_mytrait<T: MyTrait>() {}
| ^^^^^^^ required by this bound in `is_mytrait`
error: aborting due to previous error

View file

@ -1,20 +1,26 @@
error[E0277]: the trait bound `ThisImplsUnsafeTrait: MyTrait` is not satisfied
--> $DIR/typeck-default-trait-impl-negation.rs:22:19
|
LL | fn is_my_trait<T: MyTrait>() {}
| ------- required by this bound in `is_my_trait`
...
LL | is_my_trait::<ThisImplsUnsafeTrait>();
| ^^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `ThisImplsUnsafeTrait`
|
note: required by a bound in `is_my_trait`
--> $DIR/typeck-default-trait-impl-negation.rs:17:19
|
LL | fn is_my_trait<T: MyTrait>() {}
| ^^^^^^^ required by this bound in `is_my_trait`
error[E0277]: the trait bound `ThisImplsTrait: MyUnsafeTrait` is not satisfied
--> $DIR/typeck-default-trait-impl-negation.rs:25:26
|
LL | fn is_my_unsafe_trait<T: MyUnsafeTrait>() {}
| ------------- required by this bound in `is_my_unsafe_trait`
...
LL | is_my_unsafe_trait::<ThisImplsTrait>();
| ^^^^^^^^^^^^^^ the trait `MyUnsafeTrait` is not implemented for `ThisImplsTrait`
|
note: required by a bound in `is_my_unsafe_trait`
--> $DIR/typeck-default-trait-impl-negation.rs:18:26
|
LL | fn is_my_unsafe_trait<T: MyUnsafeTrait>() {}
| ^^^^^^^^^^^^^ required by this bound in `is_my_unsafe_trait`
error: aborting due to 2 previous errors

View file

@ -1,13 +1,15 @@
error[E0277]: the trait bound `u32: Signed` is not satisfied
--> $DIR/typeck-default-trait-impl-precedence.rs:19:5
|
LL | fn is_defaulted<T:Defaulted>() { }
| --------- required by this bound in `is_defaulted`
...
LL | is_defaulted::<&'static u32>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Signed` is not implemented for `u32`
|
= note: required because of the requirements on the impl of `Defaulted` for `&'static u32`
note: required by a bound in `is_defaulted`
--> $DIR/typeck-default-trait-impl-precedence.rs:12:19
|
LL | fn is_defaulted<T:Defaulted>() { }
| ^^^^^^^^^ required by this bound in `is_defaulted`
error: aborting due to previous error

View file

@ -76,11 +76,11 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation
LL | const SIZE: usize = core::mem::size_of::<Self>();
| ^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
| ^ required by this bound in `std::mem::size_of`
help: consider further restricting `Self`
|
LL | trait Foo<T>: Sized {
@ -92,11 +92,11 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation
LL | const SIZE: usize = core::mem::size_of::<Self>();
| ^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
| ^ required by this bound in `std::mem::size_of`
help: consider further restricting `Self`
|
LL | trait Bar: std::fmt::Display + Sized {
@ -108,11 +108,11 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation
LL | const SIZE: usize = core::mem::size_of::<Self>();
| ^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
| ^ required by this bound in `std::mem::size_of`
help: consider further restricting `Self`
|
LL | trait Baz: Sized where Self: std::fmt::Display {
@ -124,11 +124,11 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation
LL | const SIZE: usize = core::mem::size_of::<Self>();
| ^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
| ^ required by this bound in `std::mem::size_of`
help: consider further restricting `Self`
|
LL | trait Qux<T>: Sized where Self: std::fmt::Display {
@ -140,11 +140,11 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation
LL | const SIZE: usize = core::mem::size_of::<Self>();
| ^^^^ doesn't have a size known at compile-time
|
::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
| ^ required by this bound in `std::mem::size_of`
help: consider further restricting `Self`
|
LL | trait Bat<T>: std::fmt::Display + Sized {

View file

@ -1,13 +1,15 @@
error[E0277]: `T` cannot be sent between threads safely
--> $DIR/builtin-superkinds-double-superkind.rs:6:24
|
LL | trait Foo : Send+Sync { }
| ---- required by this bound in `Foo`
LL |
LL | impl <T: Sync+'static> Foo for (T,) { }
| ^^^ `T` cannot be sent between threads safely
|
= note: required because it appears within the type `(T,)`
note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-double-superkind.rs:4:13
|
LL | trait Foo : Send+Sync { }
| ^^^^ required by this bound in `Foo`
help: consider further restricting this bound
|
LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
@ -16,13 +18,15 @@ LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
error[E0277]: `T` cannot be shared between threads safely
--> $DIR/builtin-superkinds-double-superkind.rs:9:16
|
LL | trait Foo : Send+Sync { }
| ---- required by this bound in `Foo`
...
LL | impl <T: Send> Foo for (T,T) { }
| ^^^ `T` cannot be shared between threads safely
|
= note: required because it appears within the type `(T, T)`
note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-double-superkind.rs:4:18
|
LL | trait Foo : Send+Sync { }
| ^^^^ required by this bound in `Foo`
help: consider further restricting this bound
|
LL | impl <T: Send + std::marker::Sync> Foo for (T,T) { }

View file

@ -4,16 +4,16 @@ error[E0277]: `T` cannot be sent between threads safely
LL | impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `T` cannot be sent between threads safely
|
::: $DIR/auxiliary/trait_superkinds_in_metadata.rs:7:58
|
LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
| ---- required by this bound in `RequiresRequiresShareAndSend`
|
note: required because it appears within the type `X<T>`
--> $DIR/builtin-superkinds-in-metadata.rs:9:8
|
LL | struct X<T>(T);
| ^
note: required by a bound in `RequiresRequiresShareAndSend`
--> $DIR/auxiliary/trait_superkinds_in_metadata.rs:7:58
|
LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
| ^^^^ required by this bound in `RequiresRequiresShareAndSend`
help: consider further restricting this bound
|
LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }

View file

@ -1,13 +1,15 @@
error[E0277]: `Rc<i8>` cannot be sent between threads safely
--> $DIR/builtin-superkinds-simple.rs:6:6
|
LL | trait Foo : Send { }
| ---- required by this bound in `Foo`
LL |
LL | impl Foo for std::rc::Rc<i8> { }
| ^^^ `Rc<i8>` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `Rc<i8>`
note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-simple.rs:4:13
|
LL | trait Foo : Send { }
| ^^^^ required by this bound in `Foo`
error: aborting due to previous error

View file

@ -1,12 +1,14 @@
error[E0277]: `T` cannot be sent between threads safely
--> $DIR/builtin-superkinds-typaram-not-send.rs:5:24
|
LL | trait Foo : Send { }
| ---- required by this bound in `Foo`
LL |
LL | impl <T: Sync+'static> Foo for T { }
| ^^^ `T` cannot be sent between threads safely
|
note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-typaram-not-send.rs:3:13
|
LL | trait Foo : Send { }
| ^^^^ required by this bound in `Foo`
help: consider further restricting this bound
|
LL | impl <T: Sync+'static + std::marker::Send> Foo for T { }

View file

@ -1,11 +1,14 @@
error[E0277]: the trait bound `f32: Foo` is not satisfied
--> $DIR/chalk_initial_program.rs:15:13
|
LL | fn gimme<F: Foo>() { }
| --- required by this bound in `gimme`
...
LL | gimme::<f32>();
| ^^^ the trait `Foo` is not implemented for `f32`
|
note: required by a bound in `gimme`
--> $DIR/chalk_initial_program.rs:9:13
|
LL | fn gimme<F: Foo>() { }
| ^^^ required by this bound in `gimme`
error: aborting due to previous error

View file

@ -1,26 +1,30 @@
error[E0277]: the trait bound `(Option<T>, f32): Foo` is not satisfied
--> $DIR/generic_impls.rs:12:13
|
LL | fn gimme<F: Foo>() { }
| --- required by this bound in `gimme`
...
LL | gimme::<(Option<T>, f32)>();
| ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `(Option<T>, f32)`
|
= help: the following implementations were found:
<(T, u32) as Foo>
note: required by a bound in `gimme`
--> $DIR/generic_impls.rs:7:13
|
LL | fn gimme<F: Foo>() { }
| ^^^ required by this bound in `gimme`
error[E0277]: the trait bound `(i32, f32): Foo` is not satisfied
--> $DIR/generic_impls.rs:17:13
|
LL | fn gimme<F: Foo>() { }
| --- required by this bound in `gimme`
...
LL | gimme::<(i32, f32)>();
| ^^^^^^^^^^ the trait `Foo` is not implemented for `(i32, f32)`
|
= help: the following implementations were found:
<(T, u32) as Foo>
note: required by a bound in `gimme`
--> $DIR/generic_impls.rs:7:13
|
LL | fn gimme<F: Foo>() { }
| ^^^ required by this bound in `gimme`
error: aborting due to 2 previous errors

View file

@ -1,22 +1,27 @@
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/impl_wf.rs:11:6
|
LL | trait Foo: Sized { }
| ----- required by this bound in `Foo`
...
LL | impl Foo for str { }
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
note: required by a bound in `Foo`
--> $DIR/impl_wf.rs:3:12
|
LL | trait Foo: Sized { }
| ^^^^^ required by this bound in `Foo`
error[E0277]: the trait bound `f32: Foo` is not satisfied
--> $DIR/impl_wf.rs:22:6
|
LL | trait Baz<U: ?Sized> where U: Foo { }
| --- required by this bound in `Baz`
...
LL | impl Baz<f32> for f32 { }
| ^^^^^^^^ the trait `Foo` is not implemented for `f32`
|
note: required by a bound in `Baz`
--> $DIR/impl_wf.rs:18:31
|
LL | trait Baz<U: ?Sized> where U: Foo { }
| ^^^ required by this bound in `Baz`
error: aborting due to 2 previous errors

View file

@ -1,11 +1,14 @@
error[E0277]: the trait bound `f32: Foo` is not satisfied
--> $DIR/impl_wf_2.rs:25:5
|
LL | type Item: Foo;
| --- required by this bound in `Bar::Item`
...
LL | type Item = f32;
| ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `f32`
|
note: required by a bound in `Bar::Item`
--> $DIR/impl_wf_2.rs:8:16
|
LL | type Item: Foo;
| ^^^ required by this bound in `Bar::Item`
error: aborting due to previous error

View file

@ -1,15 +1,17 @@
error[E0277]: the trait bound `{float}: Bar` is not satisfied
--> $DIR/type_inference.rs:27:14
|
LL | fn only_bar<T: Bar>(_x: T) { }
| --- required by this bound in `only_bar`
...
LL | only_bar(x);
| ^ the trait `Bar` is not implemented for `{float}`
|
= help: the following implementations were found:
<i32 as Bar>
<u32 as Bar>
note: required by a bound in `only_bar`
--> $DIR/type_inference.rs:12:16
|
LL | fn only_bar<T: Bar>(_x: T) { }
| ^^^ required by this bound in `only_bar`
error: aborting due to previous error

View file

@ -1,15 +1,18 @@
error[E0631]: type mismatch in closure arguments
--> $DIR/expect-infer-var-appearing-twice.rs:14:5
|
LL | fn with_closure<F, A>(_: F)
| ------------ required by a bound in this
LL | where F: FnOnce(A, A)
| ------------ required by this bound in `with_closure`
...
LL | with_closure(|x: u32, y: i32| {
| ^^^^^^^^^^^^ ---------------- found signature of `fn(u32, i32) -> _`
| |
| expected signature of `fn(_, _) -> _`
|
note: required by a bound in `with_closure`
--> $DIR/expect-infer-var-appearing-twice.rs:2:14
|
LL | fn with_closure<F, A>(_: F)
| ------------ required by a bound in this
LL | where F: FnOnce(A, A)
| ^^^^^^^^^^^^ required by this bound in `with_closure`
error: aborting due to previous error

View file

@ -1,12 +1,14 @@
error[E0277]: `F` cannot be sent between threads safely
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:22
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
| ---- required by this bound in `X`
...
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
| ^^^^ `F` cannot be sent between threads safely
|
note: required by a bound in `X`
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:1:43
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
| ^^^^ required by this bound in `X`
help: consider further restricting this bound
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {

View file

@ -1,12 +1,14 @@
error[E0277]: `F` cannot be shared between threads safely
--> $DIR/closure-bounds-subtype.rs:13:22
|
LL | fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
| ---- required by this bound in `take_const_owned`
...
LL | take_const_owned(f);
| ^ `F` cannot be shared between threads safely
|
note: required by a bound in `take_const_owned`
--> $DIR/closure-bounds-subtype.rs:4:50
|
LL | fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
| ^^^^ required by this bound in `take_const_owned`
help: consider further restricting this bound
|
LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {

View file

@ -4,14 +4,14 @@ error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads s
LL | let t = thread::spawn(|| {
| ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
|
::: $SRC_DIR/std/src/thread/mod.rs:LL:COL
|
LL | F: Send + 'static,
| ---- required by this bound in `spawn`
|
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
= note: required because of the requirements on the impl of `Send` for `&std::sync::mpsc::Receiver<()>`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:6:27: 9:6]`
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
|
LL | F: Send + 'static,
| ^^^^ required by this bound in `spawn`
error[E0277]: `Sender<()>` cannot be shared between threads safely
--> $DIR/closure-move-sync.rs:18:5
@ -19,14 +19,14 @@ error[E0277]: `Sender<()>` cannot be shared between threads safely
LL | thread::spawn(|| tx.send(()).unwrap());
| ^^^^^^^^^^^^^ `Sender<()>` cannot be shared between threads safely
|
::: $SRC_DIR/std/src/thread/mod.rs:LL:COL
|
LL | F: Send + 'static,
| ---- required by this bound in `spawn`
|
= help: the trait `Sync` is not implemented for `Sender<()>`
= note: required because of the requirements on the impl of `Send` for `&Sender<()>`
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:18:19: 18:42]`
note: required by a bound in `spawn`
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
|
LL | F: Send + 'static,
| ^^^^ required by this bound in `spawn`
error: aborting due to 2 previous errors

View file

@ -1,11 +1,14 @@
error[E0277]: the trait bound `&dyn Trait: Trait` is not satisfied
--> $DIR/coherence-unsafe-trait-object-impl.rs:15:13
|
LL | fn takes_t<S: Trait>(s: S) {
| ----- required by this bound in `takes_t`
...
LL | takes_t(t);
| ^ the trait `Trait` is not implemented for `&dyn Trait`
|
note: required by a bound in `takes_t`
--> $DIR/coherence-unsafe-trait-object-impl.rs:10:15
|
LL | fn takes_t<S: Trait>(s: S) {
| ^^^^^ required by this bound in `takes_t`
error: aborting due to previous error

View file

@ -1,14 +1,16 @@
error[E0277]: the trait bound `u16: Bar<N>` is not satisfied
--> $DIR/associated-type-bound-fail.rs:13:5
|
LL | type Assoc: Bar<N>;
| ------ required by this bound in `Foo::Assoc`
...
LL | type Assoc = u16;
| ^^^^^^^^^^^^^^^^^ the trait `Bar<N>` is not implemented for `u16`
|
= help: the following implementations were found:
<u16 as Bar<3_usize>>
note: required by a bound in `Foo::Assoc`
--> $DIR/associated-type-bound-fail.rs:8:17
|
LL | type Assoc: Bar<N>;
| ^^^^^^ required by this bound in `Foo::Assoc`
error: aborting due to previous error

View file

@ -1,14 +1,16 @@
error[E0277]: the trait bound `u16: Bar<N>` is not satisfied
--> $DIR/associated-type-bound-fail.rs:13:5
|
LL | type Assoc: Bar<N>;
| ------ required by this bound in `Foo::Assoc`
...
LL | type Assoc = u16;
| ^^^^^^^^^^^^^^^^^ the trait `Bar<N>` is not implemented for `u16`
|
= help: the following implementations were found:
<u16 as Bar<3_usize>>
note: required by a bound in `Foo::Assoc`
--> $DIR/associated-type-bound-fail.rs:8:17
|
LL | type Assoc: Bar<N>;
| ^^^^^^ required by this bound in `Foo::Assoc`
error: aborting due to previous error

View file

@ -6,11 +6,11 @@ LL | pub const fn is_zst<T: ?Sized>() -> usize {
LL | if std::mem::size_of::<T>() == 0 {
| ^ doesn't have a size known at compile-time
|
::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: required by a bound in `std::mem::size_of`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
LL | pub const fn size_of<T>() -> usize {
| - required by this bound in `std::mem::size_of`
|
| ^ required by this bound in `std::mem::size_of`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - pub const fn is_zst<T: ?Sized>() -> usize {

View file

@ -1,9 +1,6 @@
error: unconstrained generic constant
--> $DIR/abstract-const-as-cast-3.rs:17:5
|
LL | fn assert_impl<T: Trait>() {}
| ----- required by this bound in `use_trait_impl::assert_impl`
...
LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@ -13,6 +10,11 @@ note: required because of the requirements on the impl of `Trait` for `HasCastIn
|
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `use_trait_impl::assert_impl`
--> $DIR/abstract-const-as-cast-3.rs:14:23
|
LL | fn assert_impl<T: Trait>() {}
| ^^^^^ required by this bound in `use_trait_impl::assert_impl`
error[E0308]: mismatched types
--> $DIR/abstract-const-as-cast-3.rs:17:5
@ -26,9 +28,6 @@ LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
error: unconstrained generic constant
--> $DIR/abstract-const-as-cast-3.rs:20:5
|
LL | fn assert_impl<T: Trait>() {}
| ----- required by this bound in `use_trait_impl::assert_impl`
...
LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@ -38,6 +37,11 @@ note: required because of the requirements on the impl of `Trait` for `HasCastIn
|
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `use_trait_impl::assert_impl`
--> $DIR/abstract-const-as-cast-3.rs:14:23
|
LL | fn assert_impl<T: Trait>() {}
| ^^^^^ required by this bound in `use_trait_impl::assert_impl`
error[E0308]: mismatched types
--> $DIR/abstract-const-as-cast-3.rs:20:5
@ -69,9 +73,6 @@ LL | assert_impl::<HasCastInTraitImpl<14, 13>>();
error: unconstrained generic constant
--> $DIR/abstract-const-as-cast-3.rs:35:5
|
LL | fn assert_impl<T: Trait>() {}
| ----- required by this bound in `use_trait_impl_2::assert_impl`
...
LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@ -81,6 +82,11 @@ note: required because of the requirements on the impl of `Trait` for `HasCastIn
|
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `use_trait_impl_2::assert_impl`
--> $DIR/abstract-const-as-cast-3.rs:32:23
|
LL | fn assert_impl<T: Trait>() {}
| ^^^^^ required by this bound in `use_trait_impl_2::assert_impl`
error[E0308]: mismatched types
--> $DIR/abstract-const-as-cast-3.rs:35:5
@ -94,9 +100,6 @@ LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
error: unconstrained generic constant
--> $DIR/abstract-const-as-cast-3.rs:38:5
|
LL | fn assert_impl<T: Trait>() {}
| ----- required by this bound in `use_trait_impl_2::assert_impl`
...
LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
@ -106,6 +109,11 @@ note: required because of the requirements on the impl of `Trait` for `HasCastIn
|
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `use_trait_impl_2::assert_impl`
--> $DIR/abstract-const-as-cast-3.rs:32:23
|
LL | fn assert_impl<T: Trait>() {}
| ^^^^^ required by this bound in `use_trait_impl_2::assert_impl`
error[E0308]: mismatched types
--> $DIR/abstract-const-as-cast-3.rs:38:5

View file

@ -4,12 +4,12 @@ error: unconstrained generic constant
LL | let _ = const_evaluatable_lib::test1::<T>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: $DIR/auxiliary/const_evaluatable_lib.rs:6:10
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
|
LL | [u8; std::mem::size_of::<T>() - 1]: Sized,
| ---------------------------- required by this bound in `test1`
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
error: unconstrained generic constant
--> $DIR/cross_crate_predicate.rs:7:13
@ -17,12 +17,12 @@ error: unconstrained generic constant
LL | let _ = const_evaluatable_lib::test1::<T>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: $DIR/auxiliary/const_evaluatable_lib.rs:4:27
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:4:27
|
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
| ---------------------------- required by this bound in `test1`
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
error: unconstrained generic constant
--> $DIR/cross_crate_predicate.rs:7:13
@ -30,12 +30,12 @@ error: unconstrained generic constant
LL | let _ = const_evaluatable_lib::test1::<T>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: $DIR/auxiliary/const_evaluatable_lib.rs:6:10
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
|
LL | [u8; std::mem::size_of::<T>() - 1]: Sized,
| ---------------------------- required by this bound in `test1`
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
error: unconstrained generic constant
--> $DIR/cross_crate_predicate.rs:7:13
@ -43,12 +43,12 @@ error: unconstrained generic constant
LL | let _ = const_evaluatable_lib::test1::<T>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: $DIR/auxiliary/const_evaluatable_lib.rs:4:27
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
note: required by a bound in `test1`
--> $DIR/auxiliary/const_evaluatable_lib.rs:4:27
|
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
| ---------------------------- required by this bound in `test1`
|
= help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<T>() - 1]:`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
error: aborting due to 4 previous errors

View file

@ -1,11 +1,14 @@
error[E0284]: type annotations needed: cannot satisfy `the constant `use_dyn::<{_: usize}>::{constant#0}` can be evaluated`
--> $DIR/object-safety-ok-infer-err.rs:20:5
|
LL | fn use_dyn<const N: usize>(v: &dyn Foo<N>) where [u8; N + 1]: Sized {
| ----- required by this bound in `use_dyn`
...
LL | use_dyn(&());
| ^^^^^^^ cannot satisfy `the constant `use_dyn::<{_: usize}>::{constant#0}` can be evaluated`
|
note: required by a bound in `use_dyn`
--> $DIR/object-safety-ok-infer-err.rs:14:55
|
LL | fn use_dyn<const N: usize>(v: &dyn Foo<N>) where [u8; N + 1]: Sized {
| ^^^^^ required by this bound in `use_dyn`
error: aborting due to previous error

View file

@ -37,66 +37,74 @@ LL | | }
error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:26:6
|
LL | trait Foo
| --- required by a bound in this
...
LL | <u8 as Baz>::Quaks: Bar,
| --- required by this bound in `Foo`
...
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:26:6
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:20:29
|
LL | trait Foo
| --- required by a bound in this
...
LL | [<u8 as Baz>::Quaks; 2]: Bar,
| --- required by this bound in `Foo`
...
LL | <u8 as Baz>::Quaks: Bar,
| ^^^ required by this bound in `Foo`
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:26:6
|
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:19:34
|
LL | trait Foo
| --- required by a bound in this
...
LL | [<u8 as Baz>::Quaks; 2]: Bar,
| --- required by this bound in `Foo`
...
| ^^^ required by this bound in `Foo`
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
|
LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:19:34
|
LL | trait Foo
| --- required by a bound in this
...
LL | <u8 as Baz>::Quaks: Bar,
| --- required by this bound in `Foo`
...
LL | [<u8 as Baz>::Quaks; 2]: Bar,
| ^^^ required by this bound in `Foo`
error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
|
LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:20:29
|
LL | trait Foo
| --- required by a bound in this
...
LL | <u8 as Baz>::Quaks: Bar,
| ^^^ required by this bound in `Foo`
error: aborting due to 6 previous errors

View file

@ -37,66 +37,74 @@ LL | | }
error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:26:6
|
LL | trait Foo
| --- required by a bound in this
...
LL | <u8 as Baz>::Quaks: Bar,
| --- required by this bound in `Foo`
...
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:26:6
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:20:29
|
LL | trait Foo
| --- required by a bound in this
...
LL | [<u8 as Baz>::Quaks; 2]: Bar,
| --- required by this bound in `Foo`
...
LL | <u8 as Baz>::Quaks: Bar,
| ^^^ required by this bound in `Foo`
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:26:6
|
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:19:34
|
LL | trait Foo
| --- required by a bound in this
...
LL | [<u8 as Baz>::Quaks; 2]: Bar,
| --- required by this bound in `Foo`
...
| ^^^ required by this bound in `Foo`
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
|
LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:19:34
|
LL | trait Foo
| --- required by a bound in this
...
LL | <u8 as Baz>::Quaks: Bar,
| --- required by this bound in `Foo`
...
LL | [<u8 as Baz>::Quaks; 2]: Bar,
| ^^^ required by this bound in `Foo`
error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:30:14
|
LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following implementations were found:
<[[u16; 3]; 3] as Bar>
<[u16; 4] as Bar>
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:20:29
|
LL | trait Foo
| --- required by a bound in this
...
LL | <u8 as Baz>::Quaks: Bar,
| ^^^ required by this bound in `Foo`
error: aborting due to 6 previous errors

View file

@ -37,24 +37,28 @@ LL | IsLessOrEqual<{ 8 - I }, { 8 - J }>: True,
error[E0283]: type annotations needed
--> $DIR/issue-72787.rs:21:26
|
LL | pub trait True {}
| -------------- required by this bound in `True`
...
LL | IsLessOrEqual<I, 8>: True,
| ^^^^ cannot infer type for struct `IsLessOrEqual<I, 8_u32>`
|
= note: cannot satisfy `IsLessOrEqual<I, 8_u32>: True`
note: required by a bound in `True`
--> $DIR/issue-72787.rs:7:1
|
LL | pub trait True {}
| ^^^^^^^^^^^^^^ required by this bound in `True`
error[E0283]: type annotations needed
--> $DIR/issue-72787.rs:21:26
|
LL | pub trait True {}
| -------------- required by this bound in `True`
...
LL | IsLessOrEqual<I, 8>: True,
| ^^^^ cannot infer type for struct `IsLessOrEqual<I, 8_u32>`
|
= note: cannot satisfy `IsLessOrEqual<I, 8_u32>: True`
note: required by a bound in `True`
--> $DIR/issue-72787.rs:7:1
|
LL | pub trait True {}
| ^^^^^^^^^^^^^^ required by this bound in `True`
error: aborting due to 6 previous errors

View file

@ -3,9 +3,6 @@ error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied
|
LL | writes_to_specific_path(&cap);
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `_Contains<&C>` is not implemented for `()`
...
LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
| ------------- required by this bound in `writes_to_specific_path`
|
note: required because of the requirements on the impl of `Contains<(), true>` for `&C`
--> $DIR/issue-85848.rs:21:12
@ -17,15 +14,17 @@ note: required because of the requirements on the impl of `Delegates<()>` for `&
|
LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
| ^^^^^^^^^^^^ ^
note: required by a bound in `writes_to_specific_path`
--> $DIR/issue-85848.rs:29:31
|
LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
| ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
error: unconstrained generic constant
--> $DIR/issue-85848.rs:24:5
|
LL | writes_to_specific_path(&cap);
| ^^^^^^^^^^^^^^^^^^^^^^^
...
LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
| ------------- required by this bound in `writes_to_specific_path`
|
= help: try adding a `where` bound using this expression: `where [(); { contains::<T, U>() }]:`
note: required because of the requirements on the impl of `Contains<(), true>` for `&C`
@ -38,6 +37,11 @@ note: required because of the requirements on the impl of `Delegates<()>` for `&
|
LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
| ^^^^^^^^^^^^ ^
note: required by a bound in `writes_to_specific_path`
--> $DIR/issue-85848.rs:29:31
|
LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
| ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
error: aborting due to 2 previous errors

View file

@ -4,10 +4,11 @@ error[E0284]: type annotations needed: cannot satisfy `the constant `foo::{opaqu
LL | generics_of_parent_impl_trait::foo([()]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `the constant `foo::{opaque#0}::{constant#0}` can be evaluated`
|
::: $DIR/auxiliary/generics_of_parent_impl_trait.rs:6:48
note: required by a bound in `foo`
--> $DIR/auxiliary/generics_of_parent_impl_trait.rs:6:48
|
LL | pub fn foo<const N: usize>(foo: impl Into<[(); N + 1]>) {
| ----- required by this bound in `foo`
| ^^^^^ required by this bound in `foo`
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | #[derive(Eq,PartialEq)]
LL | x: Error
| ^^^^^^^^ the trait `Eq` is not implemented for `Error`
|
::: $SRC_DIR/core/src/cmp.rs:LL:COL
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
| -- required by this bound in `AssertParamIsEq`
|
| ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | #[derive(Eq,PartialEq)]
LL | Error
| ^^^^^ the trait `Eq` is not implemented for `Error`
|
::: $SRC_DIR/core/src/cmp.rs:LL:COL
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
| -- required by this bound in `AssertParamIsEq`
|
| ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | struct Struct {
LL | x: Error
| ^^^^^^^^ the trait `Eq` is not implemented for `Error`
|
::: $SRC_DIR/core/src/cmp.rs:LL:COL
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
| -- required by this bound in `AssertParamIsEq`
|
| ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | struct Struct(
LL | Error
| ^^^^^ the trait `Eq` is not implemented for `Error`
|
::: $SRC_DIR/core/src/cmp.rs:LL:COL
note: required by a bound in `AssertParamIsEq`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
LL | pub struct AssertParamIsEq<T: Eq + ?Sized> {
| -- required by this bound in `AssertParamIsEq`
|
| ^^ required by this bound in `AssertParamIsEq`
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | #[derive(Hash)]
LL | x: Error
| ^^^^^^^^ the trait `Hash` is not implemented for `Error`
|
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
note: required by a bound in `std::hash::Hash::hash`
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
|
| ^ required by this bound in `std::hash::Hash::hash`
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | #[derive(Hash)]
LL | Error
| ^^^^^ the trait `Hash` is not implemented for `Error`
|
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
note: required by a bound in `std::hash::Hash::hash`
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
|
| ^ required by this bound in `std::hash::Hash::hash`
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | struct Struct {
LL | x: Error
| ^^^^^^^^ the trait `Hash` is not implemented for `Error`
|
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
note: required by a bound in `std::hash::Hash::hash`
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
|
| ^ required by this bound in `std::hash::Hash::hash`
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -7,11 +7,11 @@ LL | struct Struct(
LL | Error
| ^^^^^ the trait `Hash` is not implemented for `Error`
|
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
note: required by a bound in `std::hash::Hash::hash`
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
|
| ^ required by this bound in `std::hash::Hash::hash`
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error[E0277]: the trait bound `C: Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:31:13
|
LL | fn is_copy<T: Copy>(_: T) {}
| ---- required by this bound in `is_copy`
...
LL | is_copy(B { a: 1, b: C });
| ^^^^^^^^^^^^^^^^
| |
@ -15,14 +12,16 @@ note: required because of the requirements on the impl of `Copy` for `B<C>`
|
LL | #[derive(Copy, Clone)]
| ^^^^
note: required by a bound in `is_copy`
--> $DIR/deriving-copyclone.rs:18:15
|
LL | fn is_copy<T: Copy>(_: T) {}
| ^^^^ required by this bound in `is_copy`
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `C: Clone` is not satisfied
--> $DIR/deriving-copyclone.rs:32:14
|
LL | fn is_clone<T: Clone>(_: T) {}
| ----- required by this bound in `is_clone`
...
LL | is_clone(B { a: 1, b: C });
| ^^^^^^^^^^^^^^^^
| |
@ -34,14 +33,16 @@ note: required because of the requirements on the impl of `Clone` for `B<C>`
|
LL | #[derive(Copy, Clone)]
| ^^^^^
note: required by a bound in `is_clone`
--> $DIR/deriving-copyclone.rs:19:16
|
LL | fn is_clone<T: Clone>(_: T) {}
| ^^^^^ required by this bound in `is_clone`
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `D: Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:35:13
|
LL | fn is_copy<T: Copy>(_: T) {}
| ---- required by this bound in `is_copy`
...
LL | is_copy(B { a: 1, b: D });
| ^^^^^^^^^^^^^^^^
| |
@ -53,6 +54,11 @@ note: required because of the requirements on the impl of `Copy` for `B<D>`
|
LL | #[derive(Copy, Clone)]
| ^^^^
note: required by a bound in `is_copy`
--> $DIR/deriving-copyclone.rs:18:15
|
LL | fn is_copy<T: Copy>(_: T) {}
| ^^^^ required by this bound in `is_copy`
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 3 previous errors

View file

@ -1,9 +1,6 @@
error[E0275]: overflow evaluating the requirement `K: Send`
--> $DIR/recursion_limit.rs:34:5
|
LL | fn is_send<T:Send>() { }
| ---- required by this bound in `is_send`
...
LL | is_send::<A>();
| ^^^^^^^^^^^^
|
@ -58,6 +55,11 @@ note: required because it appears within the type `A`
|
LL | link! { A, B }
| ^
note: required by a bound in `is_send`
--> $DIR/recursion_limit.rs:31:14
|
LL | fn is_send<T:Send>() { }
| ^^^^ required by this bound in `is_send`
error: aborting due to previous error

View file

@ -1,13 +1,15 @@
error[E0277]: the size for values of type `[isize]` cannot be known at compilation time
--> $DIR/dst-sized-trait-param.rs:7:6
|
LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
| - required by this bound in `Foo`
LL |
LL | impl Foo<[isize]> for usize { }
| ^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[isize]`
note: required by a bound in `Foo`
--> $DIR/dst-sized-trait-param.rs:5:11
|
LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
| ^ required by this bound in `Foo`
help: consider relaxing the implicit `Sized` restriction
|
LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized
@ -16,13 +18,15 @@ LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is siz
error[E0277]: the size for values of type `[usize]` cannot be known at compilation time
--> $DIR/dst-sized-trait-param.rs:10:6
|
LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
| ----- required by this bound in `Foo`
...
LL | impl Foo<isize> for [usize] { }
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[usize]`
note: required by a bound in `Foo`
--> $DIR/dst-sized-trait-param.rs:5:16
|
LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
| ^^^^^ required by this bound in `Foo`
error: aborting due to 2 previous errors

View file

@ -1,11 +1,14 @@
error[E0271]: type mismatch resolving `<i8 as Trait>::AssociatedType == u32`
--> $DIR/E0271.rs:10:5
|
LL | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
| ------------------ required by this bound in `foo`
...
LL | foo(3_i8);
| ^^^ expected `u32`, found `&str`
|
note: required by a bound in `foo`
--> $DIR/E0271.rs:3:32
|
LL | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
| ^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo`
--> $DIR/E0275.rs:5:33
|
LL | trait Foo {}
| --------- required by this bound in `Foo`
...
LL | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^
|
@ -15,6 +12,11 @@ LL | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^ ^
= note: 127 redundant requirements hidden
= note: required because of the requirements on the impl of `Foo` for `Bar<T>`
note: required by a bound in `Foo`
--> $DIR/E0275.rs:1:1
|
LL | trait Foo {}
| ^^^^^^^^^ required by this bound in `Foo`
error: aborting due to previous error

View file

@ -1,9 +1,6 @@
error[E0277]: `*const u8` cannot be sent between threads safely
--> $DIR/E0277-2.rs:16:5
|
LL | fn is_send<T: Send>() { }
| ---- required by this bound in `is_send`
...
LL | is_send::<Foo>();
| ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely
|
@ -23,6 +20,11 @@ note: required because it appears within the type `Foo`
|
LL | struct Foo {
| ^^^
note: required by a bound in `is_send`
--> $DIR/E0277-2.rs:13:15
|
LL | fn is_send<T: Send>() { }
| ^^^^ required by this bound in `is_send`
error: aborting due to previous error

View file

@ -15,11 +15,14 @@ LL | fn f(p: &Path) { }
error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/E0277.rs:15:15
|
LL | fn some_func<T: Foo>(foo: T) {
| --- required by this bound in `some_func`
...
LL | some_func(5i32);
| ^^^^ the trait `Foo` is not implemented for `i32`
|
note: required by a bound in `some_func`
--> $DIR/E0277.rs:7:17
|
LL | fn some_func<T: Foo>(foo: T) {
| ^^^ required by this bound in `some_func`
error: aborting due to 2 previous errors

Some files were not shown because too many files have changed in this diff Show more