Rollup merge of #120469 - estebank:issue-40120, r=TaKO8Ki

Provide more context on derived obligation error primary label

Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote:

```
error[E0277]: the trait bound `i32: Bar` is not satisfied
 --> f100.rs:6:6
  |
6 |     <i32 as Foo>::foo();
  |      ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo`
  |
help: this trait has no implementations, consider adding one
 --> f100.rs:2:1
  |
2 | trait Bar {}
  | ^^^^^^^^^
note: required for `i32` to implement `Foo`
 --> f100.rs:3:14
  |
3 | impl<T: Bar> Foo for T {}
  |         ---  ^^^     ^
  |         |
  |         unsatisfied trait bound introduced here
```

Fix #40120.
This commit is contained in:
Nadrieril 2024-01-31 12:10:51 +01:00 committed by GitHub
commit 0313eb2182
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
196 changed files with 382 additions and 373 deletions

View File

@ -1432,20 +1432,18 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
) -> bool {
let span = obligation.cause.span;
let code = if let ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } =
obligation.cause.code()
{
parent_code
} else if let ObligationCauseCode::ItemObligation(_)
| ObligationCauseCode::ExprItemObligation(..) = obligation.cause.code()
{
obligation.cause.code()
} else if let ExpnKind::Desugaring(DesugaringKind::ForLoop) =
span.ctxt().outer_expn_data().kind
{
obligation.cause.code()
} else {
return false;
let code = match obligation.cause.code() {
ObligationCauseCode::FunctionArgumentObligation { parent_code, .. } => parent_code,
c @ ObligationCauseCode::ItemObligation(_)
| c @ ObligationCauseCode::ExprItemObligation(..) => c,
c if matches!(
span.ctxt().outer_expn_data().kind,
ExpnKind::Desugaring(DesugaringKind::ForLoop)
) =>
{
c
}
_ => return false,
};
// List of traits for which it would be nonsensical to suggest borrowing.
@ -4978,16 +4976,27 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>(
_ => None,
};
let pred = obligation.predicate;
let (_, base) = obligation.cause.code().peel_derives_with_predicate();
let post = if let ty::PredicateKind::Clause(clause) = pred.kind().skip_binder()
&& let ty::ClauseKind::Trait(pred) = clause
&& let Some(base) = base
&& base.skip_binder() != pred
{
format!(", which is required by `{base}`")
} else {
String::new()
};
match ty_desc {
Some(desc) => format!(
"{}the trait `{}` is not implemented for {} `{}`",
"{}the trait `{}` is not implemented for {} `{}`{post}",
pre_message,
trait_predicate.print_modifiers_and_trait_path(),
desc,
tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None),
),
None => format!(
"{}the trait `{}` is not implemented for `{}`",
"{}the trait `{}` is not implemented for `{}`{post}",
pre_message,
trait_predicate.print_modifiers_and_trait_path(),
tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None),

View File

@ -13,7 +13,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
LL | fn new(slice: &[u8; Self::SIZE]) -> Self {
| ^^^^ doesn't have a size known at compile-time
|
= help: within `Bar<[u8]>`, the trait `Sized` is not implemented for `[u8]`
= help: within `Bar<[u8]>`, the trait `Sized` is not implemented for `[u8]`, which is required by `Bar<[u8]>: Sized`
note: required because it appears within the type `Bar<[u8]>`
--> $DIR/issue-58022.rs:8:12
|

View File

@ -13,7 +13,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo::<T>());
| ^^^^^^^^^^ future returned by `foo` is not `Send`
|
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`, which is required by `impl Future<Output = Result<(), ()>>: Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/basic.rs:13:5
|

View File

@ -39,7 +39,7 @@ error[E0277]: the trait bound `T: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:28:23
|
LL | type Bar: Clone = Vec<T>;
| ^^^^^^ the trait `Clone` is not implemented for `T`
| ^^^^^^ the trait `Clone` is not implemented for `T`, which is required by `Vec<T>: Clone`
|
= note: required for `Vec<T>` to implement `Clone`
note: required by a bound in `Foo::Bar`
@ -88,7 +88,7 @@ error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:65:23
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`, which is required by `Vec<<Self as Foo2<T>>::Baz>: Clone`
|
= note: required for `Vec<<Self as Foo2<T>>::Baz>` to implement `Clone`
note: required by a bound in `Foo2::Bar`
@ -105,7 +105,7 @@ error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:74:23
|
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`, which is required by `Vec<<Self as Foo25<T>>::Baz>: Clone`
|
= note: required for `Vec<<Self as Foo25<T>>::Baz>` to implement `Clone`
note: required by a bound in `Foo25::Bar`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-1.rs:12:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <i32 as X<'b>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-1.rs:14:14
|
LL | type V = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <u8 as Y<'b, u8>>::V: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Y`

View File

@ -18,7 +18,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-2.rs:15:14
|
LL | type W = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <u16 as Z<'b, u16>>::W: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `Z`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-3.rs:13:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <(T,) as X<'b, (T,)>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-4.rs:13:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <(T,) as X<'b, T>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:26:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Vec<T> as Cycle>::Next as X<'b, <Vec<T> as Cycle>::Next>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`
@ -18,7 +18,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
--> $DIR/hr-associated-type-bound-param-5.rs:31:14
|
LL | type U = str;
| ^^^ the trait `Clone` is not implemented for `str`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Box<T> as Cycle>::Next as X<'b, <Box<T> as Cycle>::Next>>::U: Clone`
|
= help: the trait `Clone` is implemented for `String`
note: required by a bound in `X`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:17
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -21,7 +21,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:38:1
|
LL | pub enum ColumnInsertValue<Col, Expr> where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -45,7 +45,7 @@ LL | | Col: Column,
... |
LL | | Default(Col),
LL | | }
| |_^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| |_^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -63,7 +63,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -82,7 +82,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -102,7 +102,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -117,7 +117,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -133,7 +133,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:17
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -153,7 +153,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -172,7 +172,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -192,7 +192,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -207,7 +207,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -223,7 +223,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -239,7 +239,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:10
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -255,7 +255,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18
@ -271,7 +271,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
--> $DIR/issue-38821.rs:23:23
|
LL | #[derive(Debug, Copy, Clone)]
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
|
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
--> $DIR/issue-38821.rs:9:18

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/issue-43784-associated-type.rs:14:18
|
LL | type Assoc = T;
| ^ the trait `Copy` is not implemented for `T`
| ^ the trait `Copy` is not implemented for `T`, which is required by `<T as Complete>::Assoc: Partial<T>`
|
note: required for `<T as Complete>::Assoc` to implement `Partial<T>`
--> $DIR/issue-43784-associated-type.rs:1:11

View File

@ -15,7 +15,7 @@ error[E0277]: the trait bound `T: MyDisplay` is not satisfied
--> $DIR/issue-65774-1.rs:44:76
|
LL | let closure = |config: &mut <S as MPU>::MpuConfig| writer.my_write(&config);
| ^^^^^^^ the trait `MyDisplay` is not implemented for `T`
| ^^^^^^^ the trait `MyDisplay` is not implemented for `T`, which is required by `&mut T: MyDisplay`
|
= help: the trait `MyDisplay` is implemented for `&'a mut T`
note: required for `&mut T` to implement `MyDisplay`

View File

@ -76,7 +76,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
LL | <str as Foo<u8>>::bar;
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= help: the trait `Sized` is not implemented for `str`, which is required by `str: Foo<'_, '_, u8>`
note: required for `str` to implement `Foo<'_, '_, u8>`
--> $DIR/substs-ppaux.rs:11:17
|

View File

