Point at call span that introduced obligation for the arg

This commit is contained in:
Esteban Kuber 2021-09-07 11:30:53 +00:00
parent 8a3f712518
commit 569a842730
94 changed files with 668 additions and 250 deletions

View File

@ -2297,9 +2297,19 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
}
ObligationCauseCode::FunctionArgumentObligation {
arg_hir_id: _,
call_hir_id: _,
call_hir_id,
ref parent_code,
} => {
let hir = self.tcx.hir();
if let Some(Node::Expr(hir::Expr {
kind:
hir::ExprKind::Call(hir::Expr { span, .. }, _)
| hir::ExprKind::MethodCall(_, span, ..),
..
})) = hir.find(call_hir_id)
{
err.span_label(*span, "required by a bound in this call");
}
ensure_sufficient_stack(|| {
self.note_obligation_cause_code(
err,

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `<G as GetToInt>::R: ToInt` is not satisfied
--> $DIR/associated-types-bound-failure.rs:19:19
|
LL | ToInt::to_int(&g.get())
| ^^^^^^^^ the trait `ToInt` is not implemented for `<G as GetToInt>::R`
| ------------- ^^^^^^^^ the trait `ToInt` is not implemented for `<G as GetToInt>::R`
| |
| required by a bound introduced by this call
|
note: required by `ToInt::to_int`
--> $DIR/associated-types-bound-failure.rs:6:5

View File

@ -13,7 +13,9 @@ error[E0277]: the trait bound `u32: Foo` is not satisfied
--> $DIR/associated-types-path-2.rs:29:14
|
LL | f1(2u32, 4u32);
| ^^^^ the trait `Foo` is not implemented for `u32`
| -- ^^^^ the trait `Foo` is not implemented for `u32`
| |
| required by a bound introduced by this call
|
note: required by a bound in `f1`
--> $DIR/associated-types-path-2.rs:13:14
@ -31,7 +33,9 @@ error[E0277]: the trait bound `u32: Foo` is not satisfied
--> $DIR/associated-types-path-2.rs:35:14
|
LL | f1(2u32, 4i32);
| ^^^^ the trait `Foo` is not implemented for `u32`
| -- ^^^^ the trait `Foo` is not implemented for `u32`
| |
| required by a bound introduced by this call
|
note: required by a bound in `f1`
--> $DIR/associated-types-path-2.rs:13:14

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/issue-27675-unchecked-bounds.rs:15:31
|
LL | copy::<dyn Setup<From=T>>(t)
| ^ the trait `Copy` is not implemented for `T`
| ------------------------- ^ the trait `Copy` is not implemented for `T`
| |
| required by a bound introduced by this call
|
note: required by a bound in `copy`
--> $DIR/issue-27675-unchecked-bounds.rs:10:12

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `Option<&str>: AsRef<Path>` is not satisfied
--> $DIR/issue-72442.rs:12:36
|
LL | let mut f = File::open(path.to_str())?;
| ^^^^^^^^^^^^^ the trait `AsRef<Path>` is not implemented for `Option<&str>`
| ---------- ^^^^^^^^^^^^^ the trait `AsRef<Path>` is not implemented for `Option<&str>`
| |
| required by a bound introduced by this call
|
note: required by a bound in `File::open`
--> $SRC_DIR/std/src/fs.rs:LL:COL

View File

@ -2,7 +2,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
--> $DIR/into-boxed-slice-fail.rs:7:35
|
LL | let _ = Box::into_boxed_slice(boxed_slice);
| ^^^^^^^^^^^ doesn't have a size known at compile-time
| --------------------- ^^^^^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `[u8]`
note: required by `Box::<T, A>::into_boxed_slice`
@ -24,7 +26,9 @@ error[E0277]: the size for values of type `dyn Debug` cannot be known at compila
--> $DIR/into-boxed-slice-fail.rs:11:35
|
LL | let _ = Box::into_boxed_slice(boxed_trait);
| ^^^^^^^^^^^ doesn't have a size known at compile-time
| --------------------- ^^^^^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `dyn Debug`
note: required by `Box::<T, A>::into_boxed_slice`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `{float}: Bar` is not satisfied
--> $DIR/type_inference.rs:27:14
|
LL | only_bar(x);
| ^ the trait `Bar` is not implemented for `{float}`
| -------- ^ the trait `Bar` is not implemented for `{float}`
| |
| required by a bound introduced by this call
|
= help: the following implementations were found:
<i32 as Bar>

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
--> $DIR/closure-expected.rs:3:23
|
LL | let y = x.or_else(4);
| ^ expected an `FnOnce<()>` closure, found `{integer}`
| ------- ^ expected an `FnOnce<()>` closure, found `{integer}`
| |
| required by a bound introduced by this call
|
= help: the trait `FnOnce<()>` is not implemented for `{integer}`
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`

View File

@ -2,7 +2,9 @@ error[E0277]: `F` cannot be shared between threads safely
--> $DIR/closure-bounds-subtype.rs:13:22
|
LL | take_const_owned(f);
| ^ `F` cannot be shared between threads safely
| ---------------- ^ `F` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
note: required by a bound in `take_const_owned`
--> $DIR/closure-bounds-subtype.rs:4:50

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `FnOnce<(&str,)>` closure, found `unsafe extern "rust-i
--> $DIR/coerce-unsafe-to-closure.rs:2:44
|
LL | let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
| ^^^^^^^^^^^^^^^^^^^ expected an `FnOnce<(&str,)>` closure, found `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}`
| --- ^^^^^^^^^^^^^^^^^^^ expected an `FnOnce<(&str,)>` closure, found `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}`
| |
| required by a bound introduced by this call
|
= help: the trait `FnOnce<(&str,)>` is not implemented for `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `&dyn Trait: Trait` is not satisfied
--> $DIR/coherence-unsafe-trait-object-impl.rs:15:13
|
LL | takes_t(t);
| ^ the trait `Trait` is not implemented for `&dyn Trait`
| ------- ^ the trait `Trait` is not implemented for `&dyn Trait`
| |
| required by a bound introduced by this call
|
note: required by a bound in `takes_t`
--> $DIR/coherence-unsafe-trait-object-impl.rs:10:15

View File

@ -5,7 +5,10 @@ LL | #[derive(Clone)]
| ----- in this derive macro expansion
...
LL | x: Error
| ^^^^^^^^ the trait `Clone` is not implemented for `Error`
| ^^^^^^^^
| |
| the trait `Clone` is not implemented for `Error`
| required by a bound introduced by this call
|
note: required by `clone`
--> $SRC_DIR/core/src/clone.rs:LL:COL

View File

@ -5,7 +5,10 @@ LL | #[derive(Clone)]
| ----- in this derive macro expansion
...
LL | Error
| ^^^^^ the trait `Clone` is not implemented for `Error`
| ^^^^^
| |
| the trait `Clone` is not implemented for `Error`
| required by a bound introduced by this call
|
note: required by `clone`
--> $SRC_DIR/core/src/clone.rs:LL:COL

View File

@ -5,7 +5,10 @@ LL | #[derive(Clone)]
| ----- in this derive macro expansion
LL | struct Struct {
LL | x: Error
| ^^^^^^^^ the trait `Clone` is not implemented for `Error`
| ^^^^^^^^
| |
| the trait `Clone` is not implemented for `Error`
| required by a bound introduced by this call
|
note: required by `clone`
--> $SRC_DIR/core/src/clone.rs:LL:COL

View File

@ -5,7 +5,10 @@ LL | #[derive(Clone)]
| ----- in this derive macro expansion
LL | struct Struct(
LL | Error
| ^^^^^ the trait `Clone` is not implemented for `Error`
| ^^^^^
| |
| the trait `Clone` is not implemented for `Error`
| required by a bound introduced by this call
|
note: required by `clone`
--> $SRC_DIR/core/src/clone.rs:LL:COL

View File

@ -2,10 +2,11 @@ error[E0277]: the trait bound `C: Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:31:13
|
LL | is_copy(B { a: 1, b: C });
| ^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Copy`
| help: consider borrowing here: `&B { a: 1, b: C }`
| ------- ^^^^^^^^^^^^^^^^
| | |
| | expected an implementor of trait `Copy`
| | help: consider borrowing here: `&B { a: 1, b: C }`
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Copy` for `B<C>`
--> $DIR/deriving-copyclone.rs:9:10
@ -23,10 +24,11 @@ error[E0277]: the trait bound `C: Clone` is not satisfied
--> $DIR/deriving-copyclone.rs:32:14
|
LL | is_clone(B { a: 1, b: C });
| ^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Clone`
| help: consider borrowing here: `&B { a: 1, b: C }`
| -------- ^^^^^^^^^^^^^^^^
| | |
| | expected an implementor of trait `Clone`
| | help: consider borrowing here: `&B { a: 1, b: C }`
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Clone` for `B<C>`
--> $DIR/deriving-copyclone.rs:9:16
@ -44,10 +46,11 @@ error[E0277]: the trait bound `D: Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:35:13
|
LL | is_copy(B { a: 1, b: D });
| ^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Copy`
| help: consider borrowing here: `&B { a: 1, b: D }`
| ------- ^^^^^^^^^^^^^^^^
| | |
| | expected an implementor of trait `Copy`
| | help: consider borrowing here: `&B { a: 1, b: D }`
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Copy` for `B<D>`
--> $DIR/deriving-copyclone.rs:9:10

View File

@ -29,7 +29,10 @@ LL | #[derive(Clone)]
| ----- in this derive macro expansion
LL | struct C {
LL | x: NoCloneOrEq
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NoCloneOrEq`
| ^^^^^^^^^^^^^^
| |
| the trait `Clone` is not implemented for `NoCloneOrEq`
| required by a bound introduced by this call
|
note: required by `clone`
--> $SRC_DIR/core/src/clone.rs:LL:COL

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `i8: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:24:21
|
LL | Foo::<i32>::bar(&1i8);
| ^^^^ the trait `Foo<i32>` is not implemented for `i8`
| --------------- ^^^^ the trait `Foo<i32>` is not implemented for `i8`
| |
| required by a bound introduced by this call
|
= help: the following implementations were found:
<i8 as Foo<bool>>
@ -20,7 +22,9 @@ error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:25:21
|
LL | Foo::<i32>::bar(&1u8);
| ^^^^ the trait `Foo<i32>` is not implemented for `u8`
| --------------- ^^^^ the trait `Foo<i32>` is not implemented for `u8`
| |
| required by a bound introduced by this call
|
= help: the following implementations were found:
<u8 as Foo<bool>>
@ -37,7 +41,9 @@ error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:26:21
|
LL | Foo::<i32>::bar(&true);
| ^^^^^ the trait `Foo<i32>` is not implemented for `bool`
| --------------- ^^^^^ the trait `Foo<i32>` is not implemented for `bool`
| |
| required by a bound introduced by this call
|
= help: the following implementations were found:
<bool as Foo<bool>>

View File

@ -16,7 +16,9 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/E0277.rs:15:15
|
LL | some_func(5i32);
| ^^^^ the trait `Foo` is not implemented for `i32`
| --------- ^^^^ the trait `Foo` is not implemented for `i32`
| |
| required by a bound introduced by this call
|
note: required by a bound in `some_func`
--> $DIR/E0277.rs:7:17

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/error-should-say-copy-not-pod.rs:6:17
|
LL | check_bound("nocopy".to_string());
| ^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
| ----------- ^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check_bound`
--> $DIR/error-should-say-copy-not-pod.rs:3:18

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `Fn<()>` closure, found `extern "C" fn() {f}`
--> $DIR/extern-wrong-value-type.rs:9:11
|
LL | is_fn(f);
| ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}`
| ----- ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<()>` is not implemented for `extern "C" fn() {f}`
= note: wrap the `extern "C" fn() {f}` in a closure with no arguments: `|| { /* code */ }`

View File

@ -35,7 +35,9 @@ error[E0277]: expected a `Fn<(isize,)>` closure, found `{integer}`
--> $DIR/fn-trait-formatting.rs:19:14
|
LL | needs_fn(1);
| ^ expected an `Fn<(isize,)>` closure, found `{integer}`
| -------- ^ expected an `Fn<(isize,)>` closure, found `{integer}`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<(isize,)>` is not implemented for `{integer}`
note: required by a bound in `needs_fn`

View File

@ -2,7 +2,9 @@ error[E0277]: `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6]` cannot b
--> $DIR/static-not-unpin.rs:14:18
|
LL | assert_unpin(generator);
| ^^^^^^^^^ the trait `Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6]`
| ------------ ^^^^^^^^^ the trait `Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6]`
| |
| required by a bound introduced by this call
|
= note: consider using `Box::pin`
note: required by a bound in `assert_unpin`

View File

@ -2,7 +2,9 @@ error[E0631]: type mismatch in closure arguments
--> $DIR/issue-62529-1.rs:80:10
|
LL | task(annotate(
| __________^
| _____----_^
| | |
| | required by a bound introduced by this call
LL | |
LL | |
LL | | Annotate::<RefMutFamily<usize>>::new(),
@ -26,7 +28,9 @@ error[E0277]: the size for values of type `impl Execute` cannot be known at comp
--> $DIR/issue-62529-1.rs:80:10
|
LL | task(annotate(
| __________^
| _____----_^
| | |
| | required by a bound introduced by this call
LL | |
LL | |
LL | | Annotate::<RefMutFamily<usize>>::new(),
@ -50,7 +54,9 @@ error[E0277]: the trait bound `impl Execute: Execute` is not satisfied
--> $DIR/issue-62529-1.rs:80:10
|
LL | task(annotate(
| __________^
| _____----_^
| | |
| | required by a bound introduced by this call
LL | |
LL | |
LL | | Annotate::<RefMutFamily<usize>>::new(),

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied
--> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:26
|
LL | want_bar_for_any_ccx(b);
| ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
| -------------------- ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
| |
| required by a bound introduced by this call
|
note: required by a bound in `want_bar_for_any_ccx`
--> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:32:15

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied
--> $DIR/hrtb-higher-ranker-supertraits.rs:18:26
|
LL | want_foo_for_any_tcx(f);
| ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
| -------------------- ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
| |
| required by a bound introduced by this call
|
note: required by a bound in `want_foo_for_any_tcx`
--> $DIR/hrtb-higher-ranker-supertraits.rs:22:15
@ -20,7 +22,9 @@ error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied
--> $DIR/hrtb-higher-ranker-supertraits.rs:35:26
|
LL | want_bar_for_any_ccx(b);
| ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
| -------------------- ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
| |
| required by a bound introduced by this call
|
note: required by a bound in `want_bar_for_any_ccx`
--> $DIR/hrtb-higher-ranker-supertraits.rs:39:15

View File

@ -2,7 +2,9 @@ error[E0277]: the size for values of type `[{integer}]` cannot be known at compi
--> $DIR/issue-17651.rs:5:18
|
LL | (|| Box::new(*(&[0][..])))();
| ^^^^^^^^^^^ doesn't have a size known at compile-time
| -------- ^^^^^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `[{integer}]`
note: required by `Box::<T>::new`

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `FnMut<(_, char)>` closure, found `()`
--> $DIR/issue-23966.rs:2:32
|
LL | "".chars().fold(|_, _| (), ());
| ^^ expected an `FnMut<(_, char)>` closure, found `()`
| ---- ^^ expected an `FnMut<(_, char)>` closure, found `()`
| |
| required by a bound introduced by this call
|
= help: the trait `FnMut<(_, char)>` is not implemented for `()`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `(): InOut<_>` is not satisfied
--> $DIR/issue-25076.rs:10:20
|
LL | do_fold(bot(), ());
| ^^ the trait `InOut<_>` is not implemented for `()`
| ------- ^^ the trait `InOut<_>` is not implemented for `()`
| |
| required by a bound introduced by this call
|
note: required by a bound in `do_fold`
--> $DIR/issue-25076.rs:5:18

View File

@ -2,7 +2,9 @@ error[E0277]: `()` is not an iterator
--> $DIR/issue-28098.rs:2:28
|
LL | let _ = Iterator::next(&mut ());
| ^^^^^^^ `()` is not an iterator
| -------------- ^^^^^^^ `()` is not an iterator
| |
| required by a bound introduced by this call
|
= help: the trait `Iterator` is not implemented for `()`
note: required by `std::iter::Iterator::next`
@ -29,7 +31,9 @@ error[E0277]: `()` is not an iterator
--> $DIR/issue-28098.rs:9:28
|
LL | let _ = Iterator::next(&mut ());
| ^^^^^^^ `()` is not an iterator
| -------------- ^^^^^^^ `()` is not an iterator
| |
| required by a bound introduced by this call
|
= help: the trait `Iterator` is not implemented for `()`
note: required by `std::iter::Iterator::next`
@ -50,7 +54,9 @@ error[E0277]: `()` is not an iterator
--> $DIR/issue-28098.rs:18:28
|
LL | let _ = Iterator::next(&mut ());
| ^^^^^^^ `()` is not an iterator
| -------------- ^^^^^^^ `()` is not an iterator
| |
| required by a bound introduced by this call
|
= help: the trait `Iterator` is not implemented for `()`
note: required by `std::iter::Iterator::next`
@ -63,7 +69,9 @@ error[E0277]: `()` is not an iterator
--> $DIR/issue-28098.rs:22:28
|
LL | let _ = Iterator::next(&mut ());
| ^^^^^^^ `()` is not an iterator
| -------------- ^^^^^^^ `()` is not an iterator
| |
| required by a bound introduced by this call
|
= help: the trait `Iterator` is not implemented for `()`
note: required by `std::iter::Iterator::next`

View File

@ -4,7 +4,9 @@ error[E0593]: function is expected to take a single 0-tuple as argument, but it
LL | fn f(&self, _: ()) {
| ------------------ takes 2 distinct arguments
LL | None::<()>.map(Self::f);
| ^^^^^^^ expected function that takes a single 0-tuple as argument
| --- ^^^^^^^ expected function that takes a single 0-tuple as argument
| |
| required by a bound introduced by this call
error: aborting due to previous error

View File

@ -5,7 +5,9 @@ LL | pub fn new(foo: Option<i32>, _: ()) -> Foo {
| ------------------------------------------ takes 2 arguments
...
LL | self.foo.map(Foo::new)
| ^^^^^^^^ expected function that takes 1 argument
| --- ^^^^^^^^ expected function that takes 1 argument
| |
| required by a bound introduced by this call
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/issue-47706.rs:27:9
@ -14,7 +16,9 @@ LL | Bar(i32),
| -------- takes 1 argument
...
LL | foo(Qux::Bar);
| ^^^^^^^^ expected function that takes 0 arguments
| --- ^^^^^^^^ expected function that takes 0 arguments
| |
| required by a bound introduced by this call
|
note: required by a bound in `foo`
--> $DIR/issue-47706.rs:22:8

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `Fn<(_,)>` closure, found `impl Fn<(((_, _), _),)>`
--> $DIR/issue-59494.rs:21:22
|
LL | let t8 = t8n(t7, t7p(f, g));
| ^^^^^^^^^ expected an `Fn<(_,)>` closure, found `impl Fn<(((_, _), _),)>`
| --- ^^^^^^^^^ expected an `Fn<(_,)>` closure, found `impl Fn<(((_, _), _),)>`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<(_,)>` is not implemented for `impl Fn<(((_, _), _),)>`
note: required by a bound in `t8n`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `&u32: Foo` is not satisfied
--> $DIR/issue-60218.rs:18:27
|
LL | trigger_error(vec![], |x: &u32| x)
| ^^^^^^^^^^^ the trait `Foo` is not implemented for `&u32`
| ------------- ^^^^^^^^^^^ the trait `Foo` is not implemented for `&u32`
| |
| required by a bound introduced by this call
|
note: required by a bound in `trigger_error`
--> $DIR/issue-60218.rs:13:72

