Use span label instead of note for cause in E0631

This commit is contained in:
Esteban Küber 2019-08-24 14:44:43 -07:00
parent 2d851b3318
commit 444bc3ca66
187 changed files with 1177 additions and 2058 deletions

View File

@ -657,19 +657,22 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
span, span,
E0277, E0277,
"{}", "{}",
message.unwrap_or_else(|| message.unwrap_or_else(|| format!(
format!("the trait bound `{}` is not satisfied{}", "the trait bound `{}` is not satisfied{}",
trait_ref.to_predicate(), post_message) trait_ref.to_predicate(),
)); post_message,
)));
let explanation = let explanation =
if obligation.cause.code == ObligationCauseCode::MainFunctionType { if obligation.cause.code == ObligationCauseCode::MainFunctionType {
"consider using `()`, or a `Result`".to_owned() "consider using `()`, or a `Result`".to_owned()
} else { } else {
format!("{}the trait `{}` is not implemented for `{}`", format!(
"{}the trait `{}` is not implemented for `{}`",
pre_message, pre_message,
trait_ref, trait_ref,
trait_ref.self_ty()) trait_ref.self_ty(),
)
}; };
if let Some(ref s) = label { if let Some(ref s) = label {
@ -1535,17 +1538,23 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
err.note("only the last element of a tuple may have a dynamically sized type"); err.note("only the last element of a tuple may have a dynamically sized type");
} }
ObligationCauseCode::ProjectionWf(data) => { ObligationCauseCode::ProjectionWf(data) => {
err.note(&format!("required so that the projection `{}` is well-formed", err.note(&format!(
data)); "required so that the projection `{}` is well-formed",
data,
));
} }
ObligationCauseCode::ReferenceOutlivesReferent(ref_ty) => { ObligationCauseCode::ReferenceOutlivesReferent(ref_ty) => {
err.note(&format!("required so that reference `{}` does not outlive its referent", err.note(&format!(
ref_ty)); "required so that reference `{}` does not outlive its referent",
ref_ty,
));
} }
ObligationCauseCode::ObjectTypeBound(object_ty, region) => { ObligationCauseCode::ObjectTypeBound(object_ty, region) => {
err.note(&format!("required so that the lifetime bound of `{}` for `{}` \ err.note(&format!(
is satisfied", "required so that the lifetime bound of `{}` for `{}` is satisfied",
region, object_ty)); region,
object_ty,
));
} }
ObligationCauseCode::ItemObligation(item_def_id) => { ObligationCauseCode::ItemObligation(item_def_id) => {
let item_name = tcx.def_path_str(item_def_id); let item_name = tcx.def_path_str(item_def_id);
@ -1553,7 +1562,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
if let Some(sp) = tcx.hir().span_if_local(item_def_id) { if let Some(sp) = tcx.hir().span_if_local(item_def_id) {
let sp = tcx.sess.source_map().def_span(sp); let sp = tcx.sess.source_map().def_span(sp);
err.span_note(sp, &msg); err.span_label(sp, &msg);
} else { } else {
err.note(&msg); err.note(&msg);
} }

View File

@ -5,12 +5,9 @@ LL | f1(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _` | expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _`
| ...
note: required by `f1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
|
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {} LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------ required by `f1`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:2:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5
@ -19,12 +16,9 @@ LL | f1(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&(), &()) -> _` | expected signature of `fn(&(), &()) -> _`
| ...
note: required by `f1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:27:1
|
LL | fn f1<F>(_: F) where F: Fn(&(), &()) {} LL | fn f1<F>(_: F) where F: Fn(&(), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------ required by `f1`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
@ -33,12 +27,9 @@ LL | f2(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _` | expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _`
| ...
note: required by `f2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
|
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {} LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ----------------------------------------------- required by `f2`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:4:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5
@ -47,12 +38,9 @@ LL | f2(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&'a (), &()) -> _` | expected signature of `fn(&'a (), &()) -> _`
| ...
note: required by `f2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:28:1
|
LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {} LL | fn f2<F>(_: F) where F: for<'a> Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ----------------------------------------------- required by `f2`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
@ -61,12 +49,9 @@ LL | f3(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'r> fn(&(), &'r ()) -> _` | expected signature of `for<'r> fn(&(), &'r ()) -> _`
| ...
note: required by `f3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
|
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------------- required by `f3`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:6:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5
@ -75,12 +60,9 @@ LL | f3(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&(), &()) -> _` | expected signature of `fn(&(), &()) -> _`
| ...
note: required by `f3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:29:1
|
LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------------- required by `f3`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
@ -89,12 +71,9 @@ LL | f4(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _` | expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _`
| ...
note: required by `f4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
|
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {} LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ----------------------------------------------- required by `f4`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:8:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5
@ -103,12 +82,9 @@ LL | f4(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&(), &'r ()) -> _` | expected signature of `fn(&(), &'r ()) -> _`
| ...
note: required by `f4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:30:1
|
LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {} LL | fn f4<F>(_: F) where F: for<'r> Fn(&(), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ----------------------------------------------- required by `f4`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
@ -117,12 +93,9 @@ LL | f5(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'r> fn(&'r (), &'r ()) -> _` | expected signature of `for<'r> fn(&'r (), &'r ()) -> _`
| ...
note: required by `f5`
--> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
|
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -------------------------------------------------- required by `f5`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:10:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5
@ -131,12 +104,9 @@ LL | f5(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&'r (), &'r ()) -> _` | expected signature of `fn(&'r (), &'r ()) -> _`
| ...
note: required by `f5`
--> $DIR/anonymous-higher-ranked-lifetime.rs:31:1
|
LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} LL | fn f5<F>(_: F) where F: for<'r> Fn(&'r (), &'r ()) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -------------------------------------------------- required by `f5`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
@ -145,12 +115,9 @@ LL | g1(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _` | expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _`
| ...
note: required by `g1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
|
LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {} LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------------------- required by `g1`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5
@ -159,12 +126,9 @@ LL | g1(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
| ...
note: required by `g1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:34:1
|
LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {} LL | fn g1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------------------- required by `g1`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
@ -173,12 +137,9 @@ LL | g2(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _` | expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _`
| ...
note: required by `g2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
|
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {} LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ---------------------------------------- required by `g2`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5
@ -187,12 +148,9 @@ LL | g2(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&(), for<'r> fn(&'r ())) -> _` | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
| ...
note: required by `g2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:35:1
|
LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {} LL | fn g2<F>(_: F) where F: Fn(&(), fn(&())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ---------------------------------------- required by `g2`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
@ -201,12 +159,9 @@ LL | g3(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` | expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
| ...
note: required by `g3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
|
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {} LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------------------------------ required by `g3`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5
@ -215,12 +170,9 @@ LL | g3(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` | expected signature of `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _`
| ...
note: required by `g3`
--> $DIR/anonymous-higher-ranked-lifetime.rs:36:1
|
LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {} LL | fn g3<F>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ------------------------------------------------------------ required by `g3`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
@ -229,12 +181,9 @@ LL | g4(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _` | expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _`
| ...
note: required by `g4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
|
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | --------------------------------------------------- required by `g4`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5
@ -243,12 +192,9 @@ LL | g4(|_: (), _: ()| {});
| ^^ -------------- found signature of `fn((), ()) -> _` | ^^ -------------- found signature of `fn((), ()) -> _`
| | | |
| expected signature of `fn(&(), for<'r> fn(&'r ())) -> _` | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _`
| ...
note: required by `g4`
--> $DIR/anonymous-higher-ranked-lifetime.rs:37:1
|
LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} LL | fn g4<F>(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | --------------------------------------------------- required by `g4`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
@ -257,12 +203,9 @@ LL | h1(|_: (), _: (), _: (), _: ()| {});
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| | | |
| expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<(dyn for<'t0> std::ops::Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _` | expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<(dyn for<'t0> std::ops::Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _`
| ...
note: required by `h1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
|
LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {} LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -------------------------------------------------------------------- required by `h1`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5
@ -271,12 +214,9 @@ LL | h1(|_: (), _: (), _: (), _: ()| {});
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| | | |
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &(), for<'r, 's> fn(&'r (), &'s ())) -> _` | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &(), for<'r, 's> fn(&'r (), &'s ())) -> _`
| ...
note: required by `h1`
--> $DIR/anonymous-higher-ranked-lifetime.rs:40:1
|
LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {} LL | fn h1<F>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -------------------------------------------------------------------- required by `h1`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
@ -285,12 +225,9 @@ LL | h2(|_: (), _: (), _: (), _: ()| {});
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| | | |
| expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _` | expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _`
| ...
note: required by `h2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
|
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {} LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | --------------------------------------------------------------------------------- required by `h2`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5
@ -299,12 +236,9 @@ LL | h2(|_: (), _: (), _: (), _: ()| {});
| ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _`
| | | |
| expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _` | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _`
| ...
note: required by `h2`
--> $DIR/anonymous-higher-ranked-lifetime.rs:41:1
|
LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {} LL | fn h2<F>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | --------------------------------------------------------------------------------- required by `h2`
error: aborting due to 22 previous errors error: aborting due to 22 previous errors

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `i32: Foo` is not satisfied error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/associated-const-array-len.rs:5:16 --> $DIR/associated-const-array-len.rs:5:16
| |
LL | const ID: usize;
| ---------------- required by `Foo::ID`
...
LL | const X: [i32; <i32 as Foo>::ID] = [0, 1, 2]; LL | const X: [i32; <i32 as Foo>::ID] = [0, 1, 2];
| ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32` | ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
|
note: required by `Foo::ID`
--> $DIR/associated-const-array-len.rs:2:5
|
LL | const ID: usize;
| ^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: the trait bound `A: Foo` is not satisfied error[E0277]: the trait bound `A: Foo` is not satisfied
--> $DIR/associated-const-type-parameter-arrays-2.rs:16:22 --> $DIR/associated-const-type-parameter-arrays-2.rs:16:22
| |
LL | const Y: usize;
| --------------- required by `Foo::Y`
...
LL | let _array = [4; <A as Foo>::Y]; LL | let _array = [4; <A as Foo>::Y];
| ^^^^^^^^^^^^^ the trait `Foo` is not implemented for `A` | ^^^^^^^^^^^^^ the trait `Foo` is not implemented for `A`
| |
= help: consider adding a `where A: Foo` bound = help: consider adding a `where A: Foo` bound
note: required by `Foo::Y`
--> $DIR/associated-const-type-parameter-arrays-2.rs:2:5
|
LL | const Y: usize;
| ^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: the trait bound `A: Foo` is not satisfied error[E0277]: the trait bound `A: Foo` is not satisfied
--> $DIR/associated-const-type-parameter-arrays.rs:16:23 --> $DIR/associated-const-type-parameter-arrays.rs:16:23
| |
LL | const Y: usize;
| --------------- required by `Foo::Y`
...
LL | let _array: [u32; <A as Foo>::Y]; LL | let _array: [u32; <A as Foo>::Y];
| ^^^^^^^^^^^^^ the trait `Foo` is not implemented for `A` | ^^^^^^^^^^^^^ the trait `Foo` is not implemented for `A`
| |
= help: consider adding a `where A: Foo` bound = help: consider adding a `where A: Foo` bound
note: required by `Foo::Y`
--> $DIR/associated-const-type-parameter-arrays.rs:2:5
|
LL | const Y: usize;
| ^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -24,6 +24,9 @@ LL | | }
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely
--> $DIR/bad-bounds-on-assoc-in-trait.rs:37:1 --> $DIR/bad-bounds-on-assoc-in-trait.rs:37:1
| |
LL | trait Case1 {
| ----------- required by `Case1`
...
LL | / fn assume_case1<T: Case1>() { LL | / fn assume_case1<T: Case1>() {
LL | | LL | |
LL | | LL | |
@ -35,15 +38,13 @@ LL | | }
| |
= help: the trait `std::marker::Send` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item` = help: the trait `std::marker::Send` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
= help: consider adding a `where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Send` bound = help: consider adding a `where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Send` bound
note: required by `Case1`
--> $DIR/bad-bounds-on-assoc-in-trait.rs:22:1
|
LL | trait Case1 {
| ^^^^^^^^^^^
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely
--> $DIR/bad-bounds-on-assoc-in-trait.rs:37:1 --> $DIR/bad-bounds-on-assoc-in-trait.rs:37:1
| |
LL | trait Case1 {
| ----------- required by `Case1`
...
LL | / fn assume_case1<T: Case1>() { LL | / fn assume_case1<T: Case1>() {
LL | | LL | |
LL | | LL | |
@ -55,15 +56,13 @@ LL | | }
| |
= help: the trait `std::marker::Sync` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item` = help: the trait `std::marker::Sync` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
= help: consider adding a `where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Sync` bound = help: consider adding a `where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Sync` bound
note: required by `Case1`
--> $DIR/bad-bounds-on-assoc-in-trait.rs:22:1
|
LL | trait Case1 {
| ^^^^^^^^^^^
error[E0277]: `<_ as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug` error[E0277]: `<_ as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug`
--> $DIR/bad-bounds-on-assoc-in-trait.rs:37:1 --> $DIR/bad-bounds-on-assoc-in-trait.rs:37:1
| |
LL | trait Case1 {
| ----------- required by `Case1`
...
LL | / fn assume_case1<T: Case1>() { LL | / fn assume_case1<T: Case1>() {
LL | | LL | |
LL | | LL | |
@ -74,11 +73,6 @@ LL | | }
| |_^ `<_ as Lam<&'a u8>>::App` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | |_^ `<_ as Lam<&'a u8>>::App` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
| |
= help: the trait `for<'a> std::fmt::Debug` is not implemented for `<_ as Lam<&'a u8>>::App` = help: the trait `for<'a> std::fmt::Debug` is not implemented for `<_ as Lam<&'a u8>>::App`
note: required by `Case1`
--> $DIR/bad-bounds-on-assoc-in-trait.rs:22:1
|
LL | trait Case1 {
| ^^^^^^^^^^^
error: aborting due to 5 previous errors error: aborting due to 5 previous errors

View File

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

View File

@ -1,15 +1,13 @@
error[E0277]: the trait bound `<G as GetToInt>::R: ToInt` is not satisfied error[E0277]: the trait bound `<G as GetToInt>::R: ToInt` is not satisfied
--> $DIR/associated-types-bound-failure.rs:17:5 --> $DIR/associated-types-bound-failure.rs:17:5
| |
LL | fn to_int(&self) -> isize;
| -------------------------- required by `ToInt::to_int`
...
LL | ToInt::to_int(&g.get()) LL | ToInt::to_int(&g.get())
| ^^^^^^^^^^^^^ the trait `ToInt` is not implemented for `<G as GetToInt>::R` | ^^^^^^^^^^^^^ the trait `ToInt` is not implemented for `<G as GetToInt>::R`
| |
= help: consider adding a `where <G as GetToInt>::R: ToInt` bound = help: consider adding a `where <G as GetToInt>::R: ToInt` bound
note: required by `ToInt::to_int`
--> $DIR/associated-types-bound-failure.rs:4:5
|
LL | fn to_int(&self) -> isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

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

View File

@ -1,124 +1,108 @@
error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize` error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:82:5 --> $DIR/associated-types-eq-hr.rs:82:5
| |
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected usize, found isize
|
= note: expected type `&usize`
found type `&isize`
note: required by `foo`
--> $DIR/associated-types-eq-hr.rs:44:1
|
LL | / fn foo<T>() LL | / fn foo<T>()
LL | | where T : for<'x> TheTrait<&'x isize, A = &'x isize> LL | | where T : for<'x> TheTrait<&'x isize, A = &'x isize>
LL | | { LL | | {
LL | | // ok for IntStruct, but not UintStruct LL | | // ok for IntStruct, but not UintStruct
LL | | } LL | | }
| |_^ | |_- required by `foo`
...
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected usize, found isize
|
= note: expected type `&usize`
found type `&isize`
error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize` error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
--> $DIR/associated-types-eq-hr.rs:86:5 --> $DIR/associated-types-eq-hr.rs:86:5
| |
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected isize, found usize
|
= note: expected type `&isize`
found type `&usize`
note: required by `bar`
--> $DIR/associated-types-eq-hr.rs:50:1
|
LL | / fn bar<T>() LL | / fn bar<T>()
LL | | where T : for<'x> TheTrait<&'x isize, A = &'x usize> LL | | where T : for<'x> TheTrait<&'x isize, A = &'x usize>
LL | | { LL | | {
LL | | // ok for UintStruct, but not IntStruct LL | | // ok for UintStruct, but not IntStruct
LL | | } LL | | }
| |_^ | |_- required by `bar`
...
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected isize, found usize
|
= note: expected type `&isize`
found type `&usize`
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:91:5 --> $DIR/associated-types-eq-hr.rs:91:5
| |
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
note: required by `tuple_one`
--> $DIR/associated-types-eq-hr.rs:56:1
|
LL | / fn tuple_one<T>() LL | / fn tuple_one<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize> LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
LL | | { LL | | {
LL | | // not ok for tuple, two lifetimes and we pick first LL | | // not ok for tuple, two lifetimes and we pick first
LL | | } LL | | }
| |_^ | |_- required by `tuple_one`
...
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'x isize` error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:91:5 --> $DIR/associated-types-eq-hr.rs:91:5
| |
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
|
note: required by `tuple_one`
--> $DIR/associated-types-eq-hr.rs:56:1
|
LL | / fn tuple_one<T>() LL | / fn tuple_one<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize> LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
LL | | { LL | | {
LL | | // not ok for tuple, two lifetimes and we pick first LL | | // not ok for tuple, two lifetimes and we pick first
LL | | } LL | | }
| |_^ | |_- required by `tuple_one`
...
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:97:5 --> $DIR/associated-types-eq-hr.rs:97:5
| |
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
note: required by `tuple_two`
--> $DIR/associated-types-eq-hr.rs:62:1
|
LL | / fn tuple_two<T>() LL | / fn tuple_two<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize> LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
LL | | { LL | | {
LL | | // not ok for tuple, two lifetimes and we pick second LL | | // not ok for tuple, two lifetimes and we pick second
LL | | } LL | | }
| |_^ | |_- required by `tuple_two`
...
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'y isize` error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'y isize`
--> $DIR/associated-types-eq-hr.rs:97:5 --> $DIR/associated-types-eq-hr.rs:97:5
| |
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
|
note: required by `tuple_two`
--> $DIR/associated-types-eq-hr.rs:62:1
|
LL | / fn tuple_two<T>() LL | / fn tuple_two<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize> LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
LL | | { LL | | {
LL | | // not ok for tuple, two lifetimes and we pick second LL | | // not ok for tuple, two lifetimes and we pick second
LL | | } LL | | }
| |_^ | |_- required by `tuple_two`
...
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:107:5 --> $DIR/associated-types-eq-hr.rs:107:5
| |
LL | tuple_four::<Tuple>();
| ^^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
note: required by `tuple_four`
--> $DIR/associated-types-eq-hr.rs:74:1
|
LL | / fn tuple_four<T>() LL | / fn tuple_four<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)> LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)>
LL | | { LL | | {
LL | | // not ok for tuple, two lifetimes, and lifetime matching is invariant LL | | // not ok for tuple, two lifetimes, and lifetime matching is invariant
LL | | } LL | | }
| |_^ | |_- required by `tuple_four`
...
LL | tuple_four::<Tuple>();
| ^^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
error: aborting due to 7 previous errors error: aborting due to 7 previous errors

View File

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

View File

@ -3,28 +3,24 @@ error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`
| |
LL | want_y(t); LL | want_y(t);
| ^^^^^^ expected associated type, found i32 | ^^^^^^ expected associated type, found i32
...
LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
| ------------------------------ required by `want_y`
| |
= note: expected type `<T as Foo>::Y` = note: expected type `<T as Foo>::Y`
found type `i32` found type `i32`
note: required by `want_y`
--> $DIR/associated-types-multiple-types-one-trait.rs:44:1
|
LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0271]: type mismatch resolving `<T as Foo>::X == u32` error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
--> $DIR/associated-types-multiple-types-one-trait.rs:18:5 --> $DIR/associated-types-multiple-types-one-trait.rs:18:5
| |
LL | want_x(t); LL | want_x(t);
| ^^^^^^ expected associated type, found u32 | ^^^^^^ expected associated type, found u32
...
LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
| ------------------------------ required by `want_x`
| |
= note: expected type `<T as Foo>::X` = note: expected type `<T as Foo>::X`
found type `u32` found type `u32`
note: required by `want_x`
--> $DIR/associated-types-multiple-types-one-trait.rs:42:1
|
LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,14 +1,10 @@
error[E0284]: type annotations required: cannot resolve `<Self as std::iter::Iterator>::Item == i32` error[E0284]: type annotations required: cannot resolve `<Self as std::iter::Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding.rs:4:1 --> $DIR/associated-types-overridden-binding.rs:4:1
| |
LL | trait Foo: Iterator<Item = i32> {}
| ------------------------------- required by `Foo`
LL | trait Bar: Foo<Item = u32> {} LL | trait Bar: Foo<Item = u32> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: required by `Foo`
--> $DIR/associated-types-overridden-binding.rs:3:1
|
LL | trait Foo: Iterator<Item = i32> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

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

View File

@ -1,16 +1,13 @@
error[E0271]: type mismatch resolving `for<'a> <&'a _ as Mirror>::Image == _` error[E0271]: type mismatch resolving `for<'a> <&'a _ as Mirror>::Image == _`
--> $DIR/higher-ranked-projection.rs:25:5 --> $DIR/higher-ranked-projection.rs:25:5
| |
LL | foo(());
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime
|
note: required by `foo`
--> $DIR/higher-ranked-projection.rs:14:1
|
LL | / fn foo<U, T>(_t: T) LL | / fn foo<U, T>(_t: T)
LL | | where for<'a> &'a T: Mirror<Image=U> LL | | where for<'a> &'a T: Mirror<Image=U>
LL | | {} LL | | {}
| |__^ | |__- required by `foo`
...
LL | foo(());
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,6 +1,9 @@
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
--> $DIR/async-fn-nonsend.rs:50:5 --> $DIR/async-fn-nonsend.rs:50:5
| |
LL | fn assert_send(_: impl Send) {}
| ---------------------------- required by `assert_send`
...
LL | assert_send(local_dropped_before_await()); LL | assert_send(local_dropped_before_await());
| ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely | ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
| |
@ -11,15 +14,13 @@ LL | assert_send(local_dropped_before_await());
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:21:39: 26:2 {impl std::fmt::Debug, impl std::future::Future, ()}]>` = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:21:39: 26:2 {impl std::fmt::Debug, impl std::future::Future, ()}]>`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
note: required by `assert_send`
--> $DIR/async-fn-nonsend.rs:47:1
|
LL | fn assert_send(_: impl Send) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
--> $DIR/async-fn-nonsend.rs:52:5 --> $DIR/async-fn-nonsend.rs:52:5
| |
LL | fn assert_send(_: impl Send) {}
| ---------------------------- required by `assert_send`
...
LL | assert_send(non_send_temporary_in_match()); LL | assert_send(non_send_temporary_in_match());
| ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely | ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
| |
@ -30,15 +31,13 @@ LL | assert_send(non_send_temporary_in_match());
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:28:40: 37:2 {fn(impl std::fmt::Debug) -> std::option::Option<impl std::fmt::Debug> {std::option::Option::<impl std::fmt::Debug>::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option<impl std::fmt::Debug>, impl std::future::Future, ()}]>` = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:28:40: 37:2 {fn(impl std::fmt::Debug) -> std::option::Option<impl std::fmt::Debug> {std::option::Option::<impl std::fmt::Debug>::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option<impl std::fmt::Debug>, impl std::future::Future, ()}]>`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
note: required by `assert_send`
--> $DIR/async-fn-nonsend.rs:47:1
|
LL | fn assert_send(_: impl Send) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `dyn std::fmt::Write` cannot be sent between threads safely error[E0277]: `dyn std::fmt::Write` cannot be sent between threads safely
--> $DIR/async-fn-nonsend.rs:54:5 --> $DIR/async-fn-nonsend.rs:54:5
| |
LL | fn assert_send(_: impl Send) {}
| ---------------------------- required by `assert_send`
...
LL | assert_send(non_sync_with_method_call()); LL | assert_send(non_sync_with_method_call());
| ^^^^^^^^^^^ `dyn std::fmt::Write` cannot be sent between threads safely | ^^^^^^^^^^^ `dyn std::fmt::Write` cannot be sent between threads safely
| |
@ -51,15 +50,13 @@ LL | assert_send(non_sync_with_method_call());
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>` = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
note: required by `assert_send`
--> $DIR/async-fn-nonsend.rs:47:1
|
LL | fn assert_send(_: impl Send) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
--> $DIR/async-fn-nonsend.rs:54:5 --> $DIR/async-fn-nonsend.rs:54:5
| |
LL | fn assert_send(_: impl Send) {}
| ---------------------------- required by `assert_send`
...
LL | assert_send(non_sync_with_method_call()); LL | assert_send(non_sync_with_method_call());
| ^^^^^^^^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely | ^^^^^^^^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
| |
@ -76,11 +73,6 @@ LL | assert_send(non_sync_with_method_call());
= note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>` = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
= note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future`
note: required by `assert_send`
--> $DIR/async-fn-nonsend.rs:47:1
|
LL | fn assert_send(_: impl Send) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View File

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

View File

@ -39,53 +39,44 @@ LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/expect-fn-supply-fn.rs:30:5 --> $DIR/expect-fn-supply-fn.rs:30:5
| |
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _`
| |
| expected signature of `fn(fn(&'a u32), &i32) -> _`
|
note: required by `with_closure_expecting_fn_with_free_region`
--> $DIR/expect-fn-supply-fn.rs:1:1
|
LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F) LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F)
LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32) LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32)
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `with_closure_expecting_fn_with_free_region`
...
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _`
| |
| expected signature of `fn(fn(&'a u32), &i32) -> _`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/expect-fn-supply-fn.rs:37:5 --> $DIR/expect-fn-supply-fn.rs:37:5
| |
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _`
| |
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
|
note: required by `with_closure_expecting_fn_with_bound_region`
--> $DIR/expect-fn-supply-fn.rs:6:1
|
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F) LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
LL | | where F: FnOnce(fn(&u32), &i32) LL | | where F: FnOnce(fn(&u32), &i32)
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `with_closure_expecting_fn_with_bound_region`
...
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _`
| |
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/expect-fn-supply-fn.rs:46:5 --> $DIR/expect-fn-supply-fn.rs:46:5
| |
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _`
| |
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
|
note: required by `with_closure_expecting_fn_with_bound_region`
--> $DIR/expect-fn-supply-fn.rs:6:1
|
LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F) LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
LL | | where F: FnOnce(fn(&u32), &i32) LL | | where F: FnOnce(fn(&u32), &i32)
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `with_closure_expecting_fn_with_bound_region`
...
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _`
| |
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _`
error: aborting due to 5 previous errors error: aborting due to 5 previous errors

View File

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

View File

@ -1,6 +1,9 @@
error[E0277]: `F` cannot be sent between threads safely error[E0277]: `F` cannot be sent between threads safely
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:1 --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:1
| |
LL | struct X<F> where F: FnOnce() + 'static + Send {
| ---------------------------------------------- required by `X`
...
LL | / fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static { LL | / fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
LL | | LL | |
LL | | return X { field: blk }; LL | | return X { field: blk };
@ -9,11 +12,6 @@ LL | | }
| |
= help: the trait `std::marker::Send` is not implemented for `F` = help: the trait `std::marker::Send` is not implemented for `F`
= help: consider adding a `where F: std::marker::Send` bound = help: consider adding a `where F: std::marker::Send` bound
note: required by `X`
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:1:1
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,16 +1,14 @@
error[E0277]: `F` cannot be shared between threads safely error[E0277]: `F` cannot be shared between threads safely
--> $DIR/closure-bounds-subtype.rs:13:5 --> $DIR/closure-bounds-subtype.rs:13:5
| |
LL | fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
| ------------------------------------------------------------ required by `take_const_owned`
...
LL | take_const_owned(f); LL | take_const_owned(f);
| ^^^^^^^^^^^^^^^^ `F` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^ `F` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `F` = help: the trait `std::marker::Sync` is not implemented for `F`
= help: consider adding a `where F: std::marker::Sync` bound = help: consider adding a `where F: std::marker::Sync` bound
note: required by `take_const_owned`
--> $DIR/closure-bounds-subtype.rs:4:1
|
LL | fn take_const_owned<F>(_: F) where F: FnOnce() + Sync + Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -14,32 +14,28 @@ LL | [5; Self::HOST_SIZE] == [6; 0]
error[E0277]: the size for values of type `A` cannot be known at compilation time error[E0277]: the size for values of type `A` cannot be known at compilation time
--> $DIR/too_generic_eval_ice.rs:7:13 --> $DIR/too_generic_eval_ice.rs:7:13
| |
LL | pub struct Foo<A, B>(A, B);
| --------------------------- required by `Foo`
...
LL | [5; Self::HOST_SIZE] == [6; 0] LL | [5; Self::HOST_SIZE] == [6; 0]
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| |
= help: the trait `std::marker::Sized` is not implemented for `A` = help: the trait `std::marker::Sized` is not implemented for `A`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= help: consider adding a `where A: std::marker::Sized` bound = help: consider adding a `where A: std::marker::Sized` bound
note: required by `Foo`
--> $DIR/too_generic_eval_ice.rs:1:1
|
LL | pub struct Foo<A, B>(A, B);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type `B` cannot be known at compilation time error[E0277]: the size for values of type `B` cannot be known at compilation time
--> $DIR/too_generic_eval_ice.rs:7:13 --> $DIR/too_generic_eval_ice.rs:7:13
| |
LL | pub struct Foo<A, B>(A, B);
| --------------------------- required by `Foo`
...
LL | [5; Self::HOST_SIZE] == [6; 0] LL | [5; Self::HOST_SIZE] == [6; 0]
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| |
= help: the trait `std::marker::Sized` is not implemented for `B` = help: the trait `std::marker::Sized` is not implemented for `B`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= help: consider adding a `where B: std::marker::Sized` bound = help: consider adding a `where B: std::marker::Sized` bound
note: required by `Foo`
--> $DIR/too_generic_eval_ice.rs:1:1
|
LL | pub struct Foo<A, B>(A, B);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -1,15 +1,13 @@
error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied
--> $DIR/defaulted-never-note.rs:26:5 --> $DIR/defaulted-never-note.rs:26:5
| |
LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
| ----------------------------------------------- required by `foo`
...
LL | foo(_x); LL | foo(_x);
| ^^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!` | ^^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!`
| |
= note: the trait is implemented for `()`. Possibly this error has been caused by changes to Rust's type-inference algorithm (see: https://github.com/rust-lang/rust/issues/48950 for more info). Consider whether you meant to use the type `()` here instead. = note: the trait is implemented for `()`. Possibly this error has been caused by changes to Rust's type-inference algorithm (see: https://github.com/rust-lang/rust/issues/48950 for more info). Consider whether you meant to use the type `()` here instead.
note: required by `foo`
--> $DIR/defaulted-never-note.rs:21:1
|
LL | fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,41 +1,35 @@
error[E0277]: the trait bound `C: std::marker::Copy` is not satisfied error[E0277]: the trait bound `C: std::marker::Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:31:5 --> $DIR/deriving-copyclone.rs:31:5
| |
LL | fn is_copy<T: Copy>(_: T) {}
| ------------------------- required by `is_copy`
...
LL | is_copy(B { a: 1, b: C }); LL | is_copy(B { a: 1, b: C });
| ^^^^^^^ the trait `std::marker::Copy` is not implemented for `C` | ^^^^^^^ the trait `std::marker::Copy` is not implemented for `C`
| |
= note: required because of the requirements on the impl of `std::marker::Copy` for `B<C>` = note: required because of the requirements on the impl of `std::marker::Copy` for `B<C>`
note: required by `is_copy`
--> $DIR/deriving-copyclone.rs:18:1
|
LL | fn is_copy<T: Copy>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `C: std::clone::Clone` is not satisfied error[E0277]: the trait bound `C: std::clone::Clone` is not satisfied
--> $DIR/deriving-copyclone.rs:32:5 --> $DIR/deriving-copyclone.rs:32:5
| |
LL | fn is_clone<T: Clone>(_: T) {}
| --------------------------- required by `is_clone`
...
LL | is_clone(B { a: 1, b: C }); LL | is_clone(B { a: 1, b: C });
| ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `C` | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `C`
| |
= note: required because of the requirements on the impl of `std::clone::Clone` for `B<C>` = note: required because of the requirements on the impl of `std::clone::Clone` for `B<C>`
note: required by `is_clone`
--> $DIR/deriving-copyclone.rs:19:1
|
LL | fn is_clone<T: Clone>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `D: std::marker::Copy` is not satisfied error[E0277]: the trait bound `D: std::marker::Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:35:5 --> $DIR/deriving-copyclone.rs:35:5
| |
LL | fn is_copy<T: Copy>(_: T) {}
| ------------------------- required by `is_copy`
...
LL | is_copy(B { a: 1, b: D }); LL | is_copy(B { a: 1, b: D });
| ^^^^^^^ the trait `std::marker::Copy` is not implemented for `D` | ^^^^^^^ the trait `std::marker::Copy` is not implemented for `D`
| |
= note: required because of the requirements on the impl of `std::marker::Copy` for `B<D>` = note: required because of the requirements on the impl of `std::marker::Copy` for `B<D>`
note: required by `is_copy`
--> $DIR/deriving-copyclone.rs:18:1
|
LL | fn is_copy<T: Copy>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -1,6 +1,9 @@
error[E0277]: the trait bound `i8: Foo<i32>` is not satisfied error[E0277]: the trait bound `i8: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:24:5 --> $DIR/issue-39802-show-5-trait-impls.rs:24:5
| |
LL | fn bar(&self){}
| ------------- required by `Foo::bar`
...
LL | Foo::<i32>::bar(&1i8); LL | Foo::<i32>::bar(&1i8);
| ^^^^^^^^^^^^^^^ the trait `Foo<i32>` is not implemented for `i8` | ^^^^^^^^^^^^^^^ the trait `Foo<i32>` is not implemented for `i8`
| |
@ -10,15 +13,13 @@ LL | Foo::<i32>::bar(&1i8);
<i8 as Foo<u32>> <i8 as Foo<u32>>
<i8 as Foo<u64>> <i8 as Foo<u64>>
<i8 as Foo<u8>> <i8 as Foo<u8>>
note: required by `Foo::bar`
--> $DIR/issue-39802-show-5-trait-impls.rs:2:5
|
LL | fn bar(&self){}
| ^^^^^^^^^^^^^
error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:25:5 --> $DIR/issue-39802-show-5-trait-impls.rs:25:5
| |
LL | fn bar(&self){}
| ------------- required by `Foo::bar`
...
LL | Foo::<i32>::bar(&1u8); LL | Foo::<i32>::bar(&1u8);
| ^^^^^^^^^^^^^^^ the trait `Foo<i32>` is not implemented for `u8` | ^^^^^^^^^^^^^^^ the trait `Foo<i32>` is not implemented for `u8`
| |
@ -27,15 +28,13 @@ LL | Foo::<i32>::bar(&1u8);
<u8 as Foo<u16>> <u8 as Foo<u16>>
<u8 as Foo<u32>> <u8 as Foo<u32>>
<u8 as Foo<u64>> <u8 as Foo<u64>>
note: required by `Foo::bar`
--> $DIR/issue-39802-show-5-trait-impls.rs:2:5
|
LL | fn bar(&self){}
| ^^^^^^^^^^^^^
error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied error[E0277]: the trait bound `bool: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:26:5 --> $DIR/issue-39802-show-5-trait-impls.rs:26:5
| |
LL | fn bar(&self){}
| ------------- required by `Foo::bar`
...
LL | Foo::<i32>::bar(&true); LL | Foo::<i32>::bar(&true);
| ^^^^^^^^^^^^^^^ the trait `Foo<i32>` is not implemented for `bool` | ^^^^^^^^^^^^^^^ the trait `Foo<i32>` is not implemented for `bool`
| |
@ -45,11 +44,6 @@ LL | Foo::<i32>::bar(&true);
<bool as Foo<u16>> <bool as Foo<u16>>
<bool as Foo<u32>> <bool as Foo<u32>>
and 2 others and 2 others
note: required by `Foo::bar`
--> $DIR/issue-39802-show-5-trait-impls.rs:2:5
|
LL | fn bar(&self){}
| ^^^^^^^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -1,6 +1,9 @@
error[E0275]: overflow evaluating the requirement `J: std::marker::Send` error[E0275]: overflow evaluating the requirement `J: std::marker::Send`
--> $DIR/recursion_limit.rs:34:5 --> $DIR/recursion_limit.rs:34:5
| |
LL | fn is_send<T:Send>() { }
| -------------------- required by `is_send`
...
LL | is_send::<A>(); LL | is_send::<A>();
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
| |
@ -14,11 +17,6 @@ LL | is_send::<A>();
= note: required because it appears within the type `C` = note: required because it appears within the type `C`
= note: required because it appears within the type `B` = note: required because it appears within the type `B`
= note: required because it appears within the type `A` = note: required because it appears within the type `A`
note: required by `is_send`
--> $DIR/recursion_limit.rs:31:1
|
LL | fn is_send<T:Send>() { }
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

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

View File

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

View File

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

View File

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

View File

@ -1,14 +1,11 @@
error[E0283]: type annotations required: cannot resolve `_: Generator` error[E0283]: type annotations required: cannot resolve `_: Generator`
--> $DIR/E0283.rs:18:21 --> $DIR/E0283.rs:18:21
| |
LL | fn create() -> u32;
| ------------------- required by `Generator::create`
...
LL | let cont: u32 = Generator::create(); LL | let cont: u32 = Generator::create();
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
|
note: required by `Generator::create`
--> $DIR/E0283.rs:2:5
|
LL | fn create() -> u32;
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
--> $DIR/error-should-say-copy-not-pod.rs:6:5 --> $DIR/error-should-say-copy-not-pod.rs:6:5
| |
LL | fn check_bound<T:Copy>(_: T) {}
| ---------------------------- required by `check_bound`
...
LL | check_bound("nocopy".to_string()); LL | check_bound("nocopy".to_string());
| ^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` | ^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
|
note: required by `check_bound`
--> $DIR/error-should-say-copy-not-pod.rs:3:1
|
LL | fn check_bound<T:Copy>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,28 +1,24 @@
error[E0277]: `A` cannot be shared between threads safely error[E0277]: `A` cannot be shared between threads safely
--> $DIR/extern-types-not-sync-send.rs:13:5 --> $DIR/extern-types-not-sync-send.rs:13:5
| |
LL | fn assert_sync<T: ?Sized + Sync>() { }
| ---------------------------------- required by `assert_sync`
...
LL | assert_sync::<A>(); LL | assert_sync::<A>();
| ^^^^^^^^^^^^^^^^ `A` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^ `A` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `A` = help: the trait `std::marker::Sync` is not implemented for `A`
note: required by `assert_sync`
--> $DIR/extern-types-not-sync-send.rs:9:1
|
LL | fn assert_sync<T: ?Sized + Sync>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `A` cannot be sent between threads safely error[E0277]: `A` cannot be sent between threads safely
--> $DIR/extern-types-not-sync-send.rs:16:5 --> $DIR/extern-types-not-sync-send.rs:16:5
| |
LL | fn assert_send<T: ?Sized + Send>() { }
| ---------------------------------- required by `assert_send`
...
LL | assert_send::<A>(); LL | assert_send::<A>();
| ^^^^^^^^^^^^^^^^ `A` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^ `A` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `A` = help: the trait `std::marker::Send` is not implemented for `A`
note: required by `assert_send`
--> $DIR/extern-types-not-sync-send.rs:10:1
|
LL | fn assert_send<T: ?Sized + Send>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,50 +1,47 @@
error[E0277]: the size for values of type `A` cannot be known at compilation time error[E0277]: the size for values of type `A` cannot be known at compilation time
--> $DIR/extern-types-unsized.rs:22:5 --> $DIR/extern-types-unsized.rs:22:5
| |
LL | fn assert_sized<T>() { }
| -------------------- required by `assert_sized`
...
LL | assert_sized::<A>(); LL | assert_sized::<A>();
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| |
= help: the trait `std::marker::Sized` is not implemented for `A` = help: the trait `std::marker::Sized` is not implemented for `A`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
note: required by `assert_sized`
--> $DIR/extern-types-unsized.rs:19:1
|
LL | fn assert_sized<T>() { }
| ^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type `A` cannot be known at compilation time error[E0277]: the size for values of type `A` cannot be known at compilation time
--> $DIR/extern-types-unsized.rs:25:5 --> $DIR/extern-types-unsized.rs:25:5
| |
LL | fn assert_sized<T>() { }
| -------------------- required by `assert_sized`
...
LL | assert_sized::<Foo>(); LL | assert_sized::<Foo>();
| ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| |
= help: within `Foo`, the trait `std::marker::Sized` is not implemented for `A` = help: within `Foo`, the trait `std::marker::Sized` is not implemented for `A`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required because it appears within the type `Foo` = note: required because it appears within the type `Foo`
note: required by `assert_sized`
--> $DIR/extern-types-unsized.rs:19:1
|
LL | fn assert_sized<T>() { }
| ^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type `A` cannot be known at compilation time error[E0277]: the size for values of type `A` cannot be known at compilation time
--> $DIR/extern-types-unsized.rs:28:5 --> $DIR/extern-types-unsized.rs:28:5
| |
LL | fn assert_sized<T>() { }
| -------------------- required by `assert_sized`
...
LL | assert_sized::<Bar<A>>(); LL | assert_sized::<Bar<A>>();
| ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| |
= help: within `Bar<A>`, the trait `std::marker::Sized` is not implemented for `A` = help: within `Bar<A>`, the trait `std::marker::Sized` is not implemented for `A`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required because it appears within the type `Bar<A>` = note: required because it appears within the type `Bar<A>`
note: required by `assert_sized`
--> $DIR/extern-types-unsized.rs:19:1
|
LL | fn assert_sized<T>() { }
| ^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type `A` cannot be known at compilation time error[E0277]: the size for values of type `A` cannot be known at compilation time
--> $DIR/extern-types-unsized.rs:31:5 --> $DIR/extern-types-unsized.rs:31:5
| |
LL | fn assert_sized<T>() { }
| -------------------- required by `assert_sized`
...
LL | assert_sized::<Bar<Bar<A>>>(); LL | assert_sized::<Bar<Bar<A>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| |
@ -52,11 +49,6 @@ LL | assert_sized::<Bar<Bar<A>>>();
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= note: required because it appears within the type `Bar<A>` = note: required because it appears within the type `Bar<A>`
= note: required because it appears within the type `Bar<Bar<A>>` = note: required because it appears within the type `Bar<Bar<A>>`
note: required by `assert_sized`
--> $DIR/extern-types-unsized.rs:19:1
|
LL | fn assert_sized<T>() { }
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View File

@ -1,16 +1,14 @@
error[E0277]: expected a `std::ops::Fn<()>` closure, found `extern "C" fn() {f}` error[E0277]: expected a `std::ops::Fn<()>` closure, found `extern "C" fn() {f}`
--> $DIR/extern-wrong-value-type.rs:9:5 --> $DIR/extern-wrong-value-type.rs:9:5
| |
LL | fn is_fn<F>(_: F) where F: Fn() {}
| ------------------------------- required by `is_fn`
...
LL | is_fn(f); LL | is_fn(f);
| ^^^^^ expected an `Fn<()>` closure, found `extern "C" fn() {f}` | ^^^^^ expected an `Fn<()>` closure, found `extern "C" fn() {f}`
| |
= help: the trait `std::ops::Fn<()>` is not implemented for `extern "C" fn() {f}` = help: the trait `std::ops::Fn<()>` is not implemented for `extern "C" fn() {f}`
= note: wrap the `extern "C" fn() {f}` in a closure with no arguments: `|| { /* code */ } = note: wrap the `extern "C" fn() {f}` in a closure with no arguments: `|| { /* code */ }
note: required by `is_fn`
--> $DIR/extern-wrong-value-type.rs:4:1
|
LL | fn is_fn<F>(_: F) where F: Fn() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,6 +1,9 @@
error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
--> $DIR/send-sync.rs:8:5 --> $DIR/send-sync.rs:8:5
| |
LL | fn send<T: Send>(_: T) {}
| ---------------------- required by `send`
...
LL | send(format_args!("{:?}", c)); LL | send(format_args!("{:?}", c));
| ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely | ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
| |
@ -12,15 +15,13 @@ LL | send(format_args!("{:?}", c));
= note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]` = note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]`
= note: required because of the requirements on the impl of `std::marker::Send` for `&[std::fmt::ArgumentV1<'_>]` = note: required because of the requirements on the impl of `std::marker::Send` for `&[std::fmt::ArgumentV1<'_>]`
= note: required because it appears within the type `std::fmt::Arguments<'_>` = note: required because it appears within the type `std::fmt::Arguments<'_>`
note: required by `send`
--> $DIR/send-sync.rs:1:1
|
LL | fn send<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
--> $DIR/send-sync.rs:9:5 --> $DIR/send-sync.rs:9:5
| |
LL | fn sync<T: Sync>(_: T) {}
| ---------------------- required by `sync`
...
LL | sync(format_args!("{:?}", c)); LL | sync(format_args!("{:?}", c));
| ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely | ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely
| |
@ -32,11 +33,6 @@ LL | sync(format_args!("{:?}", c));
= note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]` = note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]`
= note: required because it appears within the type `&[std::fmt::ArgumentV1<'_>]` = note: required because it appears within the type `&[std::fmt::ArgumentV1<'_>]`
= note: required because it appears within the type `std::fmt::Arguments<'_>` = note: required because it appears within the type `std::fmt::Arguments<'_>`
note: required by `sync`
--> $DIR/send-sync.rs:2:1
|
LL | fn sync<T: Sync>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -28,15 +28,13 @@ LL | let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -
error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `{integer}` error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `{integer}`
--> $DIR/fn-trait-formatting.rs:19:5 --> $DIR/fn-trait-formatting.rs:19:5
| |
LL | fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
| ------------------------------------------------ required by `needs_fn`
...
LL | needs_fn(1); LL | needs_fn(1);
| ^^^^^^^^ expected an `Fn<(isize,)>` closure, found `{integer}` | ^^^^^^^^ expected an `Fn<(isize,)>` closure, found `{integer}`
| |
= help: the trait `std::ops::Fn<(isize,)>` is not implemented for `{integer}` = help: the trait `std::ops::Fn<(isize,)>` is not implemented for `{integer}`
note: required by `needs_fn`
--> $DIR/fn-trait-formatting.rs:3:1
|
LL | fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View File

@ -16,20 +16,18 @@ LL | | })
error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _] as std::ops::Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _]` error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _] as std::ops::Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _]`
--> $DIR/generator-yielding-or-returning-itself.rs:28:5 --> $DIR/generator-yielding-or-returning-itself.rs:28:5
| |
LL | want_cyclic_generator_yield(|| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size
|
= note: closures cannot capture themselves or take themselves as argument;
this error may be the result of a recent compiler bug-fix,
see https://github.com/rust-lang/rust/issues/46062 for more details
note: required by `want_cyclic_generator_yield`
--> $DIR/generator-yielding-or-returning-itself.rs:22:1
|
LL | / pub fn want_cyclic_generator_yield<T>(_: T) LL | / pub fn want_cyclic_generator_yield<T>(_: T)
LL | | where T: Generator<Yield = T, Return = ()> LL | | where T: Generator<Yield = T, Return = ()>
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `want_cyclic_generator_yield`
...
LL | want_cyclic_generator_yield(|| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size
|
= note: closures cannot capture themselves or take themselves as argument;
this error may be the result of a recent compiler bug-fix,
see https://github.com/rust-lang/rust/issues/46062 for more details
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,32 +1,28 @@
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/not-send-sync.rs:16:5 --> $DIR/not-send-sync.rs:16:5
| |
LL | fn assert_send<T: Send>(_: T) {}
| ----------------------------- required by `main::assert_send`
...
LL | assert_send(|| { LL | assert_send(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely | ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::cell::Cell<i32>` = note: required because of the requirements on the impl of `std::marker::Send` for `&std::cell::Cell<i32>`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:16:17: 20:6 a:&std::cell::Cell<i32> _]` = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:16:17: 20:6 a:&std::cell::Cell<i32> _]`
note: required by `main::assert_send`
--> $DIR/not-send-sync.rs:7:5
|
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/not-send-sync.rs:9:5 --> $DIR/not-send-sync.rs:9:5
| |
LL | fn assert_sync<T: Sync>(_: T) {}
| ----------------------------- required by `main::assert_sync`
...
LL | assert_sync(|| { LL | assert_sync(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely | ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
| |
= help: within `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>` = help: within `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because it appears within the type `{std::cell::Cell<i32>, ()}` = note: required because it appears within the type `{std::cell::Cell<i32>, ()}`
= note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]` = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell<i32>, ()}]`
note: required by `main::assert_sync`
--> $DIR/not-send-sync.rs:6:5
|
LL | fn assert_sync<T: Sync>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]: std::marker::Unpin` is not satisfied error[E0277]: the trait bound `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]: std::marker::Unpin` is not satisfied
--> $DIR/static-not-unpin.rs:14:5 --> $DIR/static-not-unpin.rs:14:5
| |
LL | fn assert_unpin<T: Unpin>(_: T) {
| ------------------------------- required by `assert_unpin`
...
LL | assert_unpin(generator); LL | assert_unpin(generator);
| ^^^^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]` | ^^^^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]`
|
note: required by `assert_unpin`
--> $DIR/static-not-unpin.rs:7:1
|
LL | fn assert_unpin<T: Unpin>(_: T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,19 +1,17 @@
error[E0277]: the trait bound `for<'a, 'b> SomeStruct: Foo<(&'a isize, &'b isize)>` is not satisfied error[E0277]: the trait bound `for<'a, 'b> SomeStruct: Foo<(&'a isize, &'b isize)>` is not satisfied
--> $DIR/hrtb-conflate-regions.rs:27:10 --> $DIR/hrtb-conflate-regions.rs:27:10
| |
LL | fn b() { want_foo2::<SomeStruct>(); }
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct`
|
= help: the following implementations were found:
<SomeStruct as Foo<(&'a isize, &'a isize)>>
note: required by `want_foo2`
--> $DIR/hrtb-conflate-regions.rs:8:1
|
LL | / fn want_foo2<T>() LL | / fn want_foo2<T>()
LL | | where T : for<'a,'b> Foo<(&'a isize, &'b isize)> LL | | where T : for<'a,'b> Foo<(&'a isize, &'b isize)>
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `want_foo2`
...
LL | fn b() { want_foo2::<SomeStruct>(); }
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct`
|
= help: the following implementations were found:
<SomeStruct as Foo<(&'a isize, &'a isize)>>
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,20 +1,18 @@
error[E0277]: the trait bound `(): Trait<for<'b> fn(&'b u32)>` is not satisfied error[E0277]: the trait bound `(): Trait<for<'b> fn(&'b u32)>` is not satisfied
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5 --> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5
| |
LL | foo::<()>();
| ^^^^^^^^^ the trait `Trait<for<'b> fn(&'b u32)>` is not implemented for `()`
|
= help: the following implementations were found:
<() as Trait<fn(&'a u32)>>
note: required by `foo`
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:8:1
|
LL | / fn foo<T>() LL | / fn foo<T>()
LL | | where LL | | where
LL | | T: Trait<for<'b> fn(&'b u32)>, LL | | T: Trait<for<'b> fn(&'b u32)>,
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `foo`
...
LL | foo::<()>();
| ^^^^^^^^^ the trait `Trait<for<'b> fn(&'b u32)>` is not implemented for `()`
|
= help: the following implementations were found:
<() as Trait<fn(&'a u32)>>
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,20 +1,18 @@
error[E0277]: the trait bound `(): Trait<for<'b> fn(fn(&'b u32))>` is not satisfied error[E0277]: the trait bound `(): Trait<for<'b> fn(fn(&'b u32))>` is not satisfied
--> $DIR/hrtb-exists-forall-trait-covariant.rs:36:5 --> $DIR/hrtb-exists-forall-trait-covariant.rs:36:5
| |
LL | foo::<()>();
| ^^^^^^^^^ the trait `Trait<for<'b> fn(fn(&'b u32))>` is not implemented for `()`
|
= help: the following implementations were found:
<() as Trait<fn(fn(&'a u32))>>
note: required by `foo`
--> $DIR/hrtb-exists-forall-trait-covariant.rs:8:1
|
LL | / fn foo<T>() LL | / fn foo<T>()
LL | | where LL | | where
LL | | T: Trait<for<'b> fn(fn(&'b u32))>, LL | | T: Trait<for<'b> fn(fn(&'b u32))>,
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `foo`
...
LL | foo::<()>();
| ^^^^^^^^^ the trait `Trait<for<'b> fn(fn(&'b u32))>` is not implemented for `()`
|
= help: the following implementations were found:
<() as Trait<fn(fn(&'a u32))>>
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,20 +1,18 @@
error[E0277]: the trait bound `(): Trait<for<'b> fn(std::cell::Cell<&'b u32>)>` is not satisfied error[E0277]: the trait bound `(): Trait<for<'b> fn(std::cell::Cell<&'b u32>)>` is not satisfied
--> $DIR/hrtb-exists-forall-trait-invariant.rs:28:5 --> $DIR/hrtb-exists-forall-trait-invariant.rs:28:5
| |
LL | foo::<()>();
| ^^^^^^^^^ the trait `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>` is not implemented for `()`
|
= help: the following implementations were found:
<() as Trait<fn(std::cell::Cell<&'a u32>)>>
note: required by `foo`
--> $DIR/hrtb-exists-forall-trait-invariant.rs:10:1
|
LL | / fn foo<T>() LL | / fn foo<T>()
LL | | where LL | | where
LL | | T: Trait<for<'b> fn(Cell<&'b u32>)>, LL | | T: Trait<for<'b> fn(Cell<&'b u32>)>,
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `foo`
...
LL | foo::<()>();
| ^^^^^^^^^ the trait `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>` is not implemented for `()`
|
= help: the following implementations were found:
<() as Trait<fn(std::cell::Cell<&'a u32>)>>
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,18 +1,16 @@
error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied
--> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:5 --> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:5
| |
LL | want_bar_for_any_ccx(b);
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
|
= help: consider adding a `where for<'ccx> B: Bar<'ccx>` bound
note: required by `want_bar_for_any_ccx`
--> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:31:1
|
LL | / fn want_bar_for_any_ccx<B>(b: &B) LL | / fn want_bar_for_any_ccx<B>(b: &B)
LL | | where B : for<'ccx> Bar<'ccx> LL | | where B : for<'ccx> Bar<'ccx>
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `want_bar_for_any_ccx`
...
LL | want_bar_for_any_ccx(b);
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
|
= help: consider adding a `where for<'ccx> B: Bar<'ccx>` bound
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,31 +1,25 @@
error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied
--> $DIR/hrtb-higher-ranker-supertraits.rs:18:5 --> $DIR/hrtb-higher-ranker-supertraits.rs:18:5
| |
LL | want_foo_for_any_tcx(f); LL | want_foo_for_any_tcx(f);
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F` | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
| ...
= help: consider adding a `where for<'tcx> F: Foo<'tcx>` bound
note: required by `want_foo_for_any_tcx`
--> $DIR/hrtb-higher-ranker-supertraits.rs:21:1
|
LL | / fn want_foo_for_any_tcx<F>(f: &F) LL | / fn want_foo_for_any_tcx<F>(f: &F)
LL | | where F : for<'tcx> Foo<'tcx> LL | | where F : for<'tcx> Foo<'tcx>
LL | | { LL | | {
LL | | want_foo_for_some_tcx(f); LL | | want_foo_for_some_tcx(f);
LL | | want_foo_for_any_tcx(f); LL | | want_foo_for_any_tcx(f);
LL | | } LL | | }
| |_^ | |_- required by `want_foo_for_any_tcx`
|
= help: consider adding a `where for<'tcx> F: Foo<'tcx>` bound
error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied
--> $DIR/hrtb-higher-ranker-supertraits.rs:35:5 --> $DIR/hrtb-higher-ranker-supertraits.rs:35:5
| |
LL | want_bar_for_any_ccx(b); LL | want_bar_for_any_ccx(b);
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
| ...
= help: consider adding a `where for<'ccx> B: Bar<'ccx>` bound
note: required by `want_bar_for_any_ccx`
--> $DIR/hrtb-higher-ranker-supertraits.rs:38:1
|
LL | / fn want_bar_for_any_ccx<B>(b: &B) LL | / fn want_bar_for_any_ccx<B>(b: &B)
LL | | where B : for<'ccx> Bar<'ccx> LL | | where B : for<'ccx> Bar<'ccx>
LL | | { LL | | {
@ -33,7 +27,9 @@ LL | | want_foo_for_some_tcx(b);
... | ... |
LL | | want_bar_for_any_ccx(b); LL | | want_bar_for_any_ccx(b);
LL | | } LL | | }
| |_^ | |_- required by `want_bar_for_any_ccx`
|
= help: consider adding a `where for<'ccx> B: Bar<'ccx>` bound
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,36 +1,32 @@
error[E0277]: the trait bound `for<'a> StaticInt: Foo<&'a isize>` is not satisfied error[E0277]: the trait bound `for<'a> StaticInt: Foo<&'a isize>` is not satisfied
--> $DIR/hrtb-just-for-static.rs:24:5 --> $DIR/hrtb-just-for-static.rs:24:5
| |
LL | want_hrtb::<StaticInt>()
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `StaticInt`
|
= help: the following implementations were found:
<StaticInt as Foo<&'static isize>>
note: required by `want_hrtb`
--> $DIR/hrtb-just-for-static.rs:8:1
|
LL | / fn want_hrtb<T>() LL | / fn want_hrtb<T>()
LL | | where T : for<'a> Foo<&'a isize> LL | | where T : for<'a> Foo<&'a isize>
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `want_hrtb`
...
LL | want_hrtb::<StaticInt>()
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `StaticInt`
|
= help: the following implementations were found:
<StaticInt as Foo<&'static isize>>
error[E0277]: the trait bound `for<'a> &'a u32: Foo<&'a isize>` is not satisfied error[E0277]: the trait bound `for<'a> &'a u32: Foo<&'a isize>` is not satisfied
--> $DIR/hrtb-just-for-static.rs:30:5 --> $DIR/hrtb-just-for-static.rs:30:5
| |
LL | want_hrtb::<&'a u32>()
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `&'a u32`
|
= help: the following implementations were found:
<&'a u32 as Foo<&'a isize>>
note: required by `want_hrtb`
--> $DIR/hrtb-just-for-static.rs:8:1
|
LL | / fn want_hrtb<T>() LL | / fn want_hrtb<T>()
LL | | where T : for<'a> Foo<&'a isize> LL | | where T : for<'a> Foo<&'a isize>
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `want_hrtb`
...
LL | want_hrtb::<&'a u32>()
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `&'a u32`
|
= help: the following implementations were found:
<&'a u32 as Foo<&'a isize>>
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,16 +1,14 @@
error[E0277]: the trait bound `for<'r> fn(&'r i32): Foo` is not satisfied error[E0277]: the trait bound `for<'r> fn(&'r i32): Foo` is not satisfied
--> $DIR/issue-46989.rs:40:5 --> $DIR/issue-46989.rs:40:5
| |
LL | fn assert_foo<T: Foo>() {}
| ----------------------- required by `assert_foo`
...
LL | assert_foo::<fn(&i32)>(); LL | assert_foo::<fn(&i32)>();
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'r> fn(&'r i32)` | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'r> fn(&'r i32)`
| |
= help: the following implementations were found: = help: the following implementations were found:
<fn(A) as Foo> <fn(A) as Foo>
note: required by `assert_foo`
--> $DIR/issue-46989.rs:37:1
|
LL | fn assert_foo<T: Foo>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -72,16 +72,14 @@ LL | | }
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
--> $DIR/auto-trait-leak.rs:15:5 --> $DIR/auto-trait-leak.rs:15:5
| |
LL | fn send<T: Send>(_: T) {}
| ---------------------- required by `send`
...
LL | send(cycle2().clone()); LL | send(cycle2().clone());
| ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely | ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely
| |
= help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>` = help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>`
= note: required because it appears within the type `impl std::clone::Clone` = note: required because it appears within the type `impl std::clone::Clone`
note: required by `send`
--> $DIR/auto-trait-leak.rs:4:1
|
LL | fn send<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -1,32 +1,28 @@
error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
--> $DIR/auto-trait-leak2.rs:13:5 --> $DIR/auto-trait-leak2.rs:13:5
| |
LL | fn send<T: Send>(_: T) {}
| ---------------------- required by `send`
...
LL | send(before()); LL | send(before());
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
| |
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc<std::cell::Cell<i32>>]` = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>` = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
note: required by `send`
--> $DIR/auto-trait-leak2.rs:10:1
|
LL | fn send<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
--> $DIR/auto-trait-leak2.rs:16:5 --> $DIR/auto-trait-leak2.rs:16:5
| |
LL | fn send<T: Send>(_: T) {}
| ---------------------- required by `send`
...
LL | send(after()); LL | send(after());
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
| |
= help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`
= note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc<std::cell::Cell<i32>>]` = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc<std::cell::Cell<i32>>]`
= note: required because it appears within the type `impl std::ops::Fn<(i32,)>` = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`
note: required by `send`
--> $DIR/auto-trait-leak2.rs:10:1
|
LL | fn send<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `foo::issue_1920::S: std::clone::Clone` is not satisfied error[E0277]: the trait bound `foo::issue_1920::S: std::clone::Clone` is not satisfied
--> $DIR/issue-1920-1.rs:12:5 --> $DIR/issue-1920-1.rs:12:5
| |
LL | fn assert_clone<T>() where T : Clone { }
| ------------------------------------ required by `assert_clone`
...
LL | assert_clone::<foo::issue_1920::S>(); LL | assert_clone::<foo::issue_1920::S>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `foo::issue_1920::S` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `foo::issue_1920::S`
|
note: required by `assert_clone`
--> $DIR/issue-1920-1.rs:9:1
|
LL | fn assert_clone<T>() where T : Clone { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `bar::S: std::clone::Clone` is not satisfied error[E0277]: the trait bound `bar::S: std::clone::Clone` is not satisfied
--> $DIR/issue-1920-2.rs:10:5 --> $DIR/issue-1920-2.rs:10:5
| |
LL | fn assert_clone<T>() where T : Clone { }
| ------------------------------------ required by `assert_clone`
...
LL | assert_clone::<bar::S>(); LL | assert_clone::<bar::S>();
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `bar::S` | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `bar::S`
|
note: required by `assert_clone`
--> $DIR/issue-1920-2.rs:7:1
|
LL | fn assert_clone<T>() where T : Clone { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `issue_1920::S: std::clone::Clone` is not satisfied error[E0277]: the trait bound `issue_1920::S: std::clone::Clone` is not satisfied
--> $DIR/issue-1920-3.rs:14:5 --> $DIR/issue-1920-3.rs:14:5
| |
LL | fn assert_clone<T>() where T : Clone { }
| ------------------------------------ required by `assert_clone`
...
LL | assert_clone::<foo::issue_1920::S>(); LL | assert_clone::<foo::issue_1920::S>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `issue_1920::S` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `issue_1920::S`
|
note: required by `assert_clone`
--> $DIR/issue-1920-3.rs:11:1
|
LL | fn assert_clone<T>() where T : Clone { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,6 +1,9 @@
error[E0277]: the size for values of type `Self` cannot be known at compilation time error[E0277]: the size for values of type `Self` cannot be known at compilation time
--> $DIR/issue-20005.rs:8:5 --> $DIR/issue-20005.rs:8:5
| |
LL | trait From<Src> {
| --------------- required by `From`
...
LL | / fn to<Dst>( LL | / fn to<Dst>(
LL | | self LL | | self
LL | | ) -> <Dst as From<Self>>::Result where Dst: From<Self> { LL | | ) -> <Dst as From<Self>>::Result where Dst: From<Self> {
@ -11,11 +14,6 @@ LL | | }
= help: the trait `std::marker::Sized` is not implemented for `Self` = help: the trait `std::marker::Sized` is not implemented for `Self`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
= help: consider adding a `where Self: std::marker::Sized` bound = help: consider adding a `where Self: std::marker::Sized` bound
note: required by `From`
--> $DIR/issue-20005.rs:1:1
|
LL | trait From<Src> {
| ^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -9,6 +9,9 @@ LL | struct NoData<T>;
error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo`
--> $DIR/issue-20413.rs:8:1 --> $DIR/issue-20413.rs:8:1
| |
LL | trait Foo {
| --------- required by `Foo`
...
LL | / impl<T> Foo for T where NoData<T>: Foo { LL | / impl<T> Foo for T where NoData<T>: Foo {
LL | | LL | |
LL | | fn answer(self) { LL | | fn answer(self) {
@ -146,15 +149,13 @@ LL | | }
= note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<T>>>` = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<T>>>`
= note: required because of the requirements on the impl of `Foo` for `NoData<NoData<T>>` = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<T>>`
= note: required because of the requirements on the impl of `Foo` for `NoData<T>` = note: required because of the requirements on the impl of `Foo` for `NoData<T>`
note: required by `Foo`
--> $DIR/issue-20413.rs:1:1
|
LL | trait Foo {
| ^^^^^^^^^
error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo`
--> $DIR/issue-20413.rs:10:3 --> $DIR/issue-20413.rs:10:3
| |
LL | trait Foo {
| --------- required by `Foo`
...
LL | / fn answer(self) { LL | / fn answer(self) {
LL | | LL | |
LL | | let val: NoData<T> = NoData; LL | | let val: NoData<T> = NoData;
@ -289,11 +290,6 @@ LL | | }
= note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<T>>>` = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<NoData<T>>>`
= note: required because of the requirements on the impl of `Foo` for `NoData<NoData<T>>` = note: required because of the requirements on the impl of `Foo` for `NoData<NoData<T>>`
= note: required because of the requirements on the impl of `Foo` for `NoData<T>` = note: required because of the requirements on the impl of `Foo` for `NoData<T>`
note: required by `Foo`
--> $DIR/issue-20413.rs:1:1
|
LL | trait Foo {
| ^^^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -1,6 +1,9 @@
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
--> $DIR/issue-21763.rs:9:5 --> $DIR/issue-21763.rs:9:5
| |
LL | fn foo<T: Send>() {}
| ----------------- required by `foo`
...
LL | foo::<HashMap<Rc<()>, Rc<()>>>(); LL | foo::<HashMap<Rc<()>, Rc<()>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
| |
@ -9,11 +12,6 @@ LL | foo::<HashMap<Rc<()>, Rc<()>>>();
= note: required because of the requirements on the impl of `std::marker::Send` for `hashbrown::raw::RawTable<(std::rc::Rc<()>, std::rc::Rc<()>)>` = note: required because of the requirements on the impl of `std::marker::Send` for `hashbrown::raw::RawTable<(std::rc::Rc<()>, std::rc::Rc<()>)>`
= note: required because it appears within the type `hashbrown::map::HashMap<std::rc::Rc<()>, std::rc::Rc<()>, std::collections::hash_map::RandomState>` = note: required because it appears within the type `hashbrown::map::HashMap<std::rc::Rc<()>, std::rc::Rc<()>, std::collections::hash_map::RandomState>`
= note: required because it appears within the type `std::collections::HashMap<std::rc::Rc<()>, std::rc::Rc<()>>` = note: required because it appears within the type `std::collections::HashMap<std::rc::Rc<()>, std::rc::Rc<()>>`
note: required by `foo`
--> $DIR/issue-21763.rs:6:1
|
LL | fn foo<T: Send>() {}
| ^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: the trait bound `T: Bound` is not satisfied error[E0277]: the trait bound `T: Bound` is not satisfied
--> $DIR/issue-21837.rs:8:9 --> $DIR/issue-21837.rs:8:9
| |
LL | pub struct Foo<T: Bound>(T);
| ---------------------------- required by `Foo`
...
LL | impl<T> Trait2 for Foo<T> {} LL | impl<T> Trait2 for Foo<T> {}
| ^^^^^^ the trait `Bound` is not implemented for `T` | ^^^^^^ the trait `Bound` is not implemented for `T`
| |
= help: consider adding a `where T: Bound` bound = help: consider adding a `where T: Bound` bound
note: required by `Foo`
--> $DIR/issue-21837.rs:2:1
|
LL | pub struct Foo<T: Bound>(T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,6 +1,9 @@
error[E0283]: type annotations required: cannot resolve `&'a T: Foo` error[E0283]: type annotations required: cannot resolve `&'a T: Foo`
--> $DIR/issue-21974.rs:10:1 --> $DIR/issue-21974.rs:10:1
| |
LL | trait Foo {
| --------- required by `Foo`
...
LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T)
LL | | where &'a T : Foo, LL | | where &'a T : Foo,
LL | | &'b T : Foo LL | | &'b T : Foo
@ -9,12 +12,6 @@ LL | | x.foo();
LL | | y.foo(); LL | | y.foo();
LL | | } LL | | }
| |_^ | |_^
|
note: required by `Foo`
--> $DIR/issue-21974.rs:6:1
|
LL | trait Foo {
| ^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,16 +1,14 @@
error[E0271]: type mismatch resolving `<<T as Trait>::A as MultiDispatch<i32>>::O == T` error[E0271]: type mismatch resolving `<<T as Trait>::A as MultiDispatch<i32>>::O == T`
--> $DIR/issue-24204.rs:14:1 --> $DIR/issue-24204.rs:14:1
| |
LL | trait Trait: Sized {
| ------------------ required by `Trait`
...
LL | fn test<T: Trait<B=i32>>(b: i32) -> T where T::A: MultiDispatch<i32> { T::new(b) } LL | fn test<T: Trait<B=i32>>(b: i32) -> T where T::A: MultiDispatch<i32> { T::new(b) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found type parameter | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found type parameter
| |
= note: expected type `<<T as Trait>::A as MultiDispatch<i32>>::O` = note: expected type `<<T as Trait>::A as MultiDispatch<i32>>::O`
found type `T` found type `T`
note: required by `Trait`
--> $DIR/issue-24204.rs:7:1
|
LL | trait Trait: Sized {
| ^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,14 +1,11 @@
error[E0283]: type annotations required: cannot resolve `T0: Trait0<'l0>` error[E0283]: type annotations required: cannot resolve `T0: Trait0<'l0>`
--> $DIR/issue-24424.rs:4:1 --> $DIR/issue-24424.rs:4:1
| |
LL | trait Trait0<'l0> {}
| ----------------- required by `Trait0`
LL |
LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {} LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : Trait0<'l1> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: required by `Trait0`
--> $DIR/issue-24424.rs:2:1
|
LL | trait Trait0<'l0> {}
| ^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `(): InOut<_>` is not satisfied error[E0277]: the trait bound `(): InOut<_>` is not satisfied
--> $DIR/issue-25076.rs:10:5 --> $DIR/issue-25076.rs:10:5
| |
LL | fn do_fold<B, F: InOut<B, Out=B>>(init: B, f: F) {}
| ------------------------------------------------ required by `do_fold`
...
LL | do_fold(bot(), ()); LL | do_fold(bot(), ());
| ^^^^^^^ the trait `InOut<_>` is not implemented for `()` | ^^^^^^^ the trait `InOut<_>` is not implemented for `()`
|
note: required by `do_fold`
--> $DIR/issue-25076.rs:5:1
|
LL | fn do_fold<B, F: InOut<B, Out=B>>(init: B, f: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,14 +1,11 @@
error[E0283]: type annotations required: cannot resolve `S5<_>: Foo` error[E0283]: type annotations required: cannot resolve `S5<_>: Foo`
--> $DIR/issue-29147.rs:21:13 --> $DIR/issue-29147.rs:21:13
| |
LL | trait Foo { fn xxx(&self); }
| -------------- required by `Foo::xxx`
...
LL | let _ = <S5<_>>::xxx; LL | let _ = <S5<_>>::xxx;
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
|
note: required by `Foo::xxx`
--> $DIR/issue-29147.rs:10:13
|
LL | trait Foo { fn xxx(&self); }
| ^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -12,14 +12,11 @@ LL | size_of_copy::<dyn Misc + Copy>();
error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied
--> $DIR/issue-32963.rs:8:5 --> $DIR/issue-32963.rs:8:5
| |
LL | fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
| ------------------------------------------ required by `size_of_copy`
...
LL | size_of_copy::<dyn Misc + Copy>(); LL | size_of_copy::<dyn Misc + Copy>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc`
|
note: required by `size_of_copy`
--> $DIR/issue-32963.rs:5:1
|
LL | fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,17 +1,15 @@
error[E0271]: type mismatch resolving `for<'a> <() as Array<'a>>::Element == ()` error[E0271]: type mismatch resolving `for<'a> <() as Array<'a>>::Element == ()`
--> $DIR/issue-39970.rs:19:5 --> $DIR/issue-39970.rs:19:5
| |
LL | fn visit() {}
| ---------- required by `Visit::visit`
...
LL | <() as Visit>::visit(); LL | <() as Visit>::visit();
| ^^^^^^^^^^^^^^^^^^^^ expected &(), found () | ^^^^^^^^^^^^^^^^^^^^ expected &(), found ()
| |
= note: expected type `&()` = note: expected type `&()`
found type `()` found type `()`
= note: required because of the requirements on the impl of `Visit` for `()` = note: required because of the requirements on the impl of `Visit` for `()`
note: required by `Visit::visit`
--> $DIR/issue-39970.rs:6:5
|
LL | fn visit() {}
| ^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,6 +1,9 @@
error[E0277]: `std::rc::Rc<Foo>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<Foo>` cannot be sent between threads safely
--> $DIR/issue-40827.rs:14:5 --> $DIR/issue-40827.rs:14:5
| |
LL | fn f<T: Send>(_: T) {}
| ------------------- required by `f`
...
LL | f(Foo(Arc::new(Bar::B(None)))); LL | f(Foo(Arc::new(Bar::B(None))));
| ^ `std::rc::Rc<Foo>` cannot be sent between threads safely | ^ `std::rc::Rc<Foo>` cannot be sent between threads safely
| |
@ -8,15 +11,13 @@ LL | f(Foo(Arc::new(Bar::B(None))));
= note: required because it appears within the type `Bar` = note: required because it appears within the type `Bar`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
= note: required because it appears within the type `Foo` = note: required because it appears within the type `Foo`
note: required by `f`
--> $DIR/issue-40827.rs:11:1
|
LL | fn f<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: `std::rc::Rc<Foo>` cannot be shared between threads safely error[E0277]: `std::rc::Rc<Foo>` cannot be shared between threads safely
--> $DIR/issue-40827.rs:14:5 --> $DIR/issue-40827.rs:14:5
| |
LL | fn f<T: Send>(_: T) {}
| ------------------- required by `f`
...
LL | f(Foo(Arc::new(Bar::B(None)))); LL | f(Foo(Arc::new(Bar::B(None))));
| ^ `std::rc::Rc<Foo>` cannot be shared between threads safely | ^ `std::rc::Rc<Foo>` cannot be shared between threads safely
| |
@ -24,11 +25,6 @@ LL | f(Foo(Arc::new(Bar::B(None))));
= note: required because it appears within the type `Bar` = note: required because it appears within the type `Bar`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
= note: required because it appears within the type `Foo` = note: required because it appears within the type `Foo`
note: required by `f`
--> $DIR/issue-40827.rs:11:1
|
LL | fn f<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,41 +1,31 @@
error[E0631]: type mismatch in function arguments error[E0631]: type mismatch in function arguments
--> $DIR/issue-43623.rs:14:5 --> $DIR/issue-43623.rs:14:5
| |
LL | break_me::<Type, fn(_)>;
| ^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected signature of `for<'b> fn(<Type as Trait<'b>>::Assoc) -> _`
| found signature of `fn(_) -> _`
|
note: required by `break_me`
--> $DIR/issue-43623.rs:11:1
|
LL | / pub fn break_me<T, F>(f: F) LL | / pub fn break_me<T, F>(f: F)
LL | | where T: for<'b> Trait<'b>, LL | | where T: for<'b> Trait<'b>,
LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) { LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) {
LL | | break_me::<Type, fn(_)>; LL | | break_me::<Type, fn(_)>;
| | ^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | expected signature of `for<'b> fn(<Type as Trait<'b>>::Assoc) -> _`
| | found signature of `fn(_) -> _`
LL | | LL | |
LL | | LL | |
LL | | } LL | | }
| |_^ | |_- required by `break_me`
error[E0271]: type mismatch resolving `for<'b> <fn(_) as std::ops::FnOnce<(<Type as Trait<'b>>::Assoc,)>>::Output == ()` error[E0271]: type mismatch resolving `for<'b> <fn(_) as std::ops::FnOnce<(<Type as Trait<'b>>::Assoc,)>>::Output == ()`
--> $DIR/issue-43623.rs:14:5 --> $DIR/issue-43623.rs:14:5
| |
LL | break_me::<Type, fn(_)>;
| ^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'b, found concrete lifetime
|
note: required by `break_me`
--> $DIR/issue-43623.rs:11:1
|
LL | / pub fn break_me<T, F>(f: F) LL | / pub fn break_me<T, F>(f: F)
LL | | where T: for<'b> Trait<'b>, LL | | where T: for<'b> Trait<'b>,
LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) { LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) {
LL | | break_me::<Type, fn(_)>; LL | | break_me::<Type, fn(_)>;
| | ^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'b, found concrete lifetime
LL | | LL | |
LL | | LL | |
LL | | } LL | | }
| |_^ | |_- required by `break_me`
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -10,21 +10,18 @@ LL | self.foo.map(Foo::new)
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
--> $DIR/issue-47706.rs:27:5 --> $DIR/issue-47706.rs:27:5
| |
LL | Bar(i32), LL | Bar(i32),
| -------- takes 1 argument | -------- takes 1 argument
... ...
LL | foo(Qux::Bar);
| ^^^ expected function that takes 0 arguments
|
note: required by `foo`
--> $DIR/issue-47706.rs:20:1
|
LL | / fn foo<F>(f: F) LL | / fn foo<F>(f: F)
LL | | where LL | | where
LL | | F: Fn(), LL | | F: Fn(),
LL | | { LL | | {
LL | | } LL | | }
| |_^ | |_- required by `foo`
...
LL | foo(Qux::Bar);
| ^^^ expected function that takes 0 arguments
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,33 +1,27 @@
error[E0631]: type mismatch in function arguments error[E0631]: type mismatch in function arguments
--> $DIR/issue-60283.rs:14:5 --> $DIR/issue-60283.rs:14:5
| |
LL | foo((), drop)
| ^^^
| |
| expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _`
| found signature of `fn(_) -> _`
|
note: required by `foo`
--> $DIR/issue-60283.rs:9:1
|
LL | / pub fn foo<T, F>(_: T, _: F) LL | / pub fn foo<T, F>(_: T, _: F)
LL | | where T: for<'a> Trait<'a>, LL | | where T: for<'a> Trait<'a>,
LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {} LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
| |_________________________________________________^ | |_________________________________________________- required by `foo`
...
LL | foo((), drop)
| ^^^
| |
| expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _`
| found signature of `fn(_) -> _`
error[E0271]: type mismatch resolving `for<'a> <fn(_) {std::mem::drop::<_>} as std::ops::FnOnce<(<() as Trait<'a>>::Item,)>>::Output == ()` error[E0271]: type mismatch resolving `for<'a> <fn(_) {std::mem::drop::<_>} as std::ops::FnOnce<(<() as Trait<'a>>::Item,)>>::Output == ()`
--> $DIR/issue-60283.rs:14:5 --> $DIR/issue-60283.rs:14:5
| |
LL | foo((), drop)
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime
|
note: required by `foo`
--> $DIR/issue-60283.rs:9:1
|
LL | / pub fn foo<T, F>(_: T, _: F) LL | / pub fn foo<T, F>(_: T, _: F)
LL | | where T: for<'a> Trait<'a>, LL | | where T: for<'a> Trait<'a>,
LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {} LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
| |_________________________________________________^ | |_________________________________________________- required by `foo`
...
LL | foo((), drop)
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,16 +1,13 @@
error[E0277]: `u8` is not an iterator error[E0277]: `u8` is not an iterator
--> $DIR/bound.rs:2:10 --> $DIR/bound.rs:2:10
| |
LL | struct S<I: Iterator>(I);
| ------------------------- required by `S`
LL | struct T(S<u8>); LL | struct T(S<u8>);
| ^^^^^ `u8` is not an iterator | ^^^^^ `u8` is not an iterator
| |
= help: the trait `std::iter::Iterator` is not implemented for `u8` = help: the trait `std::iter::Iterator` is not implemented for `u8`
= 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: 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 by `S`
--> $DIR/bound.rs:1:1
|
LL | struct S<I: Iterator>(I);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,138 +1,107 @@
error[E0277]: the trait bound `&'static mut isize: std::marker::Copy` is not satisfied error[E0277]: the trait bound `&'static mut isize: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:27:5 --> $DIR/kindck-copy.rs:27:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<&'static mut isize>(); LL | assert_copy::<&'static mut isize>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'static mut isize` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'static mut isize`
| |
= help: the following implementations were found: = help: the following implementations were found:
<isize as std::marker::Copy> <isize as std::marker::Copy>
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `&'a mut isize: std::marker::Copy` is not satisfied error[E0277]: the trait bound `&'a mut isize: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:28:5 --> $DIR/kindck-copy.rs:28:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<&'a mut isize>(); LL | assert_copy::<&'a mut isize>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut isize` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut isize`
| |
= help: the following implementations were found: = help: the following implementations were found:
<isize as std::marker::Copy> <isize as std::marker::Copy>
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::boxed::Box<isize>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::boxed::Box<isize>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:31:5 --> $DIR/kindck-copy.rs:31:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<Box<isize>>(); LL | assert_copy::<Box<isize>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<isize>` | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<isize>`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:32:5 --> $DIR/kindck-copy.rs:32:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<String>(); LL | assert_copy::<String>();
| ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` | ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::vec::Vec<isize>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::vec::Vec<isize>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:33:5 --> $DIR/kindck-copy.rs:33:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<Vec<isize> >(); LL | assert_copy::<Vec<isize> >();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec<isize>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec<isize>`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::boxed::Box<&'a mut isize>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::boxed::Box<&'a mut isize>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:34:5 --> $DIR/kindck-copy.rs:34:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<Box<&'a mut isize>>(); LL | assert_copy::<Box<&'a mut isize>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<&'a mut isize>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<&'a mut isize>`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::boxed::Box<dyn Dummy>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::boxed::Box<dyn Dummy>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:42:5 --> $DIR/kindck-copy.rs:42:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<Box<dyn Dummy>>(); LL | assert_copy::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy>`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::boxed::Box<dyn Dummy + std::marker::Send>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::boxed::Box<dyn Dummy + std::marker::Send>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:43:5 --> $DIR/kindck-copy.rs:43:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<Box<dyn Dummy + Send>>(); LL | assert_copy::<Box<dyn Dummy + Send>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy + std::marker::Send>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy + std::marker::Send>`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `&'a mut (dyn Dummy + std::marker::Send + 'a): std::marker::Copy` is not satisfied error[E0277]: the trait bound `&'a mut (dyn Dummy + std::marker::Send + 'a): std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:46:5 --> $DIR/kindck-copy.rs:46:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<&'a mut (dyn Dummy + Send)>(); LL | assert_copy::<&'a mut (dyn Dummy + Send)>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut (dyn Dummy + std::marker::Send + 'a)` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut (dyn Dummy + std::marker::Send + 'a)`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `MyNoncopyStruct: std::marker::Copy` is not satisfied error[E0277]: the trait bound `MyNoncopyStruct: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:64:5 --> $DIR/kindck-copy.rs:64:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<MyNoncopyStruct>(); LL | assert_copy::<MyNoncopyStruct>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `MyNoncopyStruct` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `MyNoncopyStruct`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::rc::Rc<isize>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::rc::Rc<isize>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:67:5 --> $DIR/kindck-copy.rs:67:5
| |
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
...
LL | assert_copy::<Rc<isize>>(); LL | assert_copy::<Rc<isize>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc<isize>` | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc<isize>`
|
note: required by `assert_copy`
--> $DIR/kindck-copy.rs:5:1
|
LL | fn assert_copy<T:Copy>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 11 previous errors error: aborting due to 11 previous errors

View File

@ -1,15 +1,13 @@
error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is not satisfied
--> $DIR/kindck-impl-type-params-2.rs:13:5 --> $DIR/kindck-impl-type-params-2.rs:13:5
| |
LL | fn take_param<T:Foo>(foo: &T) { }
| ----------------------------- required by `take_param`
...
LL | take_param(&x); LL | take_param(&x);
| ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>`
| |
= note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>` = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>`
note: required by `take_param`
--> $DIR/kindck-impl-type-params-2.rs:9:1
|
LL | fn take_param<T:Foo>(foo: &T) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is not satisfied error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is not satisfied
--> $DIR/kindck-inherited-copy-bound.rs:18:5 --> $DIR/kindck-inherited-copy-bound.rs:18:5
| |
LL | fn take_param<T:Foo>(foo: &T) { }
| ----------------------------- required by `take_param`
...
LL | take_param(&x); LL | take_param(&x);
| ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>`
| |
= note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>` = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>`
note: required by `take_param`
--> $DIR/kindck-inherited-copy-bound.rs:14:1
|
LL | fn take_param<T:Foo>(foo: &T) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0038]: the trait `Foo` cannot be made into an object error[E0038]: the trait `Foo` cannot be made into an object
--> $DIR/kindck-inherited-copy-bound.rs:24:19 --> $DIR/kindck-inherited-copy-bound.rs:24:19

View File

@ -1,16 +1,14 @@
error[E0277]: `std::rc::Rc<usize>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<usize>` cannot be sent between threads safely
--> $DIR/kindck-nonsendable-1.rs:9:5 --> $DIR/kindck-nonsendable-1.rs:9:5
| |
LL | fn bar<F:FnOnce() + Send>(_: F) { }
| ------------------------------- required by `bar`
...
LL | bar(move|| foo(x)); LL | bar(move|| foo(x));
| ^^^ `std::rc::Rc<usize>` cannot be sent between threads safely | ^^^ `std::rc::Rc<usize>` cannot be sent between threads safely
| |
= help: within `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:std::rc::Rc<usize>]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<usize>` = help: within `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:std::rc::Rc<usize>]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<usize>`
= note: required because it appears within the type `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:std::rc::Rc<usize>]` = note: required because it appears within the type `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:std::rc::Rc<usize>]`
note: required by `bar`
--> $DIR/kindck-nonsendable-1.rs:5:1
|
LL | fn bar<F:FnOnce() + Send>(_: F) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,31 +1,27 @@
error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely
--> $DIR/kindck-send-object.rs:12:5 --> $DIR/kindck-send-object.rs:12:5
| |
LL | fn assert_send<T:Send>() { }
| ------------------------ required by `assert_send`
...
LL | assert_send::<&'static (dyn Dummy + 'static)>(); LL | assert_send::<&'static (dyn Dummy + 'static)>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)` = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)`
= note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)` = note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)`
note: required by `assert_send`
--> $DIR/kindck-send-object.rs:5:1
|
LL | fn assert_send<T:Send>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `dyn Dummy` cannot be sent between threads safely error[E0277]: `dyn Dummy` cannot be sent between threads safely
--> $DIR/kindck-send-object.rs:17:5 --> $DIR/kindck-send-object.rs:17:5
| |
LL | fn assert_send<T:Send>() { }
| ------------------------ required by `assert_send`
...
LL | assert_send::<Box<dyn Dummy>>(); LL | assert_send::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `dyn Dummy` = help: the trait `std::marker::Send` is not implemented for `dyn Dummy`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn Dummy>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn Dummy>`
= note: required because it appears within the type `std::boxed::Box<dyn Dummy>` = note: required because it appears within the type `std::boxed::Box<dyn Dummy>`
note: required by `assert_send`
--> $DIR/kindck-send-object.rs:5:1
|
LL | fn assert_send<T:Send>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,16 +1,14 @@
error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely
--> $DIR/kindck-send-object1.rs:10:5 --> $DIR/kindck-send-object1.rs:10:5
| |
LL | fn assert_send<T:Send+'static>() { }
| -------------------------------- required by `assert_send`
...
LL | assert_send::<&'a dyn Dummy>(); LL | assert_send::<&'a dyn Dummy>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)` = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`
= note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)` = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`
note: required by `assert_send`
--> $DIR/kindck-send-object1.rs:5:1
|
LL | fn assert_send<T:Send+'static>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0477]: the type `&'a (dyn Dummy + std::marker::Sync + 'a)` does not fulfill the required lifetime error[E0477]: the type `&'a (dyn Dummy + std::marker::Sync + 'a)` does not fulfill the required lifetime
--> $DIR/kindck-send-object1.rs:14:5 --> $DIR/kindck-send-object1.rs:14:5
@ -23,17 +21,15 @@ LL | assert_send::<&'a (dyn Dummy + Sync)>();
error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely
--> $DIR/kindck-send-object1.rs:29:5 --> $DIR/kindck-send-object1.rs:29:5
| |
LL | fn assert_send<T:Send+'static>() { }
| -------------------------------- required by `assert_send`
...
LL | assert_send::<Box<dyn Dummy + 'a>>(); LL | assert_send::<Box<dyn Dummy + 'a>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)` = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`
= note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>` = note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>`
note: required by `assert_send`
--> $DIR/kindck-send-object1.rs:5:1
|
LL | fn assert_send<T:Send+'static>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors error: aborting due to 3 previous errors

View File

@ -1,31 +1,27 @@
error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely
--> $DIR/kindck-send-object2.rs:7:5 --> $DIR/kindck-send-object2.rs:7:5
| |
LL | fn assert_send<T:Send>() { }
| ------------------------ required by `assert_send`
...
LL | assert_send::<&'static dyn Dummy>(); LL | assert_send::<&'static dyn Dummy>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)` = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)`
= note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)` = note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)`
note: required by `assert_send`
--> $DIR/kindck-send-object2.rs:3:1
|
LL | fn assert_send<T:Send>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `dyn Dummy` cannot be sent between threads safely error[E0277]: `dyn Dummy` cannot be sent between threads safely
--> $DIR/kindck-send-object2.rs:12:5 --> $DIR/kindck-send-object2.rs:12:5
| |
LL | fn assert_send<T:Send>() { }
| ------------------------ required by `assert_send`
...
LL | assert_send::<Box<dyn Dummy>>(); LL | assert_send::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `dyn Dummy` = help: the trait `std::marker::Send` is not implemented for `dyn Dummy`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn Dummy>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<dyn Dummy>`
= note: required because it appears within the type `std::boxed::Box<dyn Dummy>` = note: required because it appears within the type `std::boxed::Box<dyn Dummy>`
note: required by `assert_send`
--> $DIR/kindck-send-object2.rs:3:1
|
LL | fn assert_send<T:Send>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,17 +1,15 @@
error[E0277]: `*mut u8` cannot be sent between threads safely error[E0277]: `*mut u8` cannot be sent between threads safely
--> $DIR/kindck-send-owned.rs:12:5 --> $DIR/kindck-send-owned.rs:12:5
| |
LL | fn assert_send<T:Send>() { }
| ------------------------ required by `assert_send`
...
LL | assert_send::<Box<*mut u8>>(); LL | assert_send::<Box<*mut u8>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `*mut u8` = help: the trait `std::marker::Send` is not implemented for `*mut u8`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<*mut u8>` = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<*mut u8>`
= note: required because it appears within the type `std::boxed::Box<*mut u8>` = note: required because it appears within the type `std::boxed::Box<*mut u8>`
note: required by `assert_send`
--> $DIR/kindck-send-owned.rs:3:1
|
LL | fn assert_send<T:Send>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: `*mut &'a isize` cannot be sent between threads safely error[E0277]: `*mut &'a isize` cannot be sent between threads safely
--> $DIR/kindck-send-unsafe.rs:6:5 --> $DIR/kindck-send-unsafe.rs:6:5
| |
LL | fn assert_send<T:Send>() { }
| ------------------------ required by `assert_send`
...
LL | assert_send::<*mut &'a isize>(); LL | assert_send::<*mut &'a isize>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut &'a isize` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut &'a isize` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `*mut &'a isize` = help: the trait `std::marker::Send` is not implemented for `*mut &'a isize`
note: required by `assert_send`
--> $DIR/kindck-send-unsafe.rs:3:1
|
LL | fn assert_send<T:Send>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,14 +1,11 @@
error[E0277]: the trait bound `NotDebugOrDisplay: Marker` is not satisfied error[E0277]: the trait bound `NotDebugOrDisplay: Marker` is not satisfied
--> $DIR/overlap-marker-trait.rs:27:5 --> $DIR/overlap-marker-trait.rs:27:5
| |
LL | fn is_marker<T: Marker>() { }
| ------------------------- required by `is_marker`
...
LL | is_marker::<NotDebugOrDisplay>(); LL | is_marker::<NotDebugOrDisplay>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay`
|
note: required by `is_marker`
--> $DIR/overlap-marker-trait.rs:15:1
|
LL | fn is_marker<T: Marker>() { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,60 +1,48 @@
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/E0631.rs:7:5 --> $DIR/E0631.rs:7:5
| |
LL | fn foo<F: Fn(usize)>(_: F) {}
| -------------------------- required by `foo`
...
LL | foo(|_: isize| {}); LL | foo(|_: isize| {});
| ^^^ ---------- found signature of `fn(isize) -> _` | ^^^ ---------- found signature of `fn(isize) -> _`
| | | |
| expected signature of `fn(usize) -> _` | expected signature of `fn(usize) -> _`
|
note: required by `foo`
--> $DIR/E0631.rs:3:1
|
LL | fn foo<F: Fn(usize)>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/E0631.rs:8:5 --> $DIR/E0631.rs:8:5
| |
LL | fn bar<F: Fn<usize>>(_: F) {}
| -------------------------- required by `bar`
...
LL | bar(|_: isize| {}); LL | bar(|_: isize| {});
| ^^^ ---------- found signature of `fn(isize) -> _` | ^^^ ---------- found signature of `fn(isize) -> _`
| | | |
| expected signature of `fn(usize) -> _` | expected signature of `fn(usize) -> _`
|
note: required by `bar`
--> $DIR/E0631.rs:4:1
|
LL | fn bar<F: Fn<usize>>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in function arguments error[E0631]: type mismatch in function arguments
--> $DIR/E0631.rs:9:5 --> $DIR/E0631.rs:9:5
| |
LL | fn foo<F: Fn(usize)>(_: F) {}
| -------------------------- required by `foo`
...
LL | fn f(_: u64) {} LL | fn f(_: u64) {}
| ------------ found signature of `fn(u64) -> _` | ------------ found signature of `fn(u64) -> _`
... ...
LL | foo(f); LL | foo(f);
| ^^^ expected signature of `fn(usize) -> _` | ^^^ expected signature of `fn(usize) -> _`
|
note: required by `foo`
--> $DIR/E0631.rs:3:1
|
LL | fn foo<F: Fn(usize)>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in function arguments error[E0631]: type mismatch in function arguments
--> $DIR/E0631.rs:10:5 --> $DIR/E0631.rs:10:5
| |
LL | fn bar<F: Fn<usize>>(_: F) {}
| -------------------------- required by `bar`
LL | fn main() {
LL | fn f(_: u64) {} LL | fn f(_: u64) {}
| ------------ found signature of `fn(u64) -> _` | ------------ found signature of `fn(u64) -> _`
... ...
LL | bar(f); LL | bar(f);
| ^^^ expected signature of `fn(usize) -> _` | ^^^ expected signature of `fn(usize) -> _`
|
note: required by `bar`
--> $DIR/E0631.rs:4:1
|
LL | fn bar<F: Fn<usize>>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors error: aborting due to 4 previous errors

View File

@ -45,16 +45,13 @@ LL | [1, 2, 3].sort_by(|tuple, tuple2| panic!());
error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
--> $DIR/closure-arg-count.rs:13:5 --> $DIR/closure-arg-count.rs:13:5
| |
LL | fn f<F: Fn<usize>>(_: F) {}
| ------------------------ required by `f`
...
LL | f(|| panic!()); LL | f(|| panic!());
| ^ -- takes 0 arguments | ^ -- takes 0 arguments
| | | |
| expected closure that takes 1 argument | expected closure that takes 1 argument
|
note: required by `f`
--> $DIR/closure-arg-count.rs:3:1
|
LL | fn f<F: Fn<usize>>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: consider changing the closure to take and ignore the expected argument help: consider changing the closure to take and ignore the expected argument
| |
LL | f(|_| panic!()); LL | f(|_| panic!());
@ -63,16 +60,13 @@ LL | f(|_| panic!());
error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
--> $DIR/closure-arg-count.rs:15:5 --> $DIR/closure-arg-count.rs:15:5
| |
LL | fn f<F: Fn<usize>>(_: F) {}
| ------------------------ required by `f`
...
LL | f( move || panic!()); LL | f( move || panic!());
| ^ ---------- takes 0 arguments | ^ ---------- takes 0 arguments
| | | |
| expected closure that takes 1 argument | expected closure that takes 1 argument
|
note: required by `f`
--> $DIR/closure-arg-count.rs:3:1
|
LL | fn f<F: Fn<usize>>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: consider changing the closure to take and ignore the expected argument help: consider changing the closure to take and ignore the expected argument
| |
LL | f( move |_| panic!()); LL | f( move |_| panic!());
@ -148,14 +142,10 @@ error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
LL | call(Foo); LL | call(Foo);
| ^^^^ expected function that takes 0 arguments | ^^^^ expected function that takes 0 arguments
... ...
LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
| ------------------------------------------ required by `call`
LL | struct Foo(u8); LL | struct Foo(u8);
| --------------- takes 1 argument | --------------- takes 1 argument
|
note: required by `call`
--> $DIR/closure-arg-count.rs:42:1
|
LL | fn call<F, R>(_: F) where F: FnOnce() -> R {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 14 previous errors error: aborting due to 14 previous errors

View File

@ -25,29 +25,23 @@ LL | a.iter().map(|_: (u16, u16)| 45);
error[E0631]: type mismatch in function arguments error[E0631]: type mismatch in function arguments
--> $DIR/closure-arg-type-mismatch.rs:10:5 --> $DIR/closure-arg-type-mismatch.rs:10:5
| |
LL | fn baz<F: Fn(*mut &u32)>(_: F) {}
| ------------------------------ required by `baz`
LL | fn _test<'a>(f: fn(*mut &'a u32)) {
LL | baz(f); LL | baz(f);
| ^^^ | ^^^
| | | |
| expected signature of `for<'r> fn(*mut &'r u32) -> _` | expected signature of `for<'r> fn(*mut &'r u32) -> _`
| found signature of `fn(*mut &'a u32) -> _` | found signature of `fn(*mut &'a u32) -> _`
|
note: required by `baz`
--> $DIR/closure-arg-type-mismatch.rs:8:1
|
LL | fn baz<F: Fn(*mut &u32)>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0271]: type mismatch resolving `for<'r> <fn(*mut &'a u32) as std::ops::FnOnce<(*mut &'r u32,)>>::Output == ()` error[E0271]: type mismatch resolving `for<'r> <fn(*mut &'a u32) as std::ops::FnOnce<(*mut &'r u32,)>>::Output == ()`
--> $DIR/closure-arg-type-mismatch.rs:10:5 --> $DIR/closure-arg-type-mismatch.rs:10:5
| |
LL | fn baz<F: Fn(*mut &u32)>(_: F) {}
| ------------------------------ required by `baz`
LL | fn _test<'a>(f: fn(*mut &'a u32)) {
LL | baz(f); LL | baz(f);
| ^^^ expected bound lifetime parameter, found concrete lifetime | ^^^ expected bound lifetime parameter, found concrete lifetime
|
note: required by `baz`
--> $DIR/closure-arg-type-mismatch.rs:8:1
|
LL | fn baz<F: Fn(*mut &u32)>(_: F) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 5 previous errors error: aborting due to 5 previous errors

View File

@ -1,30 +1,26 @@
error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:8:9: 8:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()` error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.rs:8:9: 8:15] as std::ops::FnOnce<(&'r (),)>>::Output == ()`
--> $DIR/closure-mismatch.rs:8:5 --> $DIR/closure-mismatch.rs:8:5
| |
LL | fn baz<T: Foo>(_: T) {}
| -------------------- required by `baz`
...
LL | baz(|_| ()); LL | baz(|_| ());
| ^^^ expected bound lifetime parameter, found concrete lifetime | ^^^ expected bound lifetime parameter, found concrete lifetime
| |
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]` = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]`
note: required by `baz`
--> $DIR/closure-mismatch.rs:5:1
|
LL | fn baz<T: Foo>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/closure-mismatch.rs:8:5 --> $DIR/closure-mismatch.rs:8:5
| |
LL | fn baz<T: Foo>(_: T) {}
| -------------------- required by `baz`
...
LL | baz(|_| ()); LL | baz(|_| ());
| ^^^ ------ found signature of `fn(_) -> _` | ^^^ ------ found signature of `fn(_) -> _`
| | | |
| expected signature of `for<'r> fn(&'r ()) -> _` | expected signature of `for<'r> fn(&'r ()) -> _`
| |
= note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]` = note: required because of the requirements on the impl of `Foo` for `[closure@$DIR/closure-mismatch.rs:8:9: 8:15]`
note: required by `baz`
--> $DIR/closure-mismatch.rs:5:1
|
LL | fn baz<T: Foo>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -3,15 +3,12 @@ error[E0631]: type mismatch in function arguments
| |
LL | fn takes_mut(x: &mut isize) { } LL | fn takes_mut(x: &mut isize) { }
| --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _` | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _`
LL |
LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
| --------------------------------------------- required by `apply`
... ...
LL | apply(&3, takes_mut); LL | apply(&3, takes_mut);
| ^^^^^ expected signature of `fn(&{integer}) -> _` | ^^^^^ expected signature of `fn(&{integer}) -> _`
|
note: required by `apply`
--> $DIR/fn-variance-1.rs:5:1
|
LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0631]: type mismatch in function arguments error[E0631]: type mismatch in function arguments
--> $DIR/fn-variance-1.rs:15:5 --> $DIR/fn-variance-1.rs:15:5
@ -19,14 +16,11 @@ error[E0631]: type mismatch in function arguments
LL | fn takes_imm(x: &isize) { } LL | fn takes_imm(x: &isize) { }
| ----------------------- found signature of `for<'r> fn(&'r isize) -> _` | ----------------------- found signature of `for<'r> fn(&'r isize) -> _`
... ...
LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
| --------------------------------------------- required by `apply`
...
LL | apply(&mut 3, takes_imm); LL | apply(&mut 3, takes_imm);
| ^^^^^ expected signature of `fn(&mut {integer}) -> _` | ^^^^^ expected signature of `fn(&mut {integer}) -> _`
|
note: required by `apply`
--> $DIR/fn-variance-1.rs:5:1
|
LL | fn apply<T, F>(t: T, f: F) where F: FnOnce(T) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,17 +1,14 @@
error[E0631]: type mismatch in closure arguments error[E0631]: type mismatch in closure arguments
--> $DIR/unboxed-closures-vtable-mismatch.rs:15:13 --> $DIR/unboxed-closures-vtable-mismatch.rs:15:13
| |
LL | fn call_it<F:FnMut(isize,isize)->isize>(y: isize, mut f: F) -> isize {
| -------------------------------------------------------------------- required by `call_it`
...
LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y });
| ----------------------------- found signature of `fn(usize, isize) -> _` | ----------------------------- found signature of `fn(usize, isize) -> _`
LL | LL |
LL | let z = call_it(3, f); LL | let z = call_it(3, f);
| ^^^^^^^ expected signature of `fn(isize, isize) -> _` | ^^^^^^^ expected signature of `fn(isize, isize) -> _`
|
note: required by `call_it`
--> $DIR/unboxed-closures-vtable-mismatch.rs:7:1
|
LL | fn call_it<F:FnMut(isize,isize)->isize>(y: isize, mut f: F) -> isize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,17 +1,15 @@
error[E0277]: `NoSync` cannot be shared between threads safely error[E0277]: `NoSync` cannot be shared between threads safely
--> $DIR/mutable-enum-indirect.rs:17:5 --> $DIR/mutable-enum-indirect.rs:17:5
| |
LL | fn bar<T: Sync>(_: T) {}
| --------------------- required by `bar`
...
LL | bar(&x); LL | bar(&x);
| ^^^ `NoSync` cannot be shared between threads safely | ^^^ `NoSync` cannot be shared between threads safely
| |
= help: within `&Foo`, the trait `std::marker::Sync` is not implemented for `NoSync` = help: within `&Foo`, the trait `std::marker::Sync` is not implemented for `NoSync`
= note: required because it appears within the type `Foo` = note: required because it appears within the type `Foo`
= note: required because it appears within the type `&Foo` = note: required because it appears within the type `&Foo`
note: required by `bar`
--> $DIR/mutable-enum-indirect.rs:13:1
|
LL | fn bar<T: Sync>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,16 +1,14 @@
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/mutexguard-sync.rs:11:5 --> $DIR/mutexguard-sync.rs:11:5
| |
LL | fn test_sync<T: Sync>(_t: T) {}
| ---------------------------- required by `test_sync`
...
LL | test_sync(guard); LL | test_sync(guard);
| ^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely | ^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
= note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::MutexGuard<'_, std::cell::Cell<i32>>` = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::MutexGuard<'_, std::cell::Cell<i32>>`
note: required by `test_sync`
--> $DIR/mutexguard-sync.rs:5:1
|
LL | fn test_sync<T: Sync>(_t: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -69,530 +69,398 @@ LL | use namespace_mix::xm8::V;
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:33:5 --> $DIR/namespace-mix.rs:33:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m1::S{}); LL | check(m1::S{});
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::S: Impossible` is not satisfied error[E0277]: the trait bound `c::S: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:35:5 --> $DIR/namespace-mix.rs:35:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m2::S{}); LL | check(m2::S{});
| ^^^^^ the trait `Impossible` is not implemented for `c::S` | ^^^^^ the trait `Impossible` is not implemented for `c::S`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:36:5 --> $DIR/namespace-mix.rs:36:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m2::S); LL | check(m2::S);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:39:5 --> $DIR/namespace-mix.rs:39:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm1::S{}); LL | check(xm1::S{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::S: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::S: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:41:5 --> $DIR/namespace-mix.rs:41:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm2::S{}); LL | check(xm2::S{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::S` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::S`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:42:5 --> $DIR/namespace-mix.rs:42:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm2::S); LL | check(xm2::S);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:55:5 --> $DIR/namespace-mix.rs:55:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m3::TS{}); LL | check(m3::TS{});
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `fn() -> c::TS {c::TS}: Impossible` is not satisfied error[E0277]: the trait bound `fn() -> c::TS {c::TS}: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:56:5 --> $DIR/namespace-mix.rs:56:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m3::TS); LL | check(m3::TS);
| ^^^^^ the trait `Impossible` is not implemented for `fn() -> c::TS {c::TS}` | ^^^^^ the trait `Impossible` is not implemented for `fn() -> c::TS {c::TS}`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::TS: Impossible` is not satisfied error[E0277]: the trait bound `c::TS: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:57:5 --> $DIR/namespace-mix.rs:57:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m4::TS{}); LL | check(m4::TS{});
| ^^^^^ the trait `Impossible` is not implemented for `c::TS` | ^^^^^ the trait `Impossible` is not implemented for `c::TS`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:58:5 --> $DIR/namespace-mix.rs:58:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m4::TS); LL | check(m4::TS);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:61:5 --> $DIR/namespace-mix.rs:61:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm3::TS{}); LL | check(xm3::TS{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}: Impossible` is not satisfied error[E0277]: the trait bound `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:62:5 --> $DIR/namespace-mix.rs:62:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm3::TS); LL | check(xm3::TS);
| ^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}` | ^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::TS: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::TS: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:63:5 --> $DIR/namespace-mix.rs:63:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm4::TS{}); LL | check(xm4::TS{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::TS` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::TS`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:64:5 --> $DIR/namespace-mix.rs:64:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm4::TS); LL | check(xm4::TS);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:77:5 --> $DIR/namespace-mix.rs:77:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m5::US{}); LL | check(m5::US{});
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::US: Impossible` is not satisfied error[E0277]: the trait bound `c::US: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:78:5 --> $DIR/namespace-mix.rs:78:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m5::US); LL | check(m5::US);
| ^^^^^ the trait `Impossible` is not implemented for `c::US` | ^^^^^ the trait `Impossible` is not implemented for `c::US`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::US: Impossible` is not satisfied error[E0277]: the trait bound `c::US: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:79:5 --> $DIR/namespace-mix.rs:79:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m6::US{}); LL | check(m6::US{});
| ^^^^^ the trait `Impossible` is not implemented for `c::US` | ^^^^^ the trait `Impossible` is not implemented for `c::US`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:80:5 --> $DIR/namespace-mix.rs:80:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m6::US); LL | check(m6::US);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:83:5 --> $DIR/namespace-mix.rs:83:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm5::US{}); LL | check(xm5::US{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:84:5 --> $DIR/namespace-mix.rs:84:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm5::US); LL | check(xm5::US);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:85:5 --> $DIR/namespace-mix.rs:85:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm6::US{}); LL | check(xm6::US{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:86:5 --> $DIR/namespace-mix.rs:86:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm6::US); LL | check(xm6::US);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:99:5 --> $DIR/namespace-mix.rs:99:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m7::V{}); LL | check(m7::V{});
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::E: Impossible` is not satisfied error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:101:5 --> $DIR/namespace-mix.rs:101:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m8::V{}); LL | check(m8::V{});
| ^^^^^ the trait `Impossible` is not implemented for `c::E` | ^^^^^ the trait `Impossible` is not implemented for `c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:102:5 --> $DIR/namespace-mix.rs:102:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m8::V); LL | check(m8::V);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:105:5 --> $DIR/namespace-mix.rs:105:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm7::V{}); LL | check(xm7::V{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:107:5 --> $DIR/namespace-mix.rs:107:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm8::V{}); LL | check(xm8::V{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:108:5 --> $DIR/namespace-mix.rs:108:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm8::V); LL | check(xm8::V);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:121:5 --> $DIR/namespace-mix.rs:121:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m9::TV{}); LL | check(m9::TV{});
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `fn() -> c::E {c::E::TV}: Impossible` is not satisfied error[E0277]: the trait bound `fn() -> c::E {c::E::TV}: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:122:5 --> $DIR/namespace-mix.rs:122:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(m9::TV); LL | check(m9::TV);
| ^^^^^ the trait `Impossible` is not implemented for `fn() -> c::E {c::E::TV}` | ^^^^^ the trait `Impossible` is not implemented for `fn() -> c::E {c::E::TV}`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::E: Impossible` is not satisfied error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:123:5 --> $DIR/namespace-mix.rs:123:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(mA::TV{}); LL | check(mA::TV{});
| ^^^^^ the trait `Impossible` is not implemented for `c::E` | ^^^^^ the trait `Impossible` is not implemented for `c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:124:5 --> $DIR/namespace-mix.rs:124:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(mA::TV); LL | check(mA::TV);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:127:5 --> $DIR/namespace-mix.rs:127:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm9::TV{}); LL | check(xm9::TV{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}: Impossible` is not satisfied error[E0277]: the trait bound `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:128:5 --> $DIR/namespace-mix.rs:128:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xm9::TV); LL | check(xm9::TV);
| ^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}` | ^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:129:5 --> $DIR/namespace-mix.rs:129:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xmA::TV{}); LL | check(xmA::TV{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:130:5 --> $DIR/namespace-mix.rs:130:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xmA::TV); LL | check(xmA::TV);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:143:5 --> $DIR/namespace-mix.rs:143:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(mB::UV{}); LL | check(mB::UV{});
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::E: Impossible` is not satisfied error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:144:5 --> $DIR/namespace-mix.rs:144:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(mB::UV); LL | check(mB::UV);
| ^^^^^ the trait `Impossible` is not implemented for `c::E` | ^^^^^ the trait `Impossible` is not implemented for `c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::E: Impossible` is not satisfied error[E0277]: the trait bound `c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:145:5 --> $DIR/namespace-mix.rs:145:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(mC::UV{}); LL | check(mC::UV{});
| ^^^^^ the trait `Impossible` is not implemented for `c::E` | ^^^^^ the trait `Impossible` is not implemented for `c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `c::Item: Impossible` is not satisfied error[E0277]: the trait bound `c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:146:5 --> $DIR/namespace-mix.rs:146:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(mC::UV); LL | check(mC::UV);
| ^^^^^ the trait `Impossible` is not implemented for `c::Item` | ^^^^^ the trait `Impossible` is not implemented for `c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:149:5 --> $DIR/namespace-mix.rs:149:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xmB::UV{}); LL | check(xmB::UV{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:150:5 --> $DIR/namespace-mix.rs:150:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xmB::UV); LL | check(xmB::UV);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:151:5 --> $DIR/namespace-mix.rs:151:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xmC::UV{}); LL | check(xmC::UV{});
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied
--> $DIR/namespace-mix.rs:152:5 --> $DIR/namespace-mix.rs:152:5
| |
LL | fn check<T: Impossible>(_: T) {}
| ----------------------------- required by `check`
...
LL | check(xmC::UV); LL | check(xmC::UV);
| ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` | ^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item`
|
note: required by `check`
--> $DIR/namespace-mix.rs:21:1
|
LL | fn check<T: Impossible>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 48 previous errors error: aborting due to 48 previous errors

View File

@ -1,16 +1,14 @@
error[E0277]: `NoSend` cannot be sent between threads safely error[E0277]: `NoSend` cannot be sent between threads safely
--> $DIR/no_send-enum.rs:16:5 --> $DIR/no_send-enum.rs:16:5
| |
LL | fn bar<T: Send>(_: T) {}
| --------------------- required by `bar`
...
LL | bar(x); LL | bar(x);
| ^^^ `NoSend` cannot be sent between threads safely | ^^^ `NoSend` cannot be sent between threads safely
| |
= help: within `Foo`, the trait `std::marker::Send` is not implemented for `NoSend` = help: within `Foo`, the trait `std::marker::Send` is not implemented for `NoSend`
= note: required because it appears within the type `Foo` = note: required because it appears within the type `Foo`
note: required by `bar`
--> $DIR/no_send-enum.rs:12:1
|
LL | fn bar<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: `std::rc::Rc<{integer}>` cannot be sent between threads safely error[E0277]: `std::rc::Rc<{integer}>` cannot be sent between threads safely
--> $DIR/no_send-rc.rs:7:5 --> $DIR/no_send-rc.rs:7:5
| |
LL | fn bar<T: Send>(_: T) {}
| --------------------- required by `bar`
...
LL | bar(x); LL | bar(x);
| ^^^ `std::rc::Rc<{integer}>` cannot be sent between threads safely | ^^^ `std::rc::Rc<{integer}>` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `std::rc::Rc<{integer}>` = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc<{integer}>`
note: required by `bar`
--> $DIR/no_send-rc.rs:3:1
|
LL | fn bar<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: `Foo` cannot be sent between threads safely error[E0277]: `Foo` cannot be sent between threads safely
--> $DIR/no_send-struct.rs:15:5 --> $DIR/no_send-struct.rs:15:5
| |
LL | fn bar<T: Send>(_: T) {}
| --------------------- required by `bar`
...
LL | bar(x); LL | bar(x);
| ^^^ `Foo` cannot be sent between threads safely | ^^^ `Foo` cannot be sent between threads safely
| |
= help: the trait `std::marker::Send` is not implemented for `Foo` = help: the trait `std::marker::Send` is not implemented for `Foo`
note: required by `bar`
--> $DIR/no_send-struct.rs:11:1
|
LL | fn bar<T: Send>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,16 +1,14 @@
error[E0277]: `NoSync` cannot be shared between threads safely error[E0277]: `NoSync` cannot be shared between threads safely
--> $DIR/no_share-enum.rs:14:5 --> $DIR/no_share-enum.rs:14:5
| |
LL | fn bar<T: Sync>(_: T) {}
| --------------------- required by `bar`
...
LL | bar(x); LL | bar(x);
| ^^^ `NoSync` cannot be shared between threads safely | ^^^ `NoSync` cannot be shared between threads safely
| |
= help: within `Foo`, the trait `std::marker::Sync` is not implemented for `NoSync` = help: within `Foo`, the trait `std::marker::Sync` is not implemented for `NoSync`
= note: required because it appears within the type `Foo` = note: required because it appears within the type `Foo`
note: required by `bar`
--> $DIR/no_share-enum.rs:10:1
|
LL | fn bar<T: Sync>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,15 +1,13 @@
error[E0277]: `Foo` cannot be shared between threads safely error[E0277]: `Foo` cannot be shared between threads safely
--> $DIR/no_share-struct.rs:12:5 --> $DIR/no_share-struct.rs:12:5
| |
LL | fn bar<T: Sync>(_: T) {}
| --------------------- required by `bar`
...
LL | bar(x); LL | bar(x);
| ^^^ `Foo` cannot be shared between threads safely | ^^^ `Foo` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `Foo` = help: the trait `std::marker::Sync` is not implemented for `Foo`
note: required by `bar`
--> $DIR/no_share-struct.rs:8:1
|
LL | fn bar<T: Sync>(_: T) {}
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,21 +1,22 @@
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-2.rs:10:5 --> $DIR/not-panic-safe-2.rs:10:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<Rc<RefCell<i32>>>(); LL | assert::<Rc<RefCell<i32>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
= help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>` = help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::rc::Rc<std::cell::RefCell<i32>>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::rc::Rc<std::cell::RefCell<i32>>`
note: required by `assert`
--> $DIR/not-panic-safe-2.rs:7:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-2.rs:10:5 --> $DIR/not-panic-safe-2.rs:10:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<Rc<RefCell<i32>>>(); LL | assert::<Rc<RefCell<i32>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
@ -23,11 +24,6 @@ LL | assert::<Rc<RefCell<i32>>>();
= note: required because it appears within the type `std::cell::Cell<isize>` = note: required because it appears within the type `std::cell::Cell<isize>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::rc::Rc<std::cell::RefCell<i32>>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::rc::Rc<std::cell::RefCell<i32>>`
note: required by `assert`
--> $DIR/not-panic-safe-2.rs:7:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,21 +1,22 @@
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-3.rs:10:5 --> $DIR/not-panic-safe-3.rs:10:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<Arc<RefCell<i32>>>(); LL | assert::<Arc<RefCell<i32>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
= help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>` = help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc<std::cell::RefCell<i32>>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc<std::cell::RefCell<i32>>`
note: required by `assert`
--> $DIR/not-panic-safe-3.rs:7:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-3.rs:10:5 --> $DIR/not-panic-safe-3.rs:10:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<Arc<RefCell<i32>>>(); LL | assert::<Arc<RefCell<i32>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
@ -23,11 +24,6 @@ LL | assert::<Arc<RefCell<i32>>>();
= note: required because it appears within the type `std::cell::Cell<isize>` = note: required because it appears within the type `std::cell::Cell<isize>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc<std::cell::RefCell<i32>>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc<std::cell::RefCell<i32>>`
note: required by `assert`
--> $DIR/not-panic-safe-3.rs:7:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,21 +1,22 @@
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-4.rs:9:5 --> $DIR/not-panic-safe-4.rs:9:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<&RefCell<i32>>(); LL | assert::<&RefCell<i32>>();
| ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
= help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>` = help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::RefCell<i32>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::RefCell<i32>`
note: required by `assert`
--> $DIR/not-panic-safe-4.rs:6:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-4.rs:9:5 --> $DIR/not-panic-safe-4.rs:9:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<&RefCell<i32>>(); LL | assert::<&RefCell<i32>>();
| ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
@ -23,11 +24,6 @@ LL | assert::<&RefCell<i32>>();
= note: required because it appears within the type `std::cell::Cell<isize>` = note: required because it appears within the type `std::cell::Cell<isize>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::RefCell<i32>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::RefCell<i32>`
note: required by `assert`
--> $DIR/not-panic-safe-4.rs:6:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,16 +1,14 @@
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-5.rs:9:5 --> $DIR/not-panic-safe-5.rs:9:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<*const UnsafeCell<i32>>(); LL | assert::<*const UnsafeCell<i32>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
= help: the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>` = help: the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*const std::cell::UnsafeCell<i32>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*const std::cell::UnsafeCell<i32>`
note: required by `assert`
--> $DIR/not-panic-safe-5.rs:6:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,21 +1,22 @@
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-6.rs:9:5 --> $DIR/not-panic-safe-6.rs:9:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<*mut RefCell<i32>>(); LL | assert::<*mut RefCell<i32>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
= help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>` = help: within `std::cell::RefCell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*mut std::cell::RefCell<i32>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*mut std::cell::RefCell<i32>`
note: required by `assert`
--> $DIR/not-panic-safe-6.rs:6:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary error[E0277]: the type `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/not-panic-safe-6.rs:9:5 --> $DIR/not-panic-safe-6.rs:9:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<*mut RefCell<i32>>(); LL | assert::<*mut RefCell<i32>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
| |
@ -23,11 +24,6 @@ LL | assert::<*mut RefCell<i32>>();
= note: required because it appears within the type `std::cell::Cell<isize>` = note: required because it appears within the type `std::cell::Cell<isize>`
= note: required because it appears within the type `std::cell::RefCell<i32>` = note: required because it appears within the type `std::cell::RefCell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*mut std::cell::RefCell<i32>` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*mut std::cell::RefCell<i32>`
note: required by `assert`
--> $DIR/not-panic-safe-6.rs:6:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View File

@ -1,15 +1,13 @@
error[E0277]: the type `&mut i32` may not be safely transferred across an unwind boundary error[E0277]: the type `&mut i32` may not be safely transferred across an unwind boundary
--> $DIR/not-panic-safe.rs:9:5 --> $DIR/not-panic-safe.rs:9:5
| |
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ----------------------------------- required by `assert`
...
LL | assert::<&mut i32>(); LL | assert::<&mut i32>();
| ^^^^^^^^^^^^^^^^^^ `&mut i32` may not be safely transferred across an unwind boundary | ^^^^^^^^^^^^^^^^^^ `&mut i32` may not be safely transferred across an unwind boundary
| |
= help: the trait `std::panic::UnwindSafe` is not implemented for `&mut i32` = help: the trait `std::panic::UnwindSafe` is not implemented for `&mut i32`
note: required by `assert`
--> $DIR/not-panic-safe.rs:6:1
|
LL | fn assert<T: UnwindSafe + ?Sized>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error error: aborting due to previous error

View File

@ -1,80 +1,68 @@
error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/not-sync.rs:8:5 --> $DIR/not-sync.rs:8:5
| |
LL | fn test<T: Sync>() {}
| ------------------ required by `test`
...
LL | test::<Cell<i32>>(); LL | test::<Cell<i32>>();
| ^^^^^^^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell<i32>`
note: required by `test`
--> $DIR/not-sync.rs:5:1
|
LL | fn test<T: Sync>() {}
| ^^^^^^^^^^^^^^^^^^
error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely error[E0277]: `std::cell::RefCell<i32>` cannot be shared between threads safely
--> $DIR/not-sync.rs:10:5 --> $DIR/not-sync.rs:10:5
| |
LL | fn test<T: Sync>() {}
| ------------------ required by `test`
...
LL | test::<RefCell<i32>>(); LL | test::<RefCell<i32>>();
| ^^^^^^^^^^^^^^^^^^^^ `std::cell::RefCell<i32>` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^^^ `std::cell::RefCell<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell<i32>`
note: required by `test`
--> $DIR/not-sync.rs:5:1
|
LL | fn test<T: Sync>() {}
| ^^^^^^^^^^^^^^^^^^
error[E0277]: `std::rc::Rc<i32>` cannot be shared between threads safely error[E0277]: `std::rc::Rc<i32>` cannot be shared between threads safely
--> $DIR/not-sync.rs:13:5 --> $DIR/not-sync.rs:13:5
| |
LL | fn test<T: Sync>() {}
| ------------------ required by `test`
...
LL | test::<Rc<i32>>(); LL | test::<Rc<i32>>();
| ^^^^^^^^^^^^^^^ `std::rc::Rc<i32>` cannot be shared between threads safely | ^^^^^^^^^^^^^^^ `std::rc::Rc<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc<i32>`
note: required by `test`
--> $DIR/not-sync.rs:5:1
|
LL | fn test<T: Sync>() {}
| ^^^^^^^^^^^^^^^^^^
error[E0277]: `std::rc::Weak<i32>` cannot be shared between threads safely error[E0277]: `std::rc::Weak<i32>` cannot be shared between threads safely
--> $DIR/not-sync.rs:15:5 --> $DIR/not-sync.rs:15:5
| |
LL | fn test<T: Sync>() {}
| ------------------ required by `test`
...
LL | test::<Weak<i32>>(); LL | test::<Weak<i32>>();
| ^^^^^^^^^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::rc::Weak<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::rc::Weak<i32>`
note: required by `test`
--> $DIR/not-sync.rs:5:1
|
LL | fn test<T: Sync>() {}
| ^^^^^^^^^^^^^^^^^^
error[E0277]: `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely error[E0277]: `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
--> $DIR/not-sync.rs:18:5 --> $DIR/not-sync.rs:18:5
| |
LL | fn test<T: Sync>() {}
| ------------------ required by `test`
...
LL | test::<Receiver<i32>>(); LL | test::<Receiver<i32>>();
| ^^^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<i32>`
note: required by `test`
--> $DIR/not-sync.rs:5:1
|
LL | fn test<T: Sync>() {}
| ^^^^^^^^^^^^^^^^^^
error[E0277]: `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely error[E0277]: `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely
--> $DIR/not-sync.rs:20:5 --> $DIR/not-sync.rs:20:5
| |
LL | fn test<T: Sync>() {}
| ------------------ required by `test`
...
LL | test::<Sender<i32>>(); LL | test::<Sender<i32>>();
| ^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Sender<i32>` cannot be shared between threads safely
| |
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<i32>` = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<i32>`
note: required by `test`
--> $DIR/not-sync.rs:5:1
|
LL | fn test<T: Sync>() {}
| ^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors error: aborting due to 6 previous errors

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