@ -76,7 +76,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
LL | <str as Foo<u8>>::bar;
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= help: the trait `Sized` is not implemented for `str`, which is required by `str: Foo<'?0, '?1, u8>`
note: required for `str` to implement `Foo<'?0, '?1, u8>`
--> $DIR/substs-ppaux.rs:11:17
|

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo(Some(true)));
| ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:8:15
|
@ -29,7 +29,7 @@ LL | is_send(foo2(Some(true)));
| |
| required by a bound introduced by this call
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: required because it's used within this `async` fn body
--> $DIR/async-await-let-else.rs:24:29
|
@ -61,7 +61,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo3(Some(true)));
| ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:30:29
|
@ -81,7 +81,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo4(Some(true)));
| ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:38:15
|

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_send(non_send_temporary_in_match());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:33:26
|
@ -24,7 +24,7 @@ error: future cannot be sent between threads safely
LL | assert_send(non_sync_with_method_call());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:46:15
|

View File

@ -15,7 +15,7 @@ LL | || });
| |_____|
| within this `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}`
|
= help: within `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>`
= help: within `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>`, which is required by `{async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6}: UnwindSafe`
= note: `UnwindSafe` is implemented for `&Context<'_>`, but not for `&mut Context<'_>`
note: future does not implement `UnwindSafe` as this value is used across an await
--> $DIR/async-is-unwindsafe.rs:25:18

View File

@ -7,7 +7,7 @@ LL | [0usize; 0xffff_ffff_ffff_ffff].await;
| |`[usize; usize::MAX]` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `[usize; usize::MAX]`
= help: the trait `Future` is not implemented for `[usize; usize::MAX]`, which is required by `[usize; usize::MAX]: IntoFuture`
= note: [usize; usize::MAX] must be a future or must implement `IntoFuture` to be awaited
= note: required for `[usize; usize::MAX]` to implement `IntoFuture`

View File

@ -15,7 +15,7 @@ LL | None { value: (), ..Default::default() }.await;
| |`Option<_>` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `Option<_>`
= help: the trait `Future` is not implemented for `Option<_>`, which is required by `Option<_>: IntoFuture`
= note: Option<_> must be a future or must implement `IntoFuture` to be awaited
= note: required for `Option<_>` to implement `IntoFuture`

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/drop-track-field-assign-nonsend.rs:20:39
|

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/field-assign-nonsend.rs:20:39
|

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | assert_is_send(test::<T>());
| ^^^^^^^^^^^ future returned by `test` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/missing-send-bound.rs:9:5
|

View File

@ -7,7 +7,7 @@ LL | .await
| |`()` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`

View File

@ -4,7 +4,7 @@ error: future cannot be shared between threads safely
LL | is_sync(bar());
| ^^^^^ future returned by `bar` is not `Sync`
|
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`, which is required by `impl Future<Output = ()>: Sync`
note: future is not `Sync` as this value is used across an await
--> $DIR/issue-64130-1-sync.rs:15:11
|

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | is_send(bar());
| ^^^^^ future returned by `bar` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Foo`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Foo`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-64130-2-send.rs:15:11
|

View File

@ -5,7 +5,7 @@ LL | async fn bar() {
| -------------- within this `impl Future<Output = ()>`
...
LL | is_qux(bar());
| ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`
| ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`, which is required by `impl Future<Output = ()>: Qux`
|
note: future does not implement `Qux` as this value is used across an await
--> $DIR/issue-64130-3-other.rs:18:11

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | is_send(foo());
| ^^^^^ future returned by `foo` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-64130-non-send-future-diags.rs:17:11
|

View File

@ -8,7 +8,7 @@ LL | | let _a = a;
LL | | });
| |______^ future created by async block is not `Send`
|
= help: within `{async block@$DIR/issue-67252-unnamed-future.rs:18:11: 22:6}`, the trait `Send` is not implemented for `*mut ()`
= help: within `{async block@$DIR/issue-67252-unnamed-future.rs:18:11: 22:6}`, the trait `Send` is not implemented for `*mut ()`, which is required by `{async block@$DIR/issue-67252-unnamed-future.rs:18:11: 22:6}: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-67252-unnamed-future.rs:20:17
|

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | require_send(send_fut);
| ^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{async block@$DIR/issue-68112.rs:29:20: 33:6}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/issue-68112.rs:31:17
@ -23,7 +23,7 @@ error: future cannot be sent between threads safely
LL | require_send(send_fut);
| ^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{async block@$DIR/issue-68112.rs:39:20: 42:6}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/issue-68112.rs:40:17
@ -42,7 +42,7 @@ error[E0277]: `RefCell<i32>` cannot be shared between threads safely
LL | require_send(send_fut);
| ^^^^^^^^^^^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{async block@$DIR/issue-68112.rs:57:20: 61:6}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
= note: required for `Arc<RefCell<i32>>` to implement `Send`
note: required because it's used within this `async` fn body

View File

@ -4,7 +4,7 @@ error[E0277]: `*mut ()` cannot be shared between threads safely
LL | fn foo(x: NotSync) -> impl Future + Send {
| ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
|
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`, which is required by `{async block@$DIR/issue-70935-complex-spans.rs:17:5: 21:6}: Send`
note: required because it appears within the type `PhantomData<*mut ()>`
--> $SRC_DIR/core/src/marker.rs:LL:COL
note: required because it appears within the type `NotSync`

View File

@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
LL | fake_spawn(wrong_mutex());
| ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
--> $DIR/issue-71137.rs:14:26
|

View File

@ -16,7 +16,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
LL | async fn frob(self) {}
| ^^^^ doesn't have a size known at compile-time
|
= help: within `Foo`, the trait `Sized` is not implemented for `str`
= help: within `Foo`, the trait `Sized` is not implemented for `str`, which is required by `Foo: Sized`
note: required because it appears within the type `Foo`
--> $DIR/issue-72590-type-error-sized.rs:5:8
|

View File