View File

@ -2,10 +2,11 @@ error[E0631]: type mismatch in function arguments
--> $DIR/issue-60283.rs:17:13
|
LL | foo((), drop)
| ^^^^
| |
| expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _`
| found signature of `fn(()) -> _`
| --- ^^^^
| | |
| | expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _`
| | found signature of `fn(()) -> _`
| required by a bound introduced by this call
|
note: required by a bound in `foo`
--> $DIR/issue-60283.rs:12:16
@ -20,7 +21,9 @@ error[E0277]: the size for values of type `<() as Trait<'_>>::Item` cannot be kn
--> $DIR/issue-60283.rs:17:13
|
LL | foo((), drop)
| ^^^^ doesn't have a size known at compile-time
| --- ^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `<() as Trait<'_>>::Item`
note: required by a bound in `std::mem::drop`

View File

@ -8,7 +8,9 @@ error[E0277]: the trait bound `(): _Func<_>` is not satisfied
--> $DIR/issue-66353.rs:12:41
|
LL | _Func::< <() as _A>::AssocT >::func(());
| ^^ the trait `_Func<_>` is not implemented for `()`
| ----------------------------------- ^^ the trait `_Func<_>` is not implemented for `()`
| |
| required by a bound introduced by this call
|
note: required by `_Func::func`
--> $DIR/issue-66353.rs:4:5

View File

@ -20,7 +20,9 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation
--> $DIR/issue-87199.rs:18:22
|
LL | ref_arg::<[i32]>(&[5]);
| ^^^^ doesn't have a size known at compile-time
| ---------------- ^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `[i32]`
note: required by a bound in `ref_arg`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied
--> $DIR/kindck-impl-type-params-2.rs:13:16
|
LL | take_param(&x);
| ^^ the trait `Copy` is not implemented for `Box<{integer}>`
| ---------- ^^ the trait `Copy` is not implemented for `Box<{integer}>`
| |
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Foo` for `Box<{integer}>`
--> $DIR/kindck-impl-type-params-2.rs:6:14

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied
--> $DIR/kindck-inherited-copy-bound.rs:21:16
|
LL | take_param(&x);
| ^^ the trait `Copy` is not implemented for `Box<{integer}>`
| ---------- ^^ the trait `Copy` is not implemented for `Box<{integer}>`
| |
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Foo` for `Box<{integer}>`
--> $DIR/kindck-inherited-copy-bound.rs:14:14

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied
--> $DIR/kindck-inherited-copy-bound.rs:21:16
|
LL | take_param(&x);
| ^^ the trait `Copy` is not implemented for `Box<{integer}>`
| ---------- ^^ the trait `Copy` is not implemented for `Box<{integer}>`
| |
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Foo` for `Box<{integer}>`
--> $DIR/kindck-inherited-copy-bound.rs:14:14

View File

@ -33,7 +33,9 @@ LL | fn f(_: u64) {}
| ------------ found signature of `fn(u64) -> _`
...
LL | foo(f);
| ^ expected signature of `fn(usize) -> _`
| --- ^ expected signature of `fn(usize) -> _`
| |
| required by a bound introduced by this call
|
note: required by a bound in `foo`
--> $DIR/E0631.rs:3:11
@ -48,7 +50,9 @@ LL | fn f(_: u64) {}
| ------------ found signature of `fn(u64) -> _`
...
LL | bar(f);
| ^ expected signature of `fn(usize) -> _`
| --- ^ expected signature of `fn(usize) -> _`
| |
| required by a bound introduced by this call
|
note: required by a bound in `bar`
--> $DIR/E0631.rs:4:11

View File

@ -119,7 +119,9 @@ error[E0593]: function is expected to take a single 2-tuple as argument, but it
--> $DIR/closure-arg-count.rs:24:57
|
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
| ^^^ expected function that takes a single 2-tuple as argument
| --- ^^^ expected function that takes a single 2-tuple as argument
| |
| required by a bound introduced by this call
...
LL | fn foo() {}
| -------- takes 0 arguments
@ -130,13 +132,17 @@ error[E0593]: closure is expected to take a single 2-tuple as argument, but it t
LL | let bar = |i, x, y| i;
| --------- takes 3 distinct arguments
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
| ^^^ expected closure that takes a single 2-tuple as argument
| --- ^^^ expected closure that takes a single 2-tuple as argument
| |
| required by a bound introduced by this call
error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
--> $DIR/closure-arg-count.rs:29:57
|
LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
| ^^^ expected function that takes a single 2-tuple as argument
| --- ^^^ expected function that takes a single 2-tuple as argument
| |
| required by a bound introduced by this call
...
LL | fn qux(x: usize, y: usize) {}
| -------------------------- takes 2 distinct arguments
@ -145,13 +151,17 @@ error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
--> $DIR/closure-arg-count.rs:32:45
|
LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
| ^^^^^^^^^^^^^^^^^^ expected function that takes 1 argument
| --- ^^^^^^^^^^^^^^^^^^ expected function that takes 1 argument
| |
| required by a bound introduced by this call
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/closure-arg-count.rs:35:10
|
LL | call(Foo);
| ^^^ expected function that takes 0 arguments
| ---- ^^^ expected function that takes 0 arguments
| |
| required by a bound introduced by this call
...
LL | struct Foo(u8);
| --------------- takes 1 argument

View File

@ -5,7 +5,9 @@ LL | fn takes_mut(x: &mut isize) { }
| --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _`
...
LL | apply(&3, takes_mut);
| ^^^^^^^^^ expected signature of `fn(&{integer}) -> _`
| ----- ^^^^^^^^^ expected signature of `fn(&{integer}) -> _`
| |
| required by a bound introduced by this call
|
note: required by a bound in `apply`
--> $DIR/fn-variance-1.rs:5:37
@ -20,7 +22,9 @@ LL | fn takes_imm(x: &isize) { }
| ----------------------- found signature of `for<'r> fn(&'r isize) -> _`
...
LL | apply(&mut 3, takes_imm);
| ^^^^^^^^^ expected signature of `fn(&mut {integer}) -> _`
| ----- ^^^^^^^^^ expected signature of `fn(&mut {integer}) -> _`
| |
| required by a bound introduced by this call
|
note: required by a bound in `apply`
--> $DIR/fn-variance-1.rs:5:37

View File

@ -16,5 +16,6 @@ pub fn main() {
let z = call_it(3, f);
//~^ ERROR type mismatch
//~| NOTE expected signature of `fn(isize, isize) -> _`
//~| NOTE required by a bound introduced by this call
println!("{}", z);
}

View File

@ -5,7 +5,9 @@ LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y });
| ----------------------------- found signature of `fn(usize, isize) -> _`
LL |
LL | let z = call_it(3, f);
| ^ expected signature of `fn(isize, isize) -> _`
| ------- ^ expected signature of `fn(isize, isize) -> _`
| |
| required by a bound introduced by this call
|
note: required by a bound in `call_it`
--> $DIR/unboxed-closures-vtable-mismatch.rs:7:14

View File

@ -2,7 +2,9 @@ error[E0277]: `Cell<i32>` cannot be shared between threads safely
--> $DIR/mutexguard-sync.rs:11:15
|
LL | test_sync(guard);
| ^^^^^ `Cell<i32>` cannot be shared between threads safely
| --------- ^^^^^ `Cell<i32>` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Sync` is not implemented for `Cell<i32>`
= note: required because of the requirements on the impl of `Sync` for `MutexGuard<'_, Cell<i32>>`

View File

@ -100,7 +100,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:33:11
|
LL | check(m1::S{});
| ^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -112,7 +114,9 @@ error[E0277]: the trait bound `c::S: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:35:11
|
LL | check(m2::S{});
| ^^^^^^^ the trait `Impossible` is not implemented for `c::S`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `c::S`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -124,7 +128,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:36:11
|
LL | check(m2::S);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -136,7 +142,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:39:11
|
LL | check(xm1::S{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -148,7 +156,9 @@ error[E0277]: the trait bound `namespace_mix::c::S: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:41:11
|
LL | check(xm2::S{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::S`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::S`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -160,7 +170,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:42:11
|
LL | check(xm2::S);
| ^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -172,7 +184,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:55:11
|
LL | check(m3::TS{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -184,7 +198,9 @@ error[E0277]: the trait bound `fn() -> c::TS {c::TS}: Impossible` is not satisfi
--> $DIR/namespace-mix.rs:56:11
|
LL | check(m3::TS);
| ^^^^^^ the trait `Impossible` is not implemented for `fn() -> c::TS {c::TS}`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `fn() -> c::TS {c::TS}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -196,7 +212,9 @@ error[E0277]: the trait bound `c::TS: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:57:11
|
LL | check(m4::TS{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::TS`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::TS`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -208,7 +226,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:58:11
|
LL | check(m4::TS);
| ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -220,7 +240,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:61:11
|
LL | check(xm3::TS{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -232,7 +254,9 @@ error[E0277]: the trait bound `fn() -> namespace_mix::c::TS {namespace_mix::c::T
--> $DIR/namespace-mix.rs:62:11
|
LL | check(xm3::TS);
| ^^^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -244,7 +268,9 @@ error[E0277]: the trait bound `namespace_mix::c::TS: Impossible` is not satisfie
--> $DIR/namespace-mix.rs:63:11
|
LL | check(xm4::TS{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::TS`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::TS`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -256,7 +282,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:64:11
|
LL | check(xm4::TS);
| ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -268,7 +296,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:77:11
|
LL | check(m5::US{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -280,7 +310,9 @@ error[E0277]: the trait bound `c::US: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:78:11
|
LL | check(m5::US);
| ^^^^^^ the trait `Impossible` is not implemented for `c::US`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `c::US`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -292,7 +324,9 @@ error[E0277]: the trait bound `c::US: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:79:11
|
LL | check(m6::US{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::US`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::US`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -304,7 +338,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:80:11
|
LL | check(m6::US);
| ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -316,7 +352,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:83:11
|
LL | check(xm5::US{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -328,7 +366,9 @@ error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfie
--> $DIR/namespace-mix.rs:84:11
|
LL | check(xm5::US);
| ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -340,7 +380,9 @@ error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfie
--> $DIR/namespace-mix.rs:85:11
|
LL | check(xm6::US{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -352,7 +394,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:86:11
|
LL | check(xm6::US);
| ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -364,7 +408,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:99:11
|
LL | check(m7::V{});
| ^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -376,7 +422,9 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:101:11
|
LL | check(m8::V{});
| ^^^^^^^ the trait `Impossible` is not implemented for `c::E`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -388,7 +436,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:102:11
|
LL | check(m8::V);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -400,7 +450,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:105:11
|
LL | check(xm7::V{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -412,7 +464,9 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:107:11
|
LL | check(xm8::V{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -424,7 +478,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:108:11
|
LL | check(xm8::V);
| ^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -436,7 +492,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:121:11
|
LL | check(m9::TV{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -448,7 +506,9 @@ error[E0277]: the trait bound `fn() -> c::E {c::E::TV}: Impossible` is not satis
--> $DIR/namespace-mix.rs:122:11
|
LL | check(m9::TV);
| ^^^^^^ the trait `Impossible` is not implemented for `fn() -> c::E {c::E::TV}`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `fn() -> c::E {c::E::TV}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -460,7 +520,9 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:123:11
|
LL | check(mA::TV{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::E`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -472,7 +534,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:124:11
|
LL | check(mA::TV);
| ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -484,7 +548,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:127:11
|
LL | check(xm9::TV{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -496,7 +562,9 @@ error[E0277]: the trait bound `fn() -> namespace_mix::c::E {namespace_mix::xm7::
--> $DIR/namespace-mix.rs:128:11
|
LL | check(xm9::TV);
| ^^^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -508,7 +576,9 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:129:11
|
LL | check(xmA::TV{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -520,7 +590,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:130:11
|
LL | check(xmA::TV);
| ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -532,7 +604,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:143:11
|
LL | check(mB::UV{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -544,7 +618,9 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:144:11
|
LL | check(mB::UV);
| ^^^^^^ the trait `Impossible` is not implemented for `c::E`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -556,7 +632,9 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:145:11
|
LL | check(mC::UV{});
| ^^^^^^^^ the trait `Impossible` is not implemented for `c::E`
| ----- ^^^^^^^^ the trait `Impossible` is not implemented for `c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -568,7 +646,9 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:146:11
|
LL | check(mC::UV);
| ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| ----- ^^^^^^ the trait `Impossible` is not implemented for `c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -580,7 +660,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:149:11
|
LL | check(xmB::UV{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -592,7 +674,9 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:150:11
|
LL | check(xmB::UV);
| ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -604,7 +688,9 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:151:11
|
LL | check(xmC::UV{});
| ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| ----- ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13
@ -616,7 +702,9 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf
--> $DIR/namespace-mix.rs:152:11
|
LL | check(xmC::UV);
| ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| ----- ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
| |
| required by a bound introduced by this call
|
note: required by a bound in `check`
--> $DIR/namespace-mix.rs:21:13

View File

@ -2,7 +2,9 @@ error[E0277]: `Rc<{integer}>` cannot be sent between threads safely
--> $DIR/no_send-rc.rs:7:9
|
LL | bar(x);
| ^ `Rc<{integer}>` cannot be sent between threads safely
| --- ^ `Rc<{integer}>` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `Rc<{integer}>`
note: required by a bound in `bar`

View File

@ -2,7 +2,9 @@ error[E0277]: `Foo` cannot be sent between threads safely
--> $DIR/no_send-struct.rs:15:9
|
LL | bar(x);
| ^ `Foo` cannot be sent between threads safely
| --- ^ `Foo` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `Foo`
note: required by a bound in `bar`

View File

@ -2,7 +2,9 @@ error[E0277]: `Foo` cannot be shared between threads safely
--> $DIR/no_share-struct.rs:12:9
|
LL | bar(x);
| ^ `Foo` cannot be shared between threads safely
| --- ^ `Foo` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Sync` is not implemented for `Foo`
note: required by a bound in `bar`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `Box<dyn Foo>: Foo` is not satisfied
--> $DIR/object-does-not-impl-trait.rs:6:44
|
LL | fn take_object(f: Box<dyn Foo>) { take_foo(f); }
| ^ the trait `Foo` is not implemented for `Box<dyn Foo>`
| -------- ^ the trait `Foo` is not implemented for `Box<dyn Foo>`
| |
| required by a bound introduced by this call
|
note: required by a bound in `take_foo`
--> $DIR/object-does-not-impl-trait.rs:5:15

View File

@ -4,7 +4,9 @@ error[E0277]: the trait bound `Foo: Trait` is not satisfied
LL | let x = || {
| _____________-
LL | | f(Foo{});
| | ^^^^^ the trait `Trait` is not implemented for `Foo`
| | - ^^^^^ the trait `Trait` is not implemented for `Foo`
| | |
| | required by a bound introduced by this call
LL | | let y = || {
LL | | f(Foo{});
LL | | };
@ -23,7 +25,9 @@ error[E0277]: the trait bound `Foo: Trait` is not satisfied
LL | let y = || {
| _________________-
LL | | f(Foo{});
| | ^^^^^ the trait `Trait` is not implemented for `Foo`
| | - ^^^^^ the trait `Trait` is not implemented for `Foo`
| | |
| | required by a bound introduced by this call
LL | | };
| |_________- in this scope
|
@ -42,7 +46,9 @@ LL | | f(Foo{});
LL | | let y = || {
... |
LL | | f(Foo{});
| | ^^^^^ the trait `Trait` is not implemented for `Foo`
| | - ^^^^^ the trait `Trait` is not implemented for `Foo`
| | |
| | required by a bound introduced by this call
... |
LL | | f(Foo{});
LL | | }
@ -63,7 +69,9 @@ LL | | f(Foo{});
LL | | let y = || {
... |
LL | | f(Foo{});
| | ^^^^^ the trait `Trait` is not implemented for `Foo`
| | - ^^^^^ the trait `Trait` is not implemented for `Foo`
| | |
| | required by a bound introduced by this call
LL | | }
| |_- in this scope
|

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
--> $DIR/multiple-impls.rs:33:18
|
LL | Index::index(&[] as &[i32], 2u32);
| ^^^^^^^^^^^^^ trait message
| ------------ ^^^^^^^^^^^^^ trait message
| |
| required by a bound introduced by this call
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
note: required by `Index::index`
@ -15,7 +17,9 @@ error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:36:18
|
LL | Index::index(&[] as &[i32], Foo(2u32));
| ^^^^^^^^^^^^^ on impl for Foo
| ------------ ^^^^^^^^^^^^^ on impl for Foo
| |
| required by a bound introduced by this call
|
= help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
note: required by `Index::index`
@ -28,7 +32,9 @@ error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:39:18
|
LL | Index::index(&[] as &[i32], Bar(2u32));
| ^^^^^^^^^^^^^ on impl for Bar
| ------------ ^^^^^^^^^^^^^ on impl for Bar
| |
| required by a bound introduced by this call
|
= help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
note: required by `Index::index`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
--> $DIR/on-impl.rs:22:25
|
LL | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
| ^^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice
| ------------------- ^^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice
| |
| required by a bound introduced by this call
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
note: required by `Index::index`

View File

@ -2,7 +2,9 @@ error[E0277]: `T` cannot be shared between threads safely
--> $DIR/phantom-auto-trait.rs:21:12
|
LL | is_zen(x)
| ^ `T` cannot be shared between threads safely
| ------ ^ `T` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Zen` for `&T`
--> $DIR/phantom-auto-trait.rs:10:24
@ -29,7 +31,9 @@ error[E0277]: `T` cannot be shared between threads safely
--> $DIR/phantom-auto-trait.rs:26:12
|
LL | is_zen(x)
| ^ `T` cannot be shared between threads safely
| ------ ^ `T` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
note: required because of the requirements on the impl of `Zen` for `&T`
--> $DIR/phantom-auto-trait.rs:10:24

View File

@ -6,7 +6,10 @@ LL | #[test]
LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
LL | | "0".parse()
LL | | }
| |_^ `main` can only return types that implement `Termination`
| | ^
| | |
| |_`main` can only return types that implement `Termination`
| required by a bound introduced by this call
|
= help: the trait `Termination` is not implemented for `Result<f32, ParseFloatError>`
note: required by a bound in `assert_test_result`

View File

@ -2,7 +2,9 @@ error[E0277]: can't compare `S` with `S`
--> $DIR/call-generic-method-nonconst.rs:19:34
|
LL | pub const EQ: bool = equals_self(&S);
| ^^ no implementation for `S == S`
| ----------- ^^ no implementation for `S == S`
| |
| required by a bound introduced by this call
|
= help: the trait `PartialEq` is not implemented for `S`
note: required by a bound in `equals_self`

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `Fn<()>` closure, found `fn() {foo}`
--> $DIR/fn-traits.rs:24:10
|
LL | call(foo);
| ^^^ expected an `Fn<()>` closure, found `fn() {foo}`
| ---- ^^^ expected an `Fn<()>` closure, found `fn() {foo}`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<()>` is not implemented for `fn() {foo}`
= note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
@ -17,7 +19,9 @@ error[E0277]: expected a `FnMut<()>` closure, found `fn() {foo}`
--> $DIR/fn-traits.rs:25:14
|
LL | call_mut(foo);
| ^^^ expected an `FnMut<()>` closure, found `fn() {foo}`
| -------- ^^^ expected an `FnMut<()>` closure, found `fn() {foo}`
| |
| required by a bound introduced by this call
|
= help: the trait `FnMut<()>` is not implemented for `fn() {foo}`
= note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
@ -32,7 +36,9 @@ error[E0277]: expected a `FnOnce<()>` closure, found `fn() {foo}`
--> $DIR/fn-traits.rs:26:15
|
LL | call_once(foo);
| ^^^ expected an `FnOnce<()>` closure, found `fn() {foo}`
| --------- ^^^ expected an `FnOnce<()>` closure, found `fn() {foo}`
| |
| required by a bound introduced by this call
|
= help: the trait `FnOnce<()>` is not implemented for `fn() {foo}`
= note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }`
@ -47,7 +53,9 @@ error[E0277]: expected a `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
--> $DIR/fn-traits.rs:28:10
|
LL | call(foo_unsafe);
| ^^^^^^^^^^ expected an `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
| ---- ^^^^^^^^^^ expected an `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<()>` is not implemented for `unsafe fn() {foo_unsafe}`
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
@ -62,7 +70,9 @@ error[E0277]: expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
--> $DIR/fn-traits.rs:30:14
|
LL | call_mut(foo_unsafe);
| ^^^^^^^^^^ expected an `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
| -------- ^^^^^^^^^^ expected an `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
| |
| required by a bound introduced by this call
|
= help: the trait `FnMut<()>` is not implemented for `unsafe fn() {foo_unsafe}`
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
@ -77,7 +87,9 @@ error[E0277]: expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
--> $DIR/fn-traits.rs:32:15
|
LL | call_once(foo_unsafe);
| ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
| --------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
| |
| required by a bound introduced by this call
|
= help: the trait `FnOnce<()>` is not implemented for `unsafe fn() {foo_unsafe}`
= note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`

View File

@ -13,7 +13,9 @@ error[E0277]: the type `str` cannot be indexed by `{integer}`
--> $DIR/str-idx.rs:4:19
|
LL | let _ = s.get(4);
| ^ string indices are ranges of `usize`
| --- ^ string indices are ranges of `usize`
| |
| required by a bound introduced by this call
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
@ -23,7 +25,9 @@ error[E0277]: the type `str` cannot be indexed by `{integer}`
--> $DIR/str-idx.rs:5:29
|
LL | let _ = s.get_unchecked(4);
| ^ string indices are ranges of `usize`
| ------------- ^ string indices are ranges of `usize`
| |
| required by a bound introduced by this call
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`

View File

@ -37,7 +37,9 @@ error[E0277]: the type `str` cannot be indexed by `{integer}`
--> $DIR/str-mut-idx.rs:9:15
|
LL | s.get_mut(1);
| ^ string indices are ranges of `usize`
| ------- ^ string indices are ranges of `usize`
| |
| required by a bound introduced by this call
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`
@ -47,7 +49,9 @@ error[E0277]: the type `str` cannot be indexed by `{integer}`
--> $DIR/str-mut-idx.rs:11:25
|
LL | s.get_unchecked_mut(1);
| ^ string indices are ranges of `usize`
| ----------------- ^ string indices are ranges of `usize`
| |
| required by a bound introduced by this call
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
= note: you can use `.chars().nth()` or `.bytes().nth()`

View File

@ -5,7 +5,9 @@ LL | async fn foo() {}
| --- consider calling this function
...
LL | bar(foo);
| ^^^ `fn() -> impl Future {foo}` is not a future
| --- ^^^ `fn() -> impl Future {foo}` is not a future
| |
| required by a bound introduced by this call
|
= help: the trait `Future` is not implemented for `fn() -> impl Future {foo}`
note: required by a bound in `bar`
@ -24,7 +26,9 @@ error[E0277]: `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-be
LL | let async_closure = async || ();
| -------- consider calling this closure
LL | bar(async_closure);
| ^^^^^^^^^^^^^ `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]` is not a future
| --- ^^^^^^^^^^^^^ `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]` is not a future
| |
| required by a bound introduced by this call
|
= help: the trait `Future` is not implemented for `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]`
note: required by a bound in `bar`

View File

@ -5,7 +5,9 @@ LL | fn foo() -> impl T<O=()> { S }
| --- consider calling this function
...
LL | bar(foo);
| ^^^ the trait `T` is not implemented for `fn() -> impl T {foo}`
| --- ^^^ the trait `T` is not implemented for `fn() -> impl T {foo}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `bar`
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
@ -23,7 +25,9 @@ error[E0277]: the trait bound `[closure@$DIR/fn-ctor-passed-as-arg-where-it-shou
LL | let closure = || S;
| -- consider calling this closure
LL | bar(closure);
| ^^^^^^^ the trait `T` is not implemented for `[closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:23]`
| --- ^^^^^^^ the trait `T` is not implemented for `[closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:23]`
| |
| required by a bound introduced by this call
|
note: required by a bound in `bar`
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `&S: Trait` is not satisfied
--> $DIR/imm-ref-trait-object-literal.rs:12:7
|
LL | foo(&s);
| ^^ the trait `Trait` is not implemented for `&S`
| --- ^^ the trait `Trait` is not implemented for `&S`
| |
| required by a bound introduced by this call
|
= help: the following implementations were found:
<&'a mut S as Trait>
@ -20,10 +22,11 @@ error[E0277]: the trait bound `S: Trait` is not satisfied
--> $DIR/imm-ref-trait-object-literal.rs:13:7
|
LL | foo(s);
| ^
| |
| expected an implementor of trait `Trait`
| help: consider mutably borrowing here: `&mut s`
| --- ^
| | |
| | expected an implementor of trait `Trait`
| | help: consider mutably borrowing here: `&mut s`
| required by a bound introduced by this call
|
note: required by a bound in `foo`
--> $DIR/imm-ref-trait-object-literal.rs:7:11

View File

@ -2,7 +2,9 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
--> $DIR/impl-trait-with-missing-bounds.rs:14:13
|
LL | qux(constraint);
| ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| |
| required by a bound introduced by this call
|
= help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
note: required by a bound in `qux`
@ -19,7 +21,9 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
--> $DIR/impl-trait-with-missing-bounds.rs:22:13
|
LL | qux(constraint);
| ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| |
| required by a bound introduced by this call
|
= help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
note: required by a bound in `qux`
@ -36,7 +40,9 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
--> $DIR/impl-trait-with-missing-bounds.rs:30:13
|
LL | qux(constraint);
| ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| |
| required by a bound introduced by this call
|
= help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
note: required by a bound in `qux`
@ -53,7 +59,9 @@ error[E0277]: `<impl Iterator + std::fmt::Debug as Iterator>::Item` doesn't impl
--> $DIR/impl-trait-with-missing-bounds.rs:37:13
|
LL | qux(constraint);
| ^^^^^^^^^^ `<impl Iterator + std::fmt::Debug as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| --- ^^^^^^^^^^ `<impl Iterator + std::fmt::Debug as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| |
| required by a bound introduced by this call
|
= help: the trait `Debug` is not implemented for `<impl Iterator + std::fmt::Debug as Iterator>::Item`
note: required by a bound in `qux`
@ -70,7 +78,9 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
--> $DIR/impl-trait-with-missing-bounds.rs:6:13
|
LL | qux(constraint);
| ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| |
| required by a bound introduced by this call
|
= help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
note: required by a bound in `qux`
@ -87,7 +97,9 @@ error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
--> $DIR/impl-trait-with-missing-bounds.rs:45:13
|
LL | qux(constraint);
| ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
| |
| required by a bound introduced by this call
|
= help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
note: required by a bound in `qux`

View File

@ -2,10 +2,11 @@ error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
--> $DIR/issue-62843.rs:4:32
|
LL | println!("{:?}", line.find(pattern));
| ^^^^^^^
| |
| expected an implementor of trait `Pattern<'_>`
| help: consider borrowing here: `&pattern`
| ---- ^^^^^^^
| | |
| | expected an implementor of trait `Pattern<'_>`
| | help: consider borrowing here: `&pattern`
| required by a bound introduced by this call
|
= note: the trait bound `String: Pattern<'_>` is not satisfied
= note: required because of the requirements on the impl of `Pattern<'_>` for `String`

View File

@ -2,7 +2,9 @@ error[E0277]: `<impl Foo as Foo>::Bar` cannot be sent between threads safely
--> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:14:20
|
LL | assert_is_send(&bar);
| ^^^^ `<impl Foo as Foo>::Bar` cannot be sent between threads safely
| -------------- ^^^^ `<impl Foo as Foo>::Bar` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar`
note: required by a bound in `assert_is_send`
@ -19,7 +21,9 @@ error[E0277]: `<impl Foo as Foo>::Bar` cannot be sent between threads safely
--> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:24:20
|
LL | assert_is_send(&bar);
| ^^^^ `<impl Foo as Foo>::Bar` cannot be sent between threads safely
| -------------- ^^^^ `<impl Foo as Foo>::Bar` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar`
note: required by a bound in `assert_is_send`

View File

@ -2,10 +2,11 @@ error[E0277]: the trait bound `i32: Tr` is not satisfied
--> $DIR/issue-84973-2.rs:11:9
|
LL | foo(a);
| ^
| |
| expected an implementor of trait `Tr`
| help: consider mutably borrowing here: `&mut a`
| --- ^
| | |
| | expected an implementor of trait `Tr`
| | help: consider mutably borrowing here: `&mut a`
| required by a bound introduced by this call
|
note: required by a bound in `foo`
--> $DIR/issue-84973-2.rs:7:11

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/issue-84973-blacklist.rs:15:12
|
LL | f_copy("".to_string());
| ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
| ------ ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
| |
| required by a bound introduced by this call
|
note: required by a bound in `f_copy`
--> $DIR/issue-84973-blacklist.rs:6:14
@ -14,7 +16,9 @@ error[E0277]: the trait bound `S: Clone` is not satisfied
--> $DIR/issue-84973-blacklist.rs:16:13
|
LL | f_clone(S);
| ^ the trait `Clone` is not implemented for `S`
| ------- ^ the trait `Clone` is not implemented for `S`
| |
| required by a bound introduced by this call
|
note: required by a bound in `f_clone`
--> $DIR/issue-84973-blacklist.rs:7:15
@ -39,7 +43,9 @@ error[E0277]: the size for values of type `dyn Fn()` cannot be known at compilat
--> $DIR/issue-84973-blacklist.rs:22:13
|
LL | f_sized(*ref_cl);
| ^^^^^^^ doesn't have a size known at compile-time
| ------- ^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `dyn Fn()`
note: required by a bound in `f_sized`
@ -52,7 +58,9 @@ error[E0277]: `Rc<{integer}>` cannot be sent between threads safely
--> $DIR/issue-84973-blacklist.rs:28:12
|
LL | f_send(rc);
| ^^ `Rc<{integer}>` cannot be sent between threads safely
| ------ ^^ `Rc<{integer}>` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `Rc<{integer}>`
note: required by a bound in `f_send`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `i32: Tr` is not satisfied
--> $DIR/issue-84973-negative.rs:10:9
|
LL | bar(a);
| ^ the trait `Tr` is not implemented for `i32`
| --- ^ the trait `Tr` is not implemented for `i32`
| |
| required by a bound introduced by this call
|
note: required by a bound in `bar`
--> $DIR/issue-84973-negative.rs:5:11
@ -14,10 +16,11 @@ error[E0277]: the trait bound `f32: Tr` is not satisfied
--> $DIR/issue-84973-negative.rs:11:9
|
LL | bar(b);
| ^
| |
| expected an implementor of trait `Tr`
| help: consider borrowing here: `&b`
| --- ^
| | |
| | expected an implementor of trait `Tr`
| | help: consider borrowing here: `&b`
| required by a bound introduced by this call
|
note: required by a bound in `bar`
--> $DIR/issue-84973-negative.rs:5:11

View File

@ -2,10 +2,11 @@ error[E0277]: the trait bound `Fancy: SomeTrait` is not satisfied
--> $DIR/issue-84973.rs:6:24
|
LL | let o = Other::new(f);
| ^
| |
| expected an implementor of trait `SomeTrait`
| help: consider borrowing here: `&f`
| ---------- ^
| | |
| | expected an implementor of trait `SomeTrait`
| | help: consider borrowing here: `&f`
| required by a bound introduced by this call
|
note: required by `Other::<'a, G>::new`
--> $DIR/issue-84973.rs:27:5

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satis
--> $DIR/mut-borrow-needed-by-trait.rs:17:29
|
LL | let fp = BufWriter::new(fp);
| ^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
| -------------- ^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write`
| |
| required by a bound introduced by this call
|
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
note: required by `BufWriter::<W>::new`

View File

@ -2,7 +2,9 @@ error[E0277]: `impl Sync` cannot be sent between threads safely
--> $DIR/restrict-type-argument.rs:4:13
|
LL | is_send(val);
| ^^^ `impl Sync` cannot be sent between threads safely
| ------- ^^^ `impl Sync` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15
@ -18,7 +20,9 @@ error[E0277]: `S` cannot be sent between threads safely
--> $DIR/restrict-type-argument.rs:8:13
|
LL | is_send(val);
| ^^^ `S` cannot be sent between threads safely
| ------- ^^^ `S` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15
@ -34,7 +38,9 @@ error[E0277]: `S` cannot be sent between threads safely
--> $DIR/restrict-type-argument.rs:12:13
|
LL | is_send(val);
| ^^^ `S` cannot be sent between threads safely
| ------- ^^^ `S` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15
@ -50,7 +56,9 @@ error[E0277]: `S` cannot be sent between threads safely
--> $DIR/restrict-type-argument.rs:20:13
|
LL | is_send(val);
| ^^^ `S` cannot be sent between threads safely
| ------- ^^^ `S` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15
@ -66,7 +74,9 @@ error[E0277]: `S` cannot be sent between threads safely
--> $DIR/restrict-type-argument.rs:24:13
|
LL | is_send(val);
| ^^^ `S` cannot be sent between threads safely
| ------- ^^^ `S` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15
@ -82,7 +92,9 @@ error[E0277]: `S` cannot be sent between threads safely
--> $DIR/restrict-type-argument.rs:28:13
|
LL | is_send(val);
| ^^^ `S` cannot be sent between threads safely
| ------- ^^^ `S` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `&T: std::io::Read` is not satisfied
--> $DIR/suggest-change-mut.rs:12:48
|
LL | let mut stream_reader = BufReader::new(&stream);
| ^^^^^^^ the trait `std::io::Read` is not implemented for `&T`
| -------------- ^^^^^^^ the trait `std::io::Read` is not implemented for `&T`
| |
| required by a bound introduced by this call
|
note: required by `BufReader::<R>::new`
--> $SRC_DIR/std/src/io/buffered/bufreader.rs:LL:COL

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied
--> $DIR/same-crate-name.rs:31:20
|
LL | a::try_foo(foo);
| ^^^ the trait `main::a::Bar` is not implemented for `Foo`
| ---------- ^^^ the trait `main::a::Bar` is not implemented for `Foo`
| |
| required by a bound introduced by this call
|
help: trait impl with same name found
--> $DIR/auxiliary/crate_a2.rs:5:1
@ -20,7 +22,9 @@ error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satis
--> $DIR/same-crate-name.rs:38:20
|
LL | a::try_foo(implements_no_traits);
| ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait`
| ---------- ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait`
| |
| required by a bound introduced by this call
|
note: required by a bound in `try_foo`
--> $DIR/auxiliary/crate_a1.rs:3:24
@ -32,7 +36,9 @@ error[E0277]: the trait bound `ImplementsWrongTraitConditionally<isize>: main::a
--> $DIR/same-crate-name.rs:45:20
|
LL | a::try_foo(other_variant_implements_mismatched_trait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally<isize>`
| ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally<isize>`
| |
| required by a bound introduced by this call
|
help: trait impl with same name found
--> $DIR/auxiliary/crate_a2.rs:13:1
@ -50,7 +56,9 @@ error[E0277]: the trait bound `ImplementsTraitForUsize<isize>: main::a::Bar` is
--> $DIR/same-crate-name.rs:51:20
|
LL | a::try_foo(other_variant_implements_correct_trait);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize<isize>`
| ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize<isize>`
| |
| required by a bound introduced by this call
|
= help: the following implementations were found:
<ImplementsTraitForUsize<usize> as main::a::Bar>

View File

@ -10,7 +10,9 @@ error[E0277]: the trait bound `NoClone: Copy` is not satisfied
--> $DIR/supertrait-auto-trait.rs:16:23
|
LL | let (a, b) = copy(NoClone);
| ^^^^^^^ the trait `Copy` is not implemented for `NoClone`
| ---- ^^^^^^^ the trait `Copy` is not implemented for `NoClone`
| |
| required by a bound introduced by this call
|
= note: required because of the requirements on the impl of `Magic` for `NoClone`
note: required by a bound in `copy`

View File

@ -5,7 +5,10 @@ LL | #[derive(Clone)]
| ----- in this derive macro expansion
LL | struct FooHolster {
LL | the_foos: Vec<Foo>,
| ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Clone`
| ^^^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Clone`
| required by a bound introduced by this call
|
= note: required because of the requirements on the impl of `Clone` for `Vec<Foo>`
note: required by `clone`

View File

@ -2,7 +2,9 @@ error[E0277]: `dummy::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:23:11
|
LL | Outer(TestType);
| ^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
| ----- ^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `dummy::TestType`
note: required by `Outer`
@ -28,7 +30,9 @@ error[E0277]: `dummy1b::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:32:13
|
LL | is_send(TestType);
| ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely
| ------- ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `dummy1b::TestType`
note: required by a bound in `is_send`
@ -41,7 +45,9 @@ error[E0277]: `dummy1c::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:40:13
|
LL | is_send((8, TestType));
| ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely
| ------- ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `dummy1c::TestType`
= note: required because it appears within the type `({integer}, dummy1c::TestType)`
@ -55,10 +61,11 @@ error[E0277]: `dummy2::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:48:13
|
LL | is_send(Box::new(TestType));
| ^^^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Send`
| help: consider borrowing here: `&Box::new(TestType)`
| ------- ^^^^^^^^^^^^^^^^^^
| | |
| | expected an implementor of trait `Send`
| | help: consider borrowing here: `&Box::new(TestType)`
| required by a bound introduced by this call
|
= note: the trait bound `dummy2::TestType: Send` is not satisfied
= note: required because of the requirements on the impl of `Send` for `Unique<dummy2::TestType>`
@ -73,7 +80,9 @@ error[E0277]: `dummy3::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:56:13
|
LL | is_send(Box::new(Outer2(TestType)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely
| ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Send` is not implemented for `dummy3::TestType`
note: required because it appears within the type `Outer2<dummy3::TestType>`
@ -93,10 +102,11 @@ error[E0277]: `main::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:66:13
|
LL | is_sync(Outer2(TestType));
| ^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Sync`
| help: consider borrowing here: `&Outer2(TestType)`
| ------- ^^^^^^^^^^^^^^^^
| | |
| | expected an implementor of trait `Sync`
| | help: consider borrowing here: `&Outer2(TestType)`
| required by a bound introduced by this call
|
= note: the trait bound `main::TestType: Sync` is not satisfied
note: required because of the requirements on the impl of `Sync` for `Outer2<main::TestType>`

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `(): MyTrait` is not satisfied
--> $DIR/no-use.rs:10:26
|
LL | <() as MyTrait>::foo(&());
| ^^^ the trait `MyTrait` is not implemented for `()`
| -------------------- ^^^ the trait `MyTrait` is not implemented for `()`
| |
| required by a bound introduced by this call
|
= help: the following implementations were found:
<() as MyTrait>

View File

@ -2,10 +2,11 @@ error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied
--> $DIR/issue-39029.rs:16:37
|
LL | let _errors = TcpListener::bind(&bad);
| ^^^^
| |
| the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs`
| help: consider adding dereference here: `&*bad`
| ----------------- ^^^^
| | |
| | the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs`
| | help: consider adding dereference here: `&*bad`
| required by a bound introduced by this call
|
= note: required because of the requirements on the impl of `ToSocketAddrs` for `&NoToSocketAddrs`
note: required by a bound in `TcpListener::bind`

View File

@ -2,10 +2,11 @@ error[E0277]: the trait bound `&String: SomeTrait` is not satisfied
--> $DIR/issue-62530.rs:13:26
|
LL | takes_type_parameter(&string); // Error
| ^^^^^^^
| |
| the trait `SomeTrait` is not implemented for `&String`
| help: consider adding dereference here: `&*string`
| -------------------- ^^^^^^^
| | |
| | the trait `SomeTrait` is not implemented for `&String`
| | help: consider adding dereference here: `&*string`
| required by a bound introduced by this call
|
note: required by a bound in `takes_type_parameter`
--> $DIR/issue-62530.rs:4:44

View File

@ -2,10 +2,11 @@ error[E0277]: the trait bound `&Baz: Happy` is not satisfied
--> $DIR/multiple-0.rs:34:9
|
LL | foo(&baz);
| ^^^^
| |
| the trait `Happy` is not implemented for `&Baz`
| help: consider adding dereference here: `&***baz`
| --- ^^^^
| | |
| | the trait `Happy` is not implemented for `&Baz`
| | help: consider adding dereference here: `&***baz`
| required by a bound introduced by this call
|
note: required by a bound in `foo`
--> $DIR/multiple-0.rs:30:26

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `&mut Baz: Happy` is not satisfied
--> $DIR/multiple-1.rs:52:9
|
LL | foo(&mut baz);
| ^^^^^^^^ the trait `Happy` is not implemented for `&mut Baz`
| --- ^^^^^^^^ the trait `Happy` is not implemented for `&mut Baz`
| |
| required by a bound introduced by this call
|
note: required by a bound in `foo`
--> $DIR/multiple-1.rs:45:26

View File

@ -24,7 +24,9 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/trivial-bounds-leak.rs:25:15
|
LL | Foo::test(&4i32);
| ^^^^^ the trait `Foo` is not implemented for `i32`
| --------- ^^^^^ the trait `Foo` is not implemented for `i32`
| |
| required by a bound introduced by this call
|
note: required by `Foo::test`
--> $DIR/trivial-bounds-leak.rs:5:5
@ -36,7 +38,9 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/trivial-bounds-leak.rs:26:22
|
LL | generic_function(5i32);
| ^^^^ the trait `Foo` is not implemented for `i32`
| ---------------- ^^^^ the trait `Foo` is not implemented for `i32`
| |
| required by a bound introduced by this call
|
note: required by a bound in `generic_function`
--> $DIR/trivial-bounds-leak.rs:29:24

View File

@ -2,7 +2,9 @@ error[E0277]: `UnsafeCell<MySync<{integer}>>` cannot be shared between threads s
--> $DIR/typeck-unsafe-always-share.rs:19:10
|
LL | test(us);
| ^^ `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
| ---- ^^ `UnsafeCell<MySync<{integer}>>` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Sync` is not implemented for `UnsafeCell<MySync<{integer}>>`
note: required by a bound in `test`
@ -15,7 +17,9 @@ error[E0277]: `UnsafeCell<NoSync>` cannot be shared between threads safely
--> $DIR/typeck-unsafe-always-share.rs:23:10
|
LL | test(uns);
| ^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
| ---- ^^^ `UnsafeCell<NoSync>` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Sync` is not implemented for `UnsafeCell<NoSync>`
note: required by a bound in `test`
@ -46,7 +50,9 @@ error[E0277]: `NoSync` cannot be shared between threads safely
--> $DIR/typeck-unsafe-always-share.rs:30:10
|
LL | test(NoSync);
| ^^^^^^ `NoSync` cannot be shared between threads safely
| ---- ^^^^^^ `NoSync` cannot be shared between threads safely
| |
| required by a bound introduced by this call
|
= help: the trait `Sync` is not implemented for `NoSync`
note: required by a bound in `test`

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `Fn<(isize,)>` closure, found `S`
--> $DIR/unboxed-closures-fnmut-as-fn.rs:28:21
|
LL | let x = call_it(&S, 22);
| ^^ expected an `Fn<(isize,)>` closure, found `S`
| ------- ^^ expected an `Fn<(isize,)>` closure, found `S`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<(isize,)>` is not implemented for `S`
note: required by a bound in `call_it`

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r i
--> $DIR/unboxed-closures-unsafe-extern-fn.rs:20:21
|
LL | let x = call_it(&square, 22);
| ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
| ------- ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> Fn<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
note: required by a bound in `call_it`
@ -15,7 +17,9 @@ error[E0277]: expected a `FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'
--> $DIR/unboxed-closures-unsafe-extern-fn.rs:25:25
|
LL | let y = call_it_mut(&mut square, 22);
| ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
| ----------- ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> FnMut<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
note: required by a bound in `call_it_mut`
@ -28,7 +32,9 @@ error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&
--> $DIR/unboxed-closures-unsafe-extern-fn.rs:30:26
|
LL | let z = call_it_once(square, 22);
| ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
| ------------ ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> FnOnce<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}`
note: required by a bound in `call_it_once`

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `Fn<(&isize,)>` closure, found `for<'r> extern "C" fn(&
--> $DIR/unboxed-closures-wrong-abi.rs:20:21
|
LL | let x = call_it(&square, 22);
| ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}`
| ------- ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> Fn<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}`
note: required by a bound in `call_it`
@ -15,7 +17,9 @@ error[E0277]: expected a `FnMut<(&isize,)>` closure, found `for<'r> extern "C" f
--> $DIR/unboxed-closures-wrong-abi.rs:25:25
|
LL | let y = call_it_mut(&mut square, 22);
| ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}`
| ----------- ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> FnMut<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}`
note: required by a bound in `call_it_mut`
@ -28,7 +32,9 @@ error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `for<'r> extern "C"
--> $DIR/unboxed-closures-wrong-abi.rs:30:26
|
LL | let z = call_it_once(square, 22);
| ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}`
| ------------ ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> FnOnce<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}`
note: required by a bound in `call_it_once`

View File

@ -2,7 +2,9 @@ error[E0277]: expected a `Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isi
--> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:21:21
|
LL | let x = call_it(&square, 22);
| ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
| ------- ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> Fn<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}`
note: required by a bound in `call_it`
@ -15,7 +17,9 @@ error[E0277]: expected a `FnMut<(&isize,)>` closure, found `unsafe fn(isize) ->
--> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:26:25
|
LL | let y = call_it_mut(&mut square, 22);
| ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
| ----------- ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> FnMut<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}`
note: required by a bound in `call_it_mut`
@ -28,7 +32,9 @@ error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) ->
--> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:31:26
|
LL | let z = call_it_once(square, 22);
| ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
| ------------ ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'r> FnOnce<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}`
note: required by a bound in `call_it_once`

View File

@ -12,7 +12,9 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
--> $DIR/unsized-exprs.rs:24:22
|
LL | udrop::<A<[u8]>>(A { 0: *foo() });
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| ---------------- ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
= help: the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `A<[u8]>`

View File

@ -4,7 +4,9 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim
LL | fn f1<X: ?Sized>(x: &X) {
| - this type parameter needs to be `std::marker::Sized`
LL | f2::<X>(x);
| ^ doesn't have a size known at compile-time
| ------- ^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
note: required by a bound in `f2`
--> $DIR/unsized3.rs:10:7
@ -27,7 +29,9 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim
LL | fn f3<X: ?Sized + T>(x: &X) {
| - this type parameter needs to be `std::marker::Sized`
LL | f4::<X>(x);
| ^ doesn't have a size known at compile-time
| ------- ^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
note: required by a bound in `f4`
--> $DIR/unsized3.rs:21:7
@ -50,7 +54,9 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim
LL | fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
| - this type parameter needs to be `std::marker::Sized`
LL | f5(x1);
| ^^ doesn't have a size known at compile-time
| -- ^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
note: required because it appears within the type `S<X>`
--> $DIR/unsized3.rs:28:8
@ -78,7 +84,9 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim
LL | fn f9<X: ?Sized>(x1: Box<S<X>>) {
| - this type parameter needs to be `std::marker::Sized`
LL | f5(&(*x1, 34));
| ^^^^^^^^^^ doesn't have a size known at compile-time
| -- ^^^^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
note: required because it appears within the type `S<X>`
--> $DIR/unsized3.rs:28:8
@ -98,7 +106,9 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim
LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
| - this type parameter needs to be `std::marker::Sized`
LL | f5(&(32, *x1));
| ^^^^^^^^^^ doesn't have a size known at compile-time
| -- ^^^^^^^^^^ doesn't have a size known at compile-time
| |
| required by a bound introduced by this call
|
note: required because it appears within the type `S<X>`
--> $DIR/unsized3.rs:28:8

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `{integer}: TraitA` is not satisfied
--> $DIR/vtable-res-trait-param.rs:17:18
|
LL | b.gimme_an_a(y)
| ^ the trait `TraitA` is not implemented for `{integer}`
| ---------- ^ the trait `TraitA` is not implemented for `{integer}`
| |
| required by a bound introduced by this call
error: aborting due to previous error

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/where-clause-constraints-are-local-for-inherent-impl.rs:13:22
|
LL | require_copy(self.x);
| ^^^^^^ the trait `Copy` is not implemented for `T`
| ------------ ^^^^^^ the trait `Copy` is not implemented for `T`
| |
| required by a bound introduced by this call
|
note: required by a bound in `require_copy`
--> $DIR/where-clause-constraints-are-local-for-inherent-impl.rs:1:20

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/where-clause-constraints-are-local-for-trait-impl.rs:18:22
|
LL | require_copy(self.x);
| ^^^^^^ the trait `Copy` is not implemented for `T`
| ------------ ^^^^^^ the trait `Copy` is not implemented for `T`
| |
| required by a bound introduced by this call
|
note: required by a bound in `require_copy`
--> $DIR/where-clause-constraints-are-local-for-trait-impl.rs:1:20

View File

@ -2,7 +2,9 @@ error[E0277]: the trait bound `Bar: Eq` is not satisfied
--> $DIR/where-clauses-method-unsatisfied.rs:18:14
|
LL | x.equals(&x);
| ^^ the trait `Eq` is not implemented for `Bar`
| ------ ^^ the trait `Eq` is not implemented for `Bar`
| |
| required by a bound introduced by this call
error: aborting due to previous error