@ -11,7 +11,7 @@ LL | g(issue_67893::run())
LL | pub async fn run() {
| ------------------ within this `impl Future<Output = ()>`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`, which is required by `impl Future<Output = ()>: Send`
= note: required because it captures the following types: `Arc<Mutex<()>>`, `MutexGuard<'_, ()>`, `impl Future<Output = ()>`
note: required because it's used within this `async` fn body
--> $DIR/auxiliary/issue_67893.rs:9:20

View File

@ -9,7 +9,7 @@ LL | gimme_send(foo());
LL | async fn foo() {
| -------------- within this `impl Future<Output = ()>`
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`, which is required by `impl Future<Output = ()>: Send`
= note: required because it appears within the type `(NotSend,)`
= note: required because it captures the following types: `(NotSend,)`, `impl Future<Output = ()>`
note: required because it's used within this `async` fn body

View File

@ -2,7 +2,7 @@ error[E0277]: `PhantomPinned` cannot be unpinned
--> $DIR/pin-needed-to-poll-2.rs:43:18
|
LL | Pin::new(&mut self.sleep).poll(cx)
| -------- ^^^^^^^^^^^^^^^ within `Sleep`, the trait `Unpin` is not implemented for `PhantomPinned`
| -------- ^^^^^^^^^^^^^^^ within `Sleep`, the trait `Unpin` is not implemented for `PhantomPinned`, which is required by `Sleep: Unpin`
| |
| required by a bound introduced by this call
|

View File

@ -6,7 +6,7 @@ LL | boo().await;
| |
| this call returns `()`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
help: remove the `.await`
@ -28,7 +28,7 @@ LL | e!().await;
| |`()` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
@ -44,7 +44,7 @@ LL | $expr.await
LL | f!(());
| ------ in this macro invocation
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
= note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
@ -58,7 +58,7 @@ LL | for x in [] {}.await
| |`()` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `()`
= help: the trait `Future` is not implemented for `()`, which is required by `(): IntoFuture`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`

View File

@ -4,7 +4,7 @@ error[E0277]: `Foo<T, U>` cannot be sent between threads safely
LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i32) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<T, U>` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `Foo<T, U>`
= help: the trait `Send` is not implemented for `Foo<T, U>`, which is required by `Foo<T, U>: WithAssoc`
note: required for `Foo<T, U>` to implement `WithAssoc`
--> $DIR/issue-83857-ub.rs:15:15
|

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `[u8]: AutoTrait` is not satisfied in `str`
--> $DIR/str-contains-slice-conceptually.rs:11:22
|
LL | needs_auto_trait::<str>();
| ^^^ within `str`, the trait `AutoTrait` is not implemented for `[u8]`
| ^^^ within `str`, the trait `AutoTrait` is not implemented for `[u8]`, which is required by `str: AutoTrait`
|
= note: `str` is considered to contain a `[u8]` slice for auto trait purposes
note: required by a bound in `needs_auto_trait`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied in `(MyS2, MyS)`
--> $DIR/typeck-default-trait-impl-constituent-types-2.rs:17:18
|
LL | is_mytrait::<(MyS2, MyS)>();
| ^^^^^^^^^^^ within `(MyS2, MyS)`, the trait `MyTrait` is not implemented for `MyS2`
| ^^^^^^^^^^^ within `(MyS2, MyS)`, the trait `MyTrait` is not implemented for `MyS2`, which is required by `(MyS2, MyS): MyTrait`
|
= note: required because it appears within the type `(MyS2, MyS)`
note: required by a bound in `is_mytrait`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `u32: Signed` is not satisfied
--> $DIR/typeck-default-trait-impl-precedence.rs:19:20
|
LL | is_defaulted::<&'static u32>();
| ^^^^^^^^^^^^ the trait `Signed` is not implemented for `u32`
| ^^^^^^^^^^^^ the trait `Signed` is not implemented for `u32`, which is required by `&'static u32: Defaulted`
|
note: required for `&'static u32` to implement `Defaulted`
--> $DIR/typeck-default-trait-impl-precedence.rs:10:19

View File

@ -27,7 +27,7 @@ error[E0277]: can't compare `&{integer}` with `{integer}`
LL | _ = foo == &0;
| ^^ no implementation for `&{integer} == {integer}`
|
= help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`
= help: the trait `PartialEq<{integer}>` is not implemented for `&{integer}`, which is required by `&&{integer}: PartialEq<&{integer}>`
= note: required for `&&{integer}` to implement `PartialEq<&{integer}>`
help: consider dereferencing here
|
@ -65,7 +65,7 @@ error[E0277]: can't compare `&&{integer}` with `{integer}`
LL | _ = &&foo == &&0;
| ^^ no implementation for `&&{integer} == {integer}`
|
= help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`
= help: the trait `PartialEq<{integer}>` is not implemented for `&&{integer}`, which is required by `&&&&{integer}: PartialEq<&&{integer}>`
= note: required for `&&&{integer}` to implement `PartialEq<&{integer}>`
= note: 1 redundant requirement hidden
= note: required for `&&&&{integer}` to implement `PartialEq<&&{integer}>`
@ -119,7 +119,7 @@ error[E0277]: can't compare `{integer}` with `&{integer}`
LL | _ = &0 == foo;
| ^^ no implementation for `{integer} == &{integer}`
|
= help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`
= help: the trait `PartialEq<&{integer}>` is not implemented for `{integer}`, which is required by `&{integer}: PartialEq<&&{integer}>`
= note: required for `&{integer}` to implement `PartialEq<&&{integer}>`
help: consider dereferencing here
|
@ -157,7 +157,7 @@ error[E0277]: can't compare `{integer}` with `&&{integer}`
LL | _ = &&0 == &&foo;
| ^^ no implementation for `{integer} == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `{integer}`, which is required by `&&{integer}: PartialEq<&&&&{integer}>`
= note: required for `&{integer}` to implement `PartialEq<&&&{integer}>`
= note: 1 redundant requirement hidden
= note: required for `&&{integer}` to implement `PartialEq<&&&&{integer}>`
@ -173,7 +173,7 @@ error[E0277]: can't compare `Box<Box<{integer}>>` with `&&{integer}`
LL | _ = &Box::new(Box::new(42)) == &foo;
| ^^ no implementation for `Box<Box<{integer}>> == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<{integer}>>`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<{integer}>>`, which is required by `&Box<Box<{integer}>>: PartialEq<&&&{integer}>`
= note: required for `&Box<Box<{integer}>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
|
@ -187,7 +187,7 @@ error[E0277]: can't compare `Box<{integer}>` with `&&{integer}`
LL | _ = &Box::new(42) == &foo;
| ^^ no implementation for `Box<{integer}> == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<{integer}>`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<{integer}>`, which is required by `&Box<{integer}>: PartialEq<&&&{integer}>`
= note: required for `&Box<{integer}>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
|
@ -201,7 +201,7 @@ error[E0277]: can't compare `Box<Box<Box<Box<{integer}>>>>` with `&&{integer}`
LL | _ = &Box::new(Box::new(Box::new(Box::new(42)))) == &foo;
| ^^ no implementation for `Box<Box<Box<Box<{integer}>>>> == &&{integer}`
|
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<Box<Box<{integer}>>>>`
= help: the trait `PartialEq<&&{integer}>` is not implemented for `Box<Box<Box<Box<{integer}>>>>`, which is required by `&Box<Box<Box<Box<{integer}>>>>: PartialEq<&&&{integer}>`
= note: required for `&Box<Box<Box<Box<{integer}>>>>` to implement `PartialEq<&&&{integer}>`
help: consider dereferencing both sides of the expression
|
@ -215,7 +215,7 @@ error[E0277]: can't compare `&&{integer}` with `Box<Box<Box<Box<{integer}>>>>`
LL | _ = &foo == &Box::new(Box::new(Box::new(Box::new(42))));
| ^^ no implementation for `&&{integer} == Box<Box<Box<Box<{integer}>>>>`
|
= help: the trait `PartialEq<Box<Box<Box<Box<{integer}>>>>>` is not implemented for `&&{integer}`
= help: the trait `PartialEq<Box<Box<Box<Box<{integer}>>>>>` is not implemented for `&&{integer}`, which is required by `&&&{integer}: PartialEq<&Box<Box<Box<Box<{integer}>>>>>`
= note: required for `&&&{integer}` to implement `PartialEq<&Box<Box<Box<Box<{integer}>>>>>`
help: consider dereferencing both sides of the expression
|

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `{integer}: Scalar` is not satisfied
--> $DIR/issue-22645.rs:15:5
|
LL | b + 3
| ^ the trait `Scalar` is not implemented for `{integer}`
| ^ the trait `Scalar` is not implemented for `{integer}`, which is required by `Bob: Add<_>`
|
= help: the trait `Scalar` is implemented for `f64`
note: required for `Bob` to implement `Add<{integer}>`

View File

@ -10,7 +10,7 @@ LL | |
LL | | });
| |_____^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
|
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`, which is required by `{closure@$DIR/closure-move-sync.rs:6:27: 6:29}: Send`
= note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send`
note: required because it's used within this closure
--> $DIR/closure-move-sync.rs:6:27

View File

@ -4,7 +4,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | a::foo::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -13,7 +13,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | a::bar::<fn() -> dyn A, _>();
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `a::bar`
--> $DIR/closure-return-type-must-be-sized.rs:14:19
@ -27,7 +27,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | a::baz::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -36,7 +36,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | b::foo::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -45,7 +45,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | b::bar::<fn() -> dyn A, _>();
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: Fn()`
= note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `b::bar`
--> $DIR/closure-return-type-must-be-sized.rs:28:19
@ -59,7 +59,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | b::baz::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -68,7 +68,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | c::foo::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error[E0277]: the size for values of type `dyn A` cannot be known at compilation time
@ -77,7 +77,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | c::bar::<fn() -> dyn A, _>();
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnMut()`
= note: required because it appears within the type `fn() -> dyn A`
note: required by a bound in `c::bar`
--> $DIR/closure-return-type-must-be-sized.rs:42:19
@ -91,7 +91,7 @@ error[E0277]: the size for values of type `dyn A` cannot be known at compilation
LL | c::baz::<fn() -> dyn A>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`
= help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A`, which is required by `fn() -> dyn A: FnOnce()`
= note: required because it appears within the type `fn() -> dyn A`
error: aborting due to 9 previous errors

View File

@ -2,7 +2,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_bad_empty_array.rs:10:13
|
LL | check::<[NotParam; 0]>();
| ^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `[NotParam; 0]: ConstParamTy`
|
= note: required for `[NotParam; 0]` to implement `ConstParamTy`
note: required by a bound in `check`

View File

@ -2,7 +2,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:10:13
|
LL | check::<&NotParam>();
| ^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `&NotParam: ConstParamTy`
|
= note: required for `&NotParam` to implement `ConstParamTy`
note: required by a bound in `check`
@ -15,7 +15,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:11:13
|
LL | check::<[NotParam]>();
| ^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `[NotParam]: ConstParamTy`
|
= note: required for `[NotParam]` to implement `ConstParamTy`
note: required by a bound in `check`
@ -28,7 +28,7 @@ error[E0277]: `NotParam` can't be used as a const parameter type
--> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:12:13
|
LL | check::<[NotParam; 17]>();
| ^^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
| ^^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`, which is required by `[NotParam; 17]: ConstParamTy`
|
= note: required for `[NotParam; 17]` to implement `ConstParamTy`
note: required by a bound in `check`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied
--> $DIR/issue-85848.rs:24:29
|
LL | writes_to_specific_path(&cap);
| ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`
| ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`, which is required by `&C: Delegates<()>`
| |
| required by a bound introduced by this call
|

View File

@ -26,7 +26,7 @@ error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:21:6
|
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`, which is required by `<u8 as Baz>::Quaks: Bar`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
@ -44,7 +44,7 @@ error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
--> $DIR/issue-67185-2.rs:21:6
|
LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`, which is required by `[<u8 as Baz>::Quaks; 2]: Bar`
|
= help: the following other types implement trait `Bar`:
[u16; 4]

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/fn-call-in-non-const.rs:14:32
|
LL | let _: [Option<Bar>; 2] = [no_copy(); 2];
| ^^^^^^^^^ the trait `Copy` is not implemented for `Bar`
| ^^^^^^^^^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/migrate-fail.rs:11:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
@ -18,7 +18,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/migrate-fail.rs:17:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/nll-fail.rs:11:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
@ -18,7 +18,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
--> $DIR/nll-fail.rs:17:38
|
LL | let arr: [Option<Bar>; 2] = [x; 2];
| ^ the trait `Copy` is not implemented for `Bar`
| ^ the trait `Copy` is not implemented for `Bar`, which is required by `Option<Bar>: Copy`
|
= note: required for `Option<Bar>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/trait-error.rs:5:6
|
LL | [Foo(String::new()); 4];
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`, which is required by `Foo<String>: Copy`
|
note: required for `Foo<String>` to implement `Copy`
--> $DIR/trait-error.rs:1:10

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/const-fn-in-vec.rs:1:47
|
LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5];
| ^^^^ the trait `Copy` is not implemented for `String`
| ^^^^ the trait `Copy` is not implemented for `String`, which is required by `Option<String>: Copy`
|
= note: required for `Option<String>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array
@ -31,7 +31,7 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
--> $DIR/const-fn-in-vec.rs:9:48
|
LL | let _maybe_strings: [Option<String>; 5] = [None; 5];
| ^^^^ the trait `Copy` is not implemented for `String`
| ^^^^ the trait `Copy` is not implemented for `String`, which is required by `Option<String>: Copy`
|
= note: required for `Option<String>` to implement `Copy`
= note: the `Copy` trait is required because this value will be copied for each element of the array

View File

@ -5,7 +5,7 @@ LL | let gen_clone_0 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
...
LL | check_copy(&gen_clone_0);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}: Copy`
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:40:14
@ -25,7 +25,7 @@ LL | let gen_clone_0 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
...
LL | check_copy(&gen_clone_0);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}: Copy`
|
note: coroutine does not implement `Copy` as this value is used across a yield
--> $DIR/clone-impl.rs:38:9
@ -47,7 +47,7 @@ LL | let gen_clone_1 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
...
LL | check_copy(&gen_clone_1);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`, which is required by `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}: Copy`
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:56:14
@ -67,7 +67,7 @@ LL | let gen_clone_1 = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
...
LL | check_copy(&gen_clone_1);
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`, which is required by `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}: Copy`
|
note: coroutine does not implement `Copy` as this value is used across a yield
--> $DIR/clone-impl.rs:52:9
@ -90,7 +90,7 @@ LL | let gen_non_clone = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
...
LL | check_copy(&gen_non_clone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}: Copy`
|
note: captured value does not implement `Copy`
--> $DIR/clone-impl.rs:64:14
@ -115,7 +115,7 @@ LL | let gen_non_clone = move || {
| ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
...
LL | check_clone(&gen_non_clone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`, which is required by `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}: Clone`
|
note: captured value does not implement `Clone`
--> $DIR/clone-impl.rs:64:14

View File

@ -13,7 +13,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`, which is required by `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:21:22
|
@ -53,7 +53,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`, which is required by `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:21:22
|
@ -93,7 +93,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
= help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`, which is required by `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:21:22
|

View File

@ -9,7 +9,7 @@ LL | | yield;
LL | | })
| |______^ coroutine is not `Send`
|
= help: within `{coroutine@$DIR/drop-yield-twice.rs:7:17: 7:19}`, the trait `Send` is not implemented for `Foo`
= help: within `{coroutine@$DIR/drop-yield-twice.rs:7:17: 7:19}`, the trait `Send` is not implemented for `Foo`, which is required by `{coroutine@$DIR/drop-yield-twice.rs:7:17: 7:19}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/drop-yield-twice.rs:9:9
|

View File

@ -29,7 +29,7 @@ LL | let mut g = || {
| -- within this `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`
...
LL | let mut h = copy(g);
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`, the trait `Copy` is not implemented for `Box<(i32, ())>`, which is required by `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}: Copy`
|
note: coroutine does not implement `Copy` as this value is used across a yield
--> $DIR/issue-105084.rs:21:22

View File

@ -4,7 +4,7 @@ error: coroutine cannot be sent between threads safely
LL | require_send(send_gen);
| ^^^^^^^^^^^^^^^^^^^^^^ coroutine is not `Send`
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{coroutine@$DIR/issue-68112.rs:33:20: 33:22}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/issue-68112.rs:36:9
@ -26,7 +26,7 @@ error[E0277]: `RefCell<i32>` cannot be shared between threads safely
LL | require_send(send_gen);
| ^^^^^^^^^^^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{coroutine@$DIR/issue-68112.rs:60:20: 60:22}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
= note: required for `Arc<RefCell<i32>>` to implement `Send`
note: required because it's used within this coroutine

View File

@ -9,7 +9,7 @@ LL | | drop(a);
LL | | });
| |______^ coroutine is not `Sync`
|
= help: within `{coroutine@$DIR/not-send-sync.rs:14:17: 14:19}`, the trait `Sync` is not implemented for `NotSync`
= help: within `{coroutine@$DIR/not-send-sync.rs:14:17: 14:19}`, the trait `Sync` is not implemented for `NotSync`, which is required by `{coroutine@$DIR/not-send-sync.rs:14:17: 14:19}: Sync`
note: coroutine is not `Sync` as this value is used across a yield
--> $DIR/not-send-sync.rs:17:9
|
@ -34,7 +34,7 @@ LL | | drop(a);
LL | | });
| |______^ coroutine is not `Send`
|
= help: within `{coroutine@$DIR/not-send-sync.rs:21:17: 21:19}`, the trait `Send` is not implemented for `NotSend`
= help: within `{coroutine@$DIR/not-send-sync.rs:21:17: 21:19}`, the trait `Send` is not implemented for `NotSend`, which is required by `{coroutine@$DIR/not-send-sync.rs:21:17: 21:19}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/not-send-sync.rs:24:9
|

View File

@ -13,7 +13,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`
= help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`, which is required by `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:21:22
|
@ -53,7 +53,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`
= help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`, which is required by `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:21:22
|
@ -93,7 +93,7 @@ LL | | };
LL | | );
| |_____- in this macro invocation
|
= help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
= help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`, which is required by `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:21:22
|

View File

@ -4,7 +4,7 @@ error: coroutine cannot be sent between threads safely
LL | require_send(send_gen);
| ^^^^^^^^^^^^^^^^^^^^^^ coroutine is not `Send`
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{test1::{closure#0} upvar_tys=() witness={test1::{closure#0}}}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/coroutine-print-verbose-1.rs:35:9
@ -25,7 +25,7 @@ error[E0277]: `RefCell<i32>` cannot be shared between threads safely
LL | require_send(send_gen);
| ^^^^^^^^^^^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
|
= help: the trait `Sync` is not implemented for `RefCell<i32>`
= help: the trait `Sync` is not implemented for `RefCell<i32>`, which is required by `{test2::{closure#0} upvar_tys=() witness={test2::{closure#0}}}: Send`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
= note: required for `Arc<RefCell<i32>>` to implement `Send`
note: required because it's used within this coroutine

View File

@ -9,7 +9,7 @@ LL | | drop(a);
LL | | });
| |______^ coroutine is not `Sync`
|
= help: within `{main::{closure#0} upvar_tys=() witness={main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync`
= help: within `{main::{closure#0} upvar_tys=() witness={main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync`, which is required by `{main::{closure#0} upvar_tys=() witness={main::{closure#0}}}: Sync`
note: coroutine is not `Sync` as this value is used across a yield
--> $DIR/coroutine-print-verbose-2.rs:20:9
|
@ -34,7 +34,7 @@ LL | | drop(a);
LL | | });
| |______^ coroutine is not `Send`
|
= help: within `{main::{closure#1} upvar_tys=() witness={main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend`
= help: within `{main::{closure#1} upvar_tys=() witness={main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend`, which is required by `{main::{closure#1} upvar_tys=() witness={main::{closure#1}}}: Send`
note: coroutine is not `Send` as this value is used across a yield
--> $DIR/coroutine-print-verbose-2.rs:27:9
|

View File

@ -10,7 +10,7 @@ LL | | let _x = x;
LL | | });
| |_____^ coroutine is not `Send`
|
= help: the trait `Sync` is not implemented for `*mut ()`
= help: the trait `Sync` is not implemented for `*mut ()`, which is required by `{coroutine@$DIR/ref-upvar-not-send.rs:15:17: 15:24}: Send`
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
--> $DIR/ref-upvar-not-send.rs:19:18
|
@ -34,7 +34,7 @@ LL | | let _y = y;
LL | | });
| |_____^ coroutine is not `Send`
|
= help: within `{coroutine@$DIR/ref-upvar-not-send.rs:23:17: 23:24}`, the trait `Send` is not implemented for `*mut ()`
= help: within `{coroutine@$DIR/ref-upvar-not-send.rs:23:17: 23:24}`, the trait `Send` is not implemented for `*mut ()`, which is required by `{coroutine@$DIR/ref-upvar-not-send.rs:23:17: 23:24}: Send`
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
--> $DIR/ref-upvar-not-send.rs:27:18
|

View File

@ -8,7 +8,7 @@ LL | let s = std::array::from_fn(|_| ()).await;
| | help: remove the `.await`
| this call returns `[(); _]`
|
= help: the trait `Future` is not implemented for `[(); _]`
= help: the trait `Future` is not implemented for `[(); _]`, which is required by `[(); _]: IntoFuture`
= note: [(); _] must be a future or must implement `IntoFuture` to be awaited
= note: required for `[(); _]` to implement `IntoFuture`

View File

@ -10,7 +10,7 @@ error[E0277]: `{integer}` is not an iterator
LL | yield || for i in 0 { }
| ^ `{integer}` is not an iterator
|
= help: the trait `Iterator` is not implemented for `{integer}`
= help: the trait `Iterator` is not implemented for `{integer}`, which is required by `{integer}: IntoIterator`
= note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
= note: required for `{integer}` to implement `IntoIterator`

View File

@ -7,7 +7,7 @@ LL | #[derive(Debug)]
LL | x: Error
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
|
= help: the trait `Debug` is not implemented for `Error`
= help: the trait `Debug` is not implemented for `Error`, which is required by `&Error: Debug`
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Debug)]`

View File

@ -7,7 +7,7 @@ LL | #[derive(Debug)]
LL | Error
| ^^^^^ `Error` cannot be formatted using `{:?}`
|
= help: the trait `Debug` is not implemented for `Error`
= help: the trait `Debug` is not implemented for `Error`, which is required by `&Error: Debug`
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Debug)]`

View File

@ -7,7 +7,7 @@ LL | struct Struct {
LL | x: Error
| ^^^^^^^^ `Error` cannot be formatted using `{:?}`
|
= help: the trait `Debug` is not implemented for `Error`
= help: the trait `Debug` is not implemented for `Error`, which is required by `&Error: Debug`
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Debug)]`

View File

@ -7,7 +7,7 @@ LL | struct Struct(
LL | Error
| ^^^^^ `Error` cannot be formatted using `{:?}`
|
= help: the trait `Debug` is not implemented for `Error`
= help: the trait `Debug` is not implemented for `Error`, which is required by `&Error: Debug`
= note: add `#[derive(Debug)]` to `Error` or manually `impl Debug for Error`
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Error` with `#[derive(Debug)]`

View File

@ -5,7 +5,7 @@ LL | #[derive(PartialEq, Eq)]
| -- in this derive macro expansion
...
LL | Float(Option<f64>),
| ^^^^^^^^^^^ the trait `Eq` is not implemented for `f64`
| ^^^^^^^^^^^ the trait `Eq` is not implemented for `f64`, which is required by `Option<f64>: Eq`
|
= help: the following other types implement trait `Eq`:
isize

View File

@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[isize]` cannot be known at compilati
LL | let h: &(([isize],),) = &(*g,);
| ^^^^^ doesn't have a size known at compile-time
|
= help: within `(([isize],),)`, the trait `Sized` is not implemented for `[isize]`
= help: within `(([isize],),)`, the trait `Sized` is not implemented for `[isize]`, which is required by `(([isize],),): Sized`
= note: required because it appears within the type `([isize],)`
= note: required because it appears within the type `(([isize],),)`
= note: tuples must have a statically known size to be initialized

View File

@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[isize]` cannot be known at compilati
LL | let h: &Fat<Fat<[isize]>> = &Fat { ptr: *g };
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `Fat<Fat<[isize]>>`, the trait `Sized` is not implemented for `[isize]`
= help: within `Fat<Fat<[isize]>>`, the trait `Sized` is not implemented for `[isize]`, which is required by `Fat<Fat<[isize]>>: Sized`
note: required because it appears within the type `Fat<[isize]>`
--> $DIR/dst-bad-deep.rs:6:8
|

View File

@ -4,7 +4,7 @@ error[E0277]: `*const u8` cannot be sent between threads safely
LL | is_send::<Foo>();
| ^^^ `*const u8` cannot be sent between threads safely
|
= help: within `Foo`, the trait `Send` is not implemented for `*const u8`
= help: within `Foo`, the trait `Send` is not implemented for `*const u8`, which is required by `Foo: Send`
note: required because it appears within the type `Baz`
--> $DIR/E0277-2.rs:9:8
|

View File

@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
LL | fn f(p: Path) { }
| ^ doesn't have a size known at compile-time
|
= help: within `Path`, the trait `Sized` is not implemented for `[u8]`
= help: within `Path`, the trait `Sized` is not implemented for `[u8]`, which is required by `Path: Sized`
note: required because it appears within the type `Path`
--> $SRC_DIR/std/src/path.rs:LL:COL
= help: unsized fn params are gated as an unstable feature

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:53:46
|
LL | want(Wrapper { value: Burrito { filling: q } });
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<Burrito<Q>>: T1`
| |
| required by a bound introduced by this call
|
@ -38,7 +38,7 @@ LL | want(Some(()));
| |
| required by a bound introduced by this call
|
= help: the trait `Iterator` is not implemented for `()`
= help: the trait `Iterator` is not implemented for `()`, which is required by `Option<()>: T1`
= help: the trait `T1` is implemented for `Option<It>`
note: required for `Option<()>` to implement `T1`
--> $DIR/blame-trait-error.rs:21:20
@ -109,7 +109,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:65:45
|
LL | want(&ExampleTuple::ExampleTupleVariant(q));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleTuple<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -134,7 +134,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:68:31
|
LL | want(&ExampleTupleVariant(q));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleTuple<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -159,7 +159,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:71:50
|
LL | want(&ExampleOtherTuple::ExampleTupleVariant(q));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleTuple<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -184,7 +184,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:74:44
|
LL | want(&ExampleDifferentTupleVariantName(q));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleTuple<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -209,7 +209,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:77:45
|
LL | want(&ExampleYetAnotherTupleVariantName(q));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleTuple<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -234,7 +234,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:80:56
|
LL | want(&ExampleStruct::ExampleStructVariant { field: q });
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleStruct<Q>: T1`
|
note: required for `ExampleStruct<Q>` to implement `T1`
--> $DIR/blame-trait-error.rs:45:9
@ -257,7 +257,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:83:41
|
LL | want(&ExampleStructVariant { field: q });
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleStruct<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -282,7 +282,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:86:61
|
LL | want(&ExampleOtherStruct::ExampleStructVariant { field: q });
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleStruct<Q>: T1`
|
note: required for `ExampleStruct<Q>` to implement `T1`
--> $DIR/blame-trait-error.rs:45:9
@ -305,7 +305,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:89:54
|
LL | want(&ExampleDifferentStructVariantName { field: q });
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleStruct<Q>: T1`
|
note: required for `ExampleStruct<Q>` to implement `T1`
--> $DIR/blame-trait-error.rs:45:9
@ -328,7 +328,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:92:55
|
LL | want(&ExampleYetAnotherStructVariantName { field: q });
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleStruct<Q>: T1`
|
note: required for `ExampleStruct<Q>` to implement `T1`
--> $DIR/blame-trait-error.rs:45:9
@ -351,7 +351,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:95:38
|
LL | want(&ExampleActuallyTupleStruct(q, 0));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleActuallyTupleStruct<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -376,7 +376,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error.rs:98:43
|
LL | want(&ExampleActuallyTupleStructOther(q, 0));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&ExampleActuallyTupleStruct<Q>: T1`
| |
| required by a bound introduced by this call
|

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:81:60
|
LL | want(Wrapper { value: Burrito { spicy: false, filling: q } });
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<Burrito<Q>>: T1`
|
note: required for `Burrito<Q>` to implement `T2`
--> $DIR/blame-trait-error-spans-on-exprs.rs:22:13
@ -32,7 +32,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:85:84
|
LL | want(Wrapper { value: BurritoKinds::SmallBurrito { spicy: true, small_filling: q } });
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<BurritoKinds<Q>>: T1`
|
note: required for `BurritoKinds<Q>` to implement `T2`
--> $DIR/blame-trait-error-spans-on-exprs.rs:32:13
@ -62,7 +62,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:89:39
|
LL | want(Wrapper { value: Taco(false, q) });
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<Taco<Q>>: T1`
| |
| required by a bound introduced by this call
|
@ -94,7 +94,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:93:53
|
LL | want(Wrapper { value: TacoKinds::OneTaco(false, q) });
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<TacoKinds<Q>>: T1`
| |
| required by a bound introduced by this call
|
@ -126,7 +126,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:97:74
|
LL | want(Wrapper { value: GenericBurrito { spiciness: NotSpicy, filling: q } });
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<GenericBurrito<NotSpicy, Q>>: T1`
|
note: required for `GenericBurrito<NotSpicy, Q>` to implement `T2`
--> $DIR/blame-trait-error-spans-on-exprs.rs:47:16
@ -156,7 +156,7 @@ error[E0277]: the trait bound `Q: T2` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:101:14
|
LL | want((3, q));
| ---- ^ the trait `T2` is not implemented for `Q`
| ---- ^ the trait `T2` is not implemented for `Q`, which is required by `({integer}, Q): T1`
| |
| required by a bound introduced by this call
|
@ -181,7 +181,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:105:31
|
LL | want(Wrapper { value: (3, q) });
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<({integer}, Q)>: T1`
| |
| required by a bound introduced by this call
|
@ -213,7 +213,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:109:15
|
LL | want(((3, q), 5));
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `(({integer}, Q), {integer}): T1`
| |
| required by a bound introduced by this call
|
@ -245,7 +245,7 @@ error[E0277]: the trait bound `Q: T1` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:112:49
|
LL | want(DoubleWrapper { item: Wrapper { value: q } });
| ---- ^ the trait `T1` is not implemented for `Q`
| ---- ^ the trait `T1` is not implemented for `Q`, which is required by `DoubleWrapper<Q>: T1`
| |
| required by a bound introduced by this call
|
@ -270,7 +270,7 @@ error[E0277]: the trait bound `Q: T1` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:115:88
|
LL | want(DoubleWrapper { item: Wrapper { value: DoubleWrapper { item: Wrapper { value: q } } } });
| ---- required by a bound introduced by this call ^ the trait `T1` is not implemented for `Q`
| ---- required by a bound introduced by this call ^ the trait `T1` is not implemented for `Q`, which is required by `DoubleWrapper<DoubleWrapper<Q>>: T1`
|
note: required for `DoubleWrapper<Q>` to implement `T1`
--> $DIR/blame-trait-error-spans-on-exprs.rs:72:13
@ -295,7 +295,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:119:27
|
LL | want(Wrapper { value: AliasBurrito { spiciness: q, filling: q } });
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `T3` is not implemented for `Q`
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `T3` is not implemented for `Q`, which is required by `Wrapper<GenericBurrito<Q, Q>>: T1`
| |
| required by a bound introduced by this call
|
@ -327,7 +327,7 @@ error[E0277]: the trait bound `Q: T1` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:122:35
|
LL | want(Two { a: Two { a: (), b: q }, b: () });
| ---- ^ the trait `T1` is not implemented for `Q`
| ---- ^ the trait `T1` is not implemented for `Q`, which is required by `Two<Two<(), Q>, ()>: T1`
| |
| required by a bound introduced by this call
|
@ -354,7 +354,7 @@ error[E0277]: the trait bound `Q: T1` is not satisfied
LL | want(
| ---- required by a bound introduced by this call
LL | Two { a: Two { a: (), b: Two { a: Two { a: (), b: q }, b: () } }, b: () },
| ^ the trait `T1` is not implemented for `Q`
| ^ the trait `T1` is not implemented for `Q`, which is required by `Two<Two<(), Two<Two<(), Q>, ()>>, ()>: T1`
|
note: required for `Two<Two<(), Q>, ()>` to implement `T1`
--> $DIR/blame-trait-error-spans-on-exprs.rs:66:19
@ -379,7 +379,7 @@ error[E0277]: the trait bound `Q: T3` is not satisfied
--> $DIR/blame-trait-error-spans-on-exprs.rs:133:44
|
LL | want(&Burrito { spicy: false, filling: q });
| ---- ^ the trait `T3` is not implemented for `Q`
| ---- ^ the trait `T3` is not implemented for `Q`, which is required by `&Burrito<Q>: T1`
| |
| required by a bound introduced by this call
|

View File

@ -21,7 +21,7 @@ error[E0277]: the size for values of type `A` cannot be known at compilation tim
LL | assert_sized::<Foo>();
| ^^^ doesn't have a size known at compile-time
|
= help: within `Foo`, the trait `Sized` is not implemented for `A`
= help: within `Foo`, the trait `Sized` is not implemented for `A`, which is required by `Foo: Sized`
note: required because it appears within the type `Foo`
--> $DIR/extern-types-unsized.rs:9:8
|
@ -43,7 +43,7 @@ error[E0277]: the size for values of type `A` cannot be known at compilation tim
LL | assert_sized::<Bar<A>>();
| ^^^^^^ doesn't have a size known at compile-time
|
= help: within `Bar<A>`, the trait `Sized` is not implemented for `A`
= help: within `Bar<A>`, the trait `Sized` is not implemented for `A`, which is required by `Bar<A>: Sized`
note: required because it appears within the type `Bar<A>`
--> $DIR/extern-types-unsized.rs:14:8
|
@ -65,7 +65,7 @@ error[E0277]: the size for values of type `A` cannot be known at compilation tim
LL | assert_sized::<Bar<Bar<A>>>();
| ^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `Bar<Bar<A>>`, the trait `Sized` is not implemented for `A`
= help: within `Bar<Bar<A>>`, the trait `Sized` is not implemented for `A`, which is required by `Bar<Bar<A>>: Sized`
note: required because it appears within the type `Bar<A>`
--> $DIR/extern-types-unsized.rs:14:8
|

View File

@ -94,7 +94,7 @@ error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at
LL | fn unsized_local() where Dst<dyn A>: Sized {
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`
= help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`, which is required by `Dst<(dyn A + 'static)>: Sized`
note: required because it appears within the type `Dst<(dyn A + 'static)>`
--> $DIR/feature-gate-trivial_bounds.rs:48:8
|

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `str: UpperHex` is not satisfied
--> $DIR/ifmt-unimpl.rs:2:21
|
LL | format!("{:X}", "3");
| ---- ^^^ the trait `UpperHex` is not implemented for `str`
| ---- ^^^ the trait `UpperHex` is not implemented for `str`, which is required by `&str: UpperHex`
| |
| required by a bound introduced by this call
|

View File

@ -6,7 +6,7 @@ LL | send(format_args!("{:?}", c));
| |
| required by a bound introduced by this call
|
= help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
= help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`, which is required by `Arguments<'_>: Send`
= note: required because it appears within the type `&core::fmt::rt::Opaque`
note: required because it appears within the type `core::fmt::rt::Argument<'_>`
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
@ -28,7 +28,7 @@ LL | sync(format_args!("{:?}", c));
| |
| required by a bound introduced by this call
|
= help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
= help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`, which is required by `Arguments<'_>: Sync`
= note: required because it appears within the type `&core::fmt::rt::Opaque`
note: required because it appears within the type `core::fmt::rt::Argument<'_>`
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL

View File

@ -4,7 +4,7 @@ error[E0277]: `&str` is not an iterator
LL | for c in "asdf" {
| ^^^^^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()`
|
= help: the trait `Iterator` is not implemented for `&str`
= help: the trait `Iterator` is not implemented for `&str`, which is required by `&str: IntoIterator`
= note: required for `&str` to implement `IntoIterator`
error: aborting due to 1 previous error

View File

@ -4,7 +4,7 @@ error[E0277]: `MyStruct` is not an iterator
LL | for x in bogus {
| ^^^^^ `MyStruct` is not an iterator
|
= help: the trait `Iterator` is not implemented for `MyStruct`
= help: the trait `Iterator` is not implemented for `MyStruct`, which is required by `MyStruct: IntoIterator`
= note: required for `MyStruct` to implement `IntoIterator`
error: aborting due to 1 previous error

View File

@ -4,7 +4,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
LL | foo::<fn() -> str, _>(None, ());
| ^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `fn() -> str`, the trait `Sized` is not implemented for `str`
= help: within `fn() -> str`, the trait `Sized` is not implemented for `str`, which is required by `fn() -> str: Fn<_>`
= note: required because it appears within the type `fn() -> str`
note: required by a bound in `foo`
--> $DIR/unsized-ret.rs:5:11
@ -18,7 +18,7 @@ error[E0277]: the size for values of type `(dyn std::fmt::Display + 'a)` cannot
LL | foo::<for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a), _>(None, (&(),));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`
= help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`, which is required by `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a): Fn<_>`
= note: required because it appears within the type `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`
note: required by a bound in `foo`
--> $DIR/unsized-ret.rs:5:11

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `<Self as Foo>::Bar<()>: Eq<i32>` is not satisfied
--> $DIR/assume-gat-normalization-for-nested-goals.rs:6:30
|
LL | type Bar<T>: Baz<Self> = i32;
| ^^^ the trait `Eq<i32>` is not implemented for `<Self as Foo>::Bar<()>`
| ^^^ the trait `Eq<i32>` is not implemented for `<Self as Foo>::Bar<()>`, which is required by `i32: Baz<Self>`
|
note: required for `i32` to implement `Baz<Self>`
--> $DIR/assume-gat-normalization-for-nested-goals.rs:13:23

View File

@ -25,7 +25,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/impl_bounds.rs:18:33
|
LL | type C = String where Self: Copy;
| ^^^^ the trait `Copy` is not implemented for `T`
| ^^^^ the trait `Copy` is not implemented for `T`, which is required by `Fooy<T>: Copy`
|
note: required for `Fooy<T>` to implement `Copy`
--> $DIR/impl_bounds.rs:10:10
@ -50,7 +50,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/impl_bounds.rs:20:24
|
LL | fn d() where Self: Copy {}
| ^^^^ the trait `Copy` is not implemented for `T`
| ^^^^ the trait `Copy` is not implemented for `T`, which is required by `Fooy<T>: Copy`
|
note: required for `Fooy<T>` to implement `Copy`
--> $DIR/impl_bounds.rs:10:10

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `for<'a> &'a mut (): Foo<&'a mut ()>` is not satis
--> $DIR/issue-101020.rs:31:22
|
LL | (&mut EmptyIter).consume(());
| ^^^^^^^ the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()`
| ^^^^^^^ the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()`, which is required by `for<'a> &'a mut (): FuncInput<'a, &'a mut ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-101020.rs:28:1

View File

@ -14,7 +14,7 @@ error[E0277]: the trait bound `T: Clone` is not satisfied
--> $DIR/issue-74824.rs:6:26
|
LL | type Copy<T>: Copy = Box<T>;
| ^^^^^^ the trait `Clone` is not implemented for `T`
| ^^^^^^ the trait `Clone` is not implemented for `T`, which is required by `<Self as UnsafeCopy>::Copy<T>: Copy`
|
= note: required for `Box<T>` to implement `Clone`
= note: required for `<Self as UnsafeCopy>::Copy<T>` to implement `Copy`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
--> $DIR/issue-89118.rs:19:8
|
LL | C: StackContext,
| ^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`
| ^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
@ -29,7 +29,7 @@ error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
--> $DIR/issue-89118.rs:29:9
|
LL | impl<C> EthernetWorker<C> {}
| ^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`
| ^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
@ -56,7 +56,7 @@ error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied
--> $DIR/issue-89118.rs:22:20
|
LL | type Handler = Ctx<C::Dispatcher>;
| ^^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`
| ^^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1

View File

@ -9,7 +9,7 @@ LL | send(before());
| |
| required by a bound introduced by this call
|
= help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
= help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`, which is required by `impl Fn(i32): Send`
note: required because it's used within this closure
--> $DIR/auto-trait-leak2.rs:10:5
|
@ -37,7 +37,7 @@ LL | send(after());
LL | fn after() -> impl Fn(i32) {
| ------------ within this `impl Fn(i32)`
|
= help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
= help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`, which is required by `impl Fn(i32): Send`
note: required because it's used within this closure
--> $DIR/auto-trait-leak2.rs:38:5
|

View File

@ -16,7 +16,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) }
| |
| doesn't have a size known at compile-time
|
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized`
= note: required because it appears within the type `(usize, (dyn Trait + 'static))`
= note: the return type of a function must have a statically known size
@ -38,7 +38,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
| |
| doesn't have a size known at compile-time
|
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized`
= note: required because it appears within the type `(usize, (dyn Trait + 'static))`
= note: the return type of a function must have a statically known size

View File

@ -32,7 +32,7 @@ error[E0277]: the trait bound `impl Debug: Step` is not satisfied
--> $DIR/impl_trait_projections.rs:26:8
|
LL | -> <::std::ops::Range<impl Debug> as Iterator>::Item
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Step` is not implemented for `impl Debug`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Step` is not implemented for `impl Debug`, which is required by `std::ops::Range<impl Debug>: Iterator`
|
= help: the following other types implement trait `Step`:
char
@ -53,7 +53,7 @@ LL | / {
LL | |
LL | | (1i32..100).next().unwrap()
LL | | }
| |_^ the trait `Step` is not implemented for `impl Debug`
| |_^ the trait `Step` is not implemented for `impl Debug`, which is required by `std::ops::Range<impl Debug>: Iterator`
|
= help: the following other types implement trait `Step`:
char

View File

@ -11,7 +11,7 @@ error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:12:29
|
LL | fn foo<T: Default>() -> Self::E {
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`, which is required by `(S, T): Copy`
|
= note: required because it appears within the type `(S, T)`
help: consider further restricting this bound
@ -23,7 +23,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:12:29
|
LL | fn foo<T: Default>() -> Self::E {
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`, which is required by `(S, T): Copy`
|
= note: required because it appears within the type `(S, T)`
help: consider further restricting this bound

View File

@ -46,7 +46,7 @@ error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfie
--> $DIR/nested_impl_trait.rs:6:46
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`, which is required by `impl Into<u32>: Into<impl Debug>`
|
= help: the trait `Into<U>` is implemented for `T`
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
@ -55,7 +55,7 @@ error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfie
--> $DIR/nested_impl_trait.rs:19:34
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`, which is required by `impl Into<u32>: Into<impl Debug>`
|
= help: the trait `Into<U>` is implemented for `T`
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`

View File

@ -4,7 +4,7 @@ error[E0277]: the type `[{integer}]` cannot be indexed by `i32`
LL | x[0i32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[{integer}]>` is not implemented for `i32`
= help: the trait `SliceIndex<[{integer}]>` is not implemented for `i32`, which is required by `Vec<{integer}>: Index<_>`
= help: the trait `SliceIndex<[{integer}]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `i32`
= note: required for `Vec<{integer}>` to implement `Index<i32>`

View File

@ -4,7 +4,7 @@ error[E0277]: the type `[{integer}]` cannot be indexed by `u8`
LL | [0][0u8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[{integer}]>` is not implemented for `u8`
= help: the trait `SliceIndex<[{integer}]>` is not implemented for `u8`, which is required by `[{integer}; 1]: Index<_>`
= help: the trait `SliceIndex<[{integer}]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `u8`
= note: required for `[{integer}]` to implement `Index<u8>`

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `String: Borrow<&str>` is not satisfied
--> $DIR/point-at-index-for-obligation-failure.rs:5:9
|
LL | &s
| ^^ the trait `Borrow<&str>` is not implemented for `String`
| ^^ the trait `Borrow<&str>` is not implemented for `String`, which is required by `HashMap<String, String>: Index<&_>`
|
= help: the trait `Borrow<str>` is implemented for `String`
= help: for that trait implementation, expected `str`, found `&str`

View File

@ -4,7 +4,7 @@ error[E0277]: the type `[isize]` cannot be indexed by `u8`
LL | v[3u8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `u8`
= help: the trait `SliceIndex<[isize]>` is not implemented for `u8`, which is required by `Vec<isize>: Index<_>`
= help: the trait `SliceIndex<[isize]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `u8`
= note: required for `Vec<isize>` to implement `Index<u8>`
@ -15,7 +15,7 @@ error[E0277]: the type `[isize]` cannot be indexed by `i8`
LL | v[3i8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `i8`
= help: the trait `SliceIndex<[isize]>` is not implemented for `i8`, which is required by `Vec<isize>: Index<_>`
= help: the trait `SliceIndex<[isize]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `i8`
= note: required for `Vec<isize>` to implement `Index<i8>`
@ -26,7 +26,7 @@ error[E0277]: the type `[isize]` cannot be indexed by `u32`
LL | v[3u32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `u32`
= help: the trait `SliceIndex<[isize]>` is not implemented for `u32`, which is required by `Vec<isize>: Index<_>`
= help: the trait `SliceIndex<[isize]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `u32`
= note: required for `Vec<isize>` to implement `Index<u32>`
@ -37,7 +37,7 @@ error[E0277]: the type `[isize]` cannot be indexed by `i32`
LL | v[3i32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[isize]>` is not implemented for `i32`
= help: the trait `SliceIndex<[isize]>` is not implemented for `i32`, which is required by `Vec<isize>: Index<_>`
= help: the trait `SliceIndex<[isize]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `i32`
= note: required for `Vec<isize>` to implement `Index<i32>`
@ -48,7 +48,7 @@ error[E0277]: the type `[u8]` cannot be indexed by `u8`
LL | s.as_bytes()[3u8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `u8`
= help: the trait `SliceIndex<[u8]>` is not implemented for `u8`, which is required by `[u8]: Index<_>`
= help: the trait `SliceIndex<[u8]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `u8`
= note: required for `[u8]` to implement `Index<u8>`
@ -59,7 +59,7 @@ error[E0277]: the type `[u8]` cannot be indexed by `i8`
LL | s.as_bytes()[3i8];
| ^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `i8`
= help: the trait `SliceIndex<[u8]>` is not implemented for `i8`, which is required by `[u8]: Index<_>`
= help: the trait `SliceIndex<[u8]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `i8`
= note: required for `[u8]` to implement `Index<i8>`
@ -70,7 +70,7 @@ error[E0277]: the type `[u8]` cannot be indexed by `u32`
LL | s.as_bytes()[3u32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `u32`
= help: the trait `SliceIndex<[u8]>` is not implemented for `u32`, which is required by `[u8]: Index<_>`
= help: the trait `SliceIndex<[u8]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `u32`
= note: required for `[u8]` to implement `Index<u32>`
@ -81,7 +81,7 @@ error[E0277]: the type `[u8]` cannot be indexed by `i32`
LL | s.as_bytes()[3i32];
| ^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `SliceIndex<[u8]>` is not implemented for `i32`
= help: the trait `SliceIndex<[u8]>` is not implemented for `i32`, which is required by `[u8]: Index<_>`
= help: the trait `SliceIndex<[u8]>` is implemented for `usize`
= help: for that trait implementation, expected `usize`, found `i32`
= note: required for `[u8]` to implement `Index<i32>`

View File

@ -6,7 +6,7 @@ LL | catch_unwind(|| { x.set(23); });
| |
| required by a bound introduced by this call
|
= help: within `Cell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
= help: within `Cell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`, which is required by `{closure@$DIR/interior-mutability.rs:5:18: 5:20}: UnwindSafe`
note: required because it appears within the type `Cell<i32>`
--> $SRC_DIR/core/src/cell.rs:LL:COL
= note: required for `&Cell<i32>` to implement `UnwindSafe`

View File

@ -4,7 +4,7 @@ error[E0277]: `Rc<()>` cannot be sent between threads safely
LL | foo::<HashMap<Rc<()>, Rc<()>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^ `Rc<()>` cannot be sent between threads safely
|
= help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>`
= help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>`, which is required by `HashMap<Rc<()>, Rc<()>>: Send`
= note: required because it appears within the type `(Rc<()>, Rc<()>)`
= note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send`
note: required because it appears within the type `hashbrown::map::HashMap<Rc<()>, Rc<()>, RandomState>`

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