diff --git a/src/etc/generate-deriving-span-tests.py b/src/etc/generate-deriving-span-tests.py index 1c525101c76f..66a3c8e55540 100755 --- a/src/etc/generate-deriving-span-tests.py +++ b/src/etc/generate-deriving-span-tests.py @@ -14,6 +14,8 @@ os.path.join(os.path.dirname(__file__), '../test/ui/derives/')) TEMPLATE = """\ +// ignore-x86 +// ^ due to stderr output differences // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' {error_deriving} diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 48f7fc444650..f6b872623d78 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -1893,10 +1893,13 @@ impl<'a> LoweringContext<'a> { if let Ok(snippet) = self.sess.source_map().span_to_snippet(data.span) { // Do not suggest going from `Trait()` to `Trait<>` if data.inputs.len() > 0 { + let split = snippet.find('(').unwrap(); + let trait_name = &snippet[0..split]; + let args = &snippet[split + 1 .. snippet.len() - 1]; err.span_suggestion( data.span, "use angle brackets instead", - format!("<{}>", &snippet[1..snippet.len() - 1]), + format!("{}<{}>", trait_name, args), Applicability::MaybeIncorrect, ); } diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 2c8590aa4e3f..92a8c0080473 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -2750,3 +2750,15 @@ pub enum Node<'hir> { Crate, } + +impl Node<'_> { + pub fn ident(&self) -> Option { + match self { + Node::TraitItem(TraitItem { ident, .. }) | + Node::ImplItem(ImplItem { ident, .. }) | + Node::ForeignItem(ForeignItem { ident, .. }) | + Node::Item(Item { ident, .. }) => Some(*ident), + _ => None, + } + } +} diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index c9018f1c290d..aff866fa76d5 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -40,10 +40,12 @@ use syntax::symbol::{sym, kw}; use syntax_pos::{DUMMY_SP, Span, ExpnKind}; impl<'a, 'tcx> InferCtxt<'a, 'tcx> { - pub fn report_fulfillment_errors(&self, - errors: &[FulfillmentError<'tcx>], - body_id: Option, - fallback_has_occurred: bool) { + pub fn report_fulfillment_errors( + &self, + errors: &[FulfillmentError<'tcx>], + body_id: Option, + fallback_has_occurred: bool, + ) { #[derive(Debug)] struct ErrorDescriptor<'tcx> { predicate: ty::Predicate<'tcx>, @@ -1053,6 +1055,13 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { .filter(|c| !c.is_whitespace()) .take_while(|c| *c == '&') .count(); + if let Some('\'') = snippet.chars() + .filter(|c| !c.is_whitespace()) + .skip(refs_number) + .next() + { // Do not suggest removal of borrow from type arguments. + return; + } let mut trait_type = trait_ref.self_ty(); @@ -1651,6 +1660,18 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { err.note(&msg); } } + ObligationCauseCode::BindingObligation(item_def_id, span) => { + let item_name = tcx.def_path_str(item_def_id); + let msg = format!("required by this bound in `{}`", item_name); + if let Some(ident) = tcx.opt_item_name(item_def_id) { + err.span_label(ident.span, ""); + } + if span != DUMMY_SP { + err.span_label(span, &msg); + } else { + err.note(&msg); + } + } ObligationCauseCode::ObjectCastObligation(object_ty) => { err.note(&format!("required for the cast to the object type `{}`", self.ty_to_string(object_ty))); diff --git a/src/librustc/traits/mod.rs b/src/librustc/traits/mod.rs index 27e4d1237c25..1123422ad600 100644 --- a/src/librustc/traits/mod.rs +++ b/src/librustc/traits/mod.rs @@ -176,6 +176,9 @@ pub enum ObligationCauseCode<'tcx> { /// also implement all supertraits of `X`. ItemObligation(DefId), + /// Like `ItemObligation`, but with extra detail on the source of the obligation. + BindingObligation(DefId, Span), + /// A type like `&'a T` is WF only if `T: 'a`. ReferenceOutlivesReferent(Ty<'tcx>), diff --git a/src/librustc/traits/structural_impls.rs b/src/librustc/traits/structural_impls.rs index 6930c9368282..68c97226f89c 100644 --- a/src/librustc/traits/structural_impls.rs +++ b/src/librustc/traits/structural_impls.rs @@ -472,6 +472,7 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> { super::TupleElem => Some(super::TupleElem), super::ProjectionWf(proj) => tcx.lift(&proj).map(super::ProjectionWf), super::ItemObligation(def_id) => Some(super::ItemObligation(def_id)), + super::BindingObligation(def_id, span) => Some(super::BindingObligation(def_id, span)), super::ReferenceOutlivesReferent(ty) => { tcx.lift(&ty).map(super::ReferenceOutlivesReferent) } diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 5ca819e12f23..8bb9648e031e 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -2797,6 +2797,10 @@ impl<'tcx> TyCtxt<'tcx> { }) } + pub fn opt_item_name(self, def_id: DefId) -> Option { + self.hir().as_local_hir_id(def_id).and_then(|hir_id| self.hir().get(hir_id).ident()) + } + pub fn opt_associated_item(self, def_id: DefId) -> Option { let is_associated_item = if let Some(hir_id) = self.hir().as_local_hir_id(def_id) { match self.hir().get(hir_id) { diff --git a/src/librustc_typeck/check/callee.rs b/src/librustc_typeck/check/callee.rs index e6999f9e3ac8..710d847384e6 100644 --- a/src/librustc_typeck/check/callee.rs +++ b/src/librustc_typeck/check/callee.rs @@ -263,7 +263,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn confirm_builtin_call( &self, - call_expr: &hir::Expr, + call_expr: &'tcx hir::Expr, callee_ty: Ty<'tcx>, arg_exprs: &'tcx [hir::Expr], expected: Expectation<'tcx>, @@ -425,7 +425,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ); self.check_argument_types( call_expr.span, - call_expr.span, + call_expr, inputs, &expected_arg_tys[..], arg_exprs, @@ -439,7 +439,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn confirm_deferred_closure_call( &self, - call_expr: &hir::Expr, + call_expr: &'tcx hir::Expr, arg_exprs: &'tcx [hir::Expr], expected: Expectation<'tcx>, fn_sig: ty::FnSig<'tcx>, @@ -458,7 +458,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { self.check_argument_types( call_expr.span, - call_expr.span, + call_expr, fn_sig.inputs(), &expected_arg_tys, arg_exprs, @@ -472,14 +472,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn confirm_overloaded_call( &self, - call_expr: &hir::Expr, + call_expr: &'tcx hir::Expr, arg_exprs: &'tcx [hir::Expr], expected: Expectation<'tcx>, method_callee: MethodCallee<'tcx>, ) -> Ty<'tcx> { let output_type = self.check_method_argument_types( call_expr.span, - call_expr.span, + call_expr, Ok(method_callee), arg_exprs, TupleArgumentsFlag::TupleArguments, diff --git a/src/librustc_typeck/check/expr.rs b/src/librustc_typeck/check/expr.rs index 1ae50b8cb288..e34a2c6f61c2 100644 --- a/src/librustc_typeck/check/expr.rs +++ b/src/librustc_typeck/check/expr.rs @@ -796,7 +796,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // Call the generic checker. self.check_method_argument_types( span, - expr.span, + expr, method, &args[1..], DontTupleArguments, diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index c96eab862988..38071a9e74da 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -2617,16 +2617,24 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// As `instantiate_type_scheme`, but for the bounds found in a /// generic type scheme. - fn instantiate_bounds(&self, span: Span, def_id: DefId, substs: SubstsRef<'tcx>) - -> ty::InstantiatedPredicates<'tcx> { + fn instantiate_bounds( + &self, + span: Span, + def_id: DefId, + substs: SubstsRef<'tcx>, + ) -> (ty::InstantiatedPredicates<'tcx>, Vec) { let bounds = self.tcx.predicates_of(def_id); + let spans: Vec = bounds.predicates.iter().map(|(_, span)| *span).collect(); let result = bounds.instantiate(self.tcx, substs); let result = self.normalize_associated_types_in(span, &result); - debug!("instantiate_bounds(bounds={:?}, substs={:?}) = {:?}", + debug!( + "instantiate_bounds(bounds={:?}, substs={:?}) = {:?}, {:?}", bounds, substs, - result); - result + result, + spans, + ); + (result, spans) } /// Replaces the opaque types from the given value with type variables, @@ -3062,12 +3070,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn check_method_argument_types( &self, sp: Span, - expr_sp: Span, + expr: &'tcx hir::Expr, method: Result, ()>, args_no_rcvr: &'tcx [hir::Expr], tuple_arguments: TupleArgumentsFlag, expected: Expectation<'tcx>, ) -> Ty<'tcx> { + let has_error = match method { Ok(method) => { method.substs.references_error() || method.sig.references_error() @@ -3082,8 +3091,16 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { TupleArguments => vec![self.tcx.intern_tup(&err_inputs[..])], }; - self.check_argument_types(sp, expr_sp, &err_inputs[..], &[], args_no_rcvr, - false, tuple_arguments, None); + self.check_argument_types( + sp, + expr, + &err_inputs[..], + &[], + args_no_rcvr, + false, + tuple_arguments, + None, + ); return self.tcx.types.err; } @@ -3095,9 +3112,16 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { method.sig.output(), &method.sig.inputs()[1..] ); - self.check_argument_types(sp, expr_sp, &method.sig.inputs()[1..], &expected_arg_tys[..], - args_no_rcvr, method.sig.c_variadic, tuple_arguments, - self.tcx.hir().span_if_local(method.def_id)); + self.check_argument_types( + sp, + expr, + &method.sig.inputs()[1..], + &expected_arg_tys[..], + args_no_rcvr, + method.sig.c_variadic, + tuple_arguments, + self.tcx.hir().span_if_local(method.def_id), + ); method.sig.output() } @@ -3174,7 +3198,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn check_argument_types( &self, sp: Span, - expr_sp: Span, + expr: &'tcx hir::Expr, fn_inputs: &[Ty<'tcx>], expected_arg_tys: &[Ty<'tcx>], args: &'tcx [hir::Expr], @@ -3183,7 +3207,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { def_span: Option, ) { let tcx = self.tcx; - // Grab the argument types, supplying fresh type variables // if the wrong number of arguments were supplied let supplied_arg_count = if tuple_arguments == DontTupleArguments { @@ -3194,8 +3217,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // All the input types from the fn signature must outlive the call // so as to validate implied bounds. - for &fn_input_ty in fn_inputs { - self.register_wf_obligation(fn_input_ty, sp, traits::MiscObligation); + for (fn_input_ty, arg_expr) in fn_inputs.iter().zip(args.iter()) { + self.register_wf_obligation(fn_input_ty, arg_expr.span, traits::MiscObligation); } let expected_arg_count = fn_inputs.len(); @@ -3217,7 +3240,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { err.span_label(def_s, "defined here"); } if sugg_unit { - let sugg_span = tcx.sess.source_map().end_point(expr_sp); + let sugg_span = tcx.sess.source_map().end_point(expr.span); // remove closing `)` from the span let sugg_span = sugg_span.shrink_to_lo(); err.span_suggestion( @@ -3311,6 +3334,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // the call. This helps coercions. if check_closures { self.select_obligations_where_possible(false, |errors| { + self.point_at_type_arg_instead_of_call_if_possible(errors, expr); self.point_at_arg_instead_of_call_if_possible( errors, &final_arg_types[..], @@ -3448,6 +3472,50 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } } + /// Given a vec of evaluated `FullfillmentError`s and an `fn` call expression, we walk the + /// `PathSegment`s and resolve their type parameters to see if any of the `FullfillmentError`s + /// were caused by them. If they were, we point at the corresponding type argument's span + /// instead of the `fn` call path span. + fn point_at_type_arg_instead_of_call_if_possible( + &self, + errors: &mut Vec>, + call_expr: &'tcx hir::Expr, + ) { + if let hir::ExprKind::Call(path, _) = &call_expr.node { + if let hir::ExprKind::Path(qpath) = &path.node { + if let hir::QPath::Resolved(_, path) = &qpath { + for error in errors { + if let ty::Predicate::Trait(predicate) = error.obligation.predicate { + // If any of the type arguments in this path segment caused the + // `FullfillmentError`, point at its span (#61860). + for arg in path.segments.iter() + .filter_map(|seg| seg.args.as_ref()) + .flat_map(|a| a.args.iter()) + { + if let hir::GenericArg::Type(hir_ty) = &arg { + if let hir::TyKind::Path( + hir::QPath::TypeRelative(..), + ) = &hir_ty.node { + // Avoid ICE with associated types. As this is best + // effort only, it's ok to ignore the case. It + // would trigger in `is_send::();` + // from `typeck-default-trait-impl-assoc-type.rs`. + } else { + let ty = AstConv::ast_ty_to_ty(self, hir_ty); + let ty = self.resolve_vars_if_possible(&ty); + if ty == predicate.skip_binder().self_ty() { + error.obligation.cause.span = hir_ty.span; + } + } + } + } + } + } + } + } + } + } + // AST fragment checking fn check_lit(&self, lit: &hir::Lit, @@ -3604,7 +3672,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { self.write_user_type_annotation_from_substs(hir_id, did, substs, None); // Check bounds on type arguments used in the path. - let bounds = self.instantiate_bounds(path_span, did, substs); + let (bounds, _) = self.instantiate_bounds(path_span, did, substs); let cause = traits::ObligationCause::new( path_span, self.body_id, @@ -4728,13 +4796,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // First, store the "user substs" for later. self.write_user_type_annotation_from_substs(hir_id, def_id, substs, user_self_ty); - // Add all the obligations that are required, substituting and - // normalized appropriately. - let bounds = self.instantiate_bounds(span, def_id, &substs); - self.add_obligations_for_parameters( - traits::ObligationCause::new(span, self.body_id, traits::ItemObligation(def_id)), - &bounds, - ); + self.add_required_obligations(span, def_id, &substs); // Substitute the values for the type parameters into the type of // the referenced item. @@ -4771,6 +4833,27 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { (ty_substituted, res) } + /// Add all the obligations that are required, substituting and normalized appropriately. + fn add_required_obligations(&self, span: Span, def_id: DefId, substs: &SubstsRef<'tcx>) { + let (bounds, spans) = self.instantiate_bounds(span, def_id, &substs); + + for (i, mut obligation) in traits::predicates_for_generics( + traits::ObligationCause::new( + span, + self.body_id, + traits::ItemObligation(def_id), + ), + self.param_env, + &bounds, + ).into_iter().enumerate() { + // This makes the error point at the bound, but we want to point at the argument + if let Some(span) = spans.get(i) { + obligation.cause.code = traits::BindingObligation(def_id, *span); + } + self.register_predicate(obligation); + } + } + fn check_rustc_args_require_const(&self, def_id: DefId, hir_id: hir::HirId, diff --git a/src/libsyntax/parse/parser/path.rs b/src/libsyntax/parse/parser/path.rs index dcd3c6480174..87839f8c70ee 100644 --- a/src/libsyntax/parse/parser/path.rs +++ b/src/libsyntax/parse/parser/path.rs @@ -129,10 +129,11 @@ impl<'a> Parser<'a> { self.parse_path(style) } - crate fn parse_path_segments(&mut self, - segments: &mut Vec, - style: PathStyle) - -> PResult<'a, ()> { + crate fn parse_path_segments( + &mut self, + segments: &mut Vec, + style: PathStyle, + ) -> PResult<'a, ()> { loop { let segment = self.parse_path_segment(style)?; if style == PathStyle::Expr { @@ -201,7 +202,7 @@ impl<'a> Parser<'a> { } else { // `(T, U) -> R` let (inputs, _) = self.parse_paren_comma_seq(|p| p.parse_ty())?; - let span = lo.to(self.prev_span); + let span = ident.span.to(self.prev_span); let output = if self.eat(&token::RArrow) { Some(self.parse_ty_common(false, false, false)?) } else { diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr index c65a44bfbccf..fbe2d192d0cc 100644 --- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -7,7 +7,7 @@ LL | f1(|_: (), _: ()| {}); | expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _` ... LL | fn f1(_: F) where F: Fn(&(), &()) {} - | ------------------------------------ required by `f1` + | -- ------------ required by this bound in `f1` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:2:5 @@ -18,7 +18,7 @@ LL | f1(|_: (), _: ()| {}); | expected signature of `fn(&(), &()) -> _` ... LL | fn f1(_: F) where F: Fn(&(), &()) {} - | ------------------------------------ required by `f1` + | -- ------------ required by this bound in `f1` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5 @@ -29,7 +29,7 @@ LL | f2(|_: (), _: ()| {}); | expected signature of `for<'a, 'r> fn(&'a (), &'r ()) -> _` ... LL | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} - | ----------------------------------------------- required by `f2` + | -- ----------------------- required by this bound in `f2` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:4:5 @@ -40,7 +40,7 @@ LL | f2(|_: (), _: ()| {}); | expected signature of `fn(&'a (), &()) -> _` ... LL | fn f2(_: F) where F: for<'a> Fn(&'a (), &()) {} - | ----------------------------------------------- required by `f2` + | -- --------------- required by this bound in `f2` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5 @@ -51,7 +51,7 @@ LL | f3(|_: (), _: ()| {}); | expected signature of `for<'r> fn(&(), &'r ()) -> _` ... LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} - | ------------------------------------------- required by `f3` + | -- --------------- required by this bound in `f3` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:6:5 @@ -62,7 +62,7 @@ LL | f3(|_: (), _: ()| {}); | expected signature of `fn(&(), &()) -> _` ... LL | fn f3<'a, F>(_: F) where F: Fn(&'a (), &()) {} - | ------------------------------------------- required by `f3` + | -- --------------- required by this bound in `f3` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5 @@ -73,7 +73,7 @@ LL | f4(|_: (), _: ()| {}); | expected signature of `for<'s, 'r> fn(&'s (), &'r ()) -> _` ... LL | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} - | ----------------------------------------------- required by `f4` + | -- ----------------------- required by this bound in `f4` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:8:5 @@ -84,7 +84,7 @@ LL | f4(|_: (), _: ()| {}); | expected signature of `fn(&(), &'r ()) -> _` ... LL | fn f4(_: F) where F: for<'r> Fn(&(), &'r ()) {} - | ----------------------------------------------- required by `f4` + | -- --------------- required by this bound in `f4` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5 @@ -95,7 +95,7 @@ LL | f5(|_: (), _: ()| {}); | expected signature of `for<'r> fn(&'r (), &'r ()) -> _` ... LL | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} - | -------------------------------------------------- required by `f5` + | -- -------------------------- required by this bound in `f5` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:10:5 @@ -106,7 +106,7 @@ LL | f5(|_: (), _: ()| {}); | expected signature of `fn(&'r (), &'r ()) -> _` ... LL | fn f5(_: F) where F: for<'r> Fn(&'r (), &'r ()) {} - | -------------------------------------------------- required by `f5` + | -- ------------------ required by this bound in `f5` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 @@ -117,7 +117,7 @@ LL | g1(|_: (), _: ()| {}); | expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _` ... LL | fn g1(_: F) where F: Fn(&(), Box) {} - | ------------------------------------------------- required by `g1` + | -- ------------------------- required by this bound in `g1` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:12:5 @@ -128,7 +128,7 @@ LL | g1(|_: (), _: ()| {}); | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` ... LL | fn g1(_: F) where F: Fn(&(), Box) {} - | ------------------------------------------------- required by `g1` + | -- ------------------------- required by this bound in `g1` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 @@ -139,7 +139,7 @@ LL | g2(|_: (), _: ()| {}); | expected signature of `for<'r> fn(&'r (), for<'s> fn(&'s ())) -> _` ... LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} - | ---------------------------------------- required by `g2` + | -- ---------------- required by this bound in `g2` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:14:5 @@ -150,7 +150,7 @@ LL | g2(|_: (), _: ()| {}); | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _` ... LL | fn g2(_: F) where F: Fn(&(), fn(&())) {} - | ---------------------------------------- required by `g2` + | -- ---------------- required by this bound in `g2` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 @@ -161,7 +161,7 @@ LL | g3(|_: (), _: ()| {}); | expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` ... LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} - | ------------------------------------------------------------ required by `g3` + | -- ------------------------------------ required by this bound in `g3` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:16:5 @@ -172,7 +172,7 @@ LL | g3(|_: (), _: ()| {}); | expected signature of `fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` ... LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} - | ------------------------------------------------------------ required by `g3` + | -- ---------------------------- required by this bound in `g3` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 @@ -183,7 +183,7 @@ LL | g4(|_: (), _: ()| {}); | expected signature of `for<'s> fn(&'s (), for<'r> fn(&'r ())) -> _` ... LL | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} - | --------------------------------------------------- required by `g4` + | -- --------------------------- required by this bound in `g4` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:18:5 @@ -194,7 +194,7 @@ LL | g4(|_: (), _: ()| {}); | expected signature of `fn(&(), for<'r> fn(&'r ())) -> _` ... LL | fn g4(_: F) where F: Fn(&(), for<'r> fn(&'r ())) {} - | --------------------------------------------------- required by `g4` + | -- --------------------------- required by this bound in `g4` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 @@ -205,7 +205,7 @@ LL | h1(|_: (), _: (), _: (), _: ()| {}); | 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 ())) -> _` ... LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} - | -------------------------------------------------------------------- required by `h1` + | -- -------------------------------------------- required by this bound in `h1` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:20:5 @@ -216,7 +216,7 @@ LL | h1(|_: (), _: (), _: (), _: ()| {}); | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &(), for<'r, 's> fn(&'r (), &'s ())) -> _` ... LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} - | -------------------------------------------------------------------- required by `h1` + | -- -------------------------------------------- required by this bound in `h1` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 @@ -227,7 +227,7 @@ LL | h2(|_: (), _: (), _: (), _: ()| {}); | 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 ())) -> _` ... LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} - | --------------------------------------------------------------------------------- required by `h2` + | -- --------------------------------------------------------- required by this bound in `h2` error[E0631]: type mismatch in closure arguments --> $DIR/anonymous-higher-ranked-lifetime.rs:22:5 @@ -238,7 +238,7 @@ LL | h2(|_: (), _: (), _: (), _: ()| {}); | expected signature of `fn(&(), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>, &'t0 (), for<'r, 's> fn(&'r (), &'s ())) -> _` ... LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} - | --------------------------------------------------------------------------------- required by `h2` + | -- ------------------------------------------------ required by this bound in `h2` error: aborting due to 22 previous errors diff --git a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr index a3049892abc3..6a2135ca4644 100644 --- a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr +++ b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `::Color == Blue` --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:31:10 | LL | fn blue_car>(c: C) { - | ------------------------------------ required by `blue_car` + | -------- ---------- required by this bound in `blue_car` ... LL | fn b() { blue_car(ModelT); } | ^^^^^^^^ expected struct `Black`, found struct `Blue` @@ -14,7 +14,7 @@ error[E0271]: type mismatch resolving `::Color == Black` --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10 | LL | fn black_car>(c: C) { - | -------------------------------------- required by `black_car` + | --------- ----------- required by this bound in `black_car` ... LL | fn c() { black_car(ModelU); } | ^^^^^^^^^ expected struct `Blue`, found struct `Black` diff --git a/src/test/ui/associated-types/associated-types-eq-3.stderr b/src/test/ui/associated-types/associated-types-eq-3.stderr index c9d88b7af075..83d89924944a 100644 --- a/src/test/ui/associated-types/associated-types-eq-3.stderr +++ b/src/test/ui/associated-types/associated-types-eq-3.stderr @@ -13,7 +13,7 @@ error[E0271]: type mismatch resolving `::A == Bar` --> $DIR/associated-types-eq-3.rs:38:5 | LL | fn foo1>(x: I) { - | ---------------------------- required by `foo1` + | ---- ----- required by this bound in `foo1` ... LL | foo1(a); | ^^^^ expected usize, found struct `Bar` diff --git a/src/test/ui/associated-types/associated-types-eq-hr.stderr b/src/test/ui/associated-types/associated-types-eq-hr.stderr index 05e6ed69812a..45b6cc9ba5f9 100644 --- a/src/test/ui/associated-types/associated-types-eq-hr.stderr +++ b/src/test/ui/associated-types/associated-types-eq-hr.stderr @@ -1,15 +1,13 @@ error[E0271]: type mismatch resolving `for<'x> >::A == &'x isize` --> $DIR/associated-types-eq-hr.rs:82:5 | -LL | / fn foo() -LL | | where T : for<'x> TheTrait<&'x isize, A = &'x isize> -LL | | { -LL | | // ok for IntStruct, but not UintStruct -LL | | } - | |_- required by `foo` +LL | fn foo() + | --- +LL | where T : for<'x> TheTrait<&'x isize, A = &'x isize> + | ------------- required by this bound in `foo` ... -LL | foo::(); - | ^^^^^^^^^^^^^^^^^ expected usize, found isize +LL | foo::(); + | ^^^^^^^^^^^^^^^^^ expected usize, found isize | = note: expected type `&usize` found type `&isize` @@ -17,31 +15,27 @@ LL | foo::(); error[E0271]: type mismatch resolving `for<'x> >::A == &'x usize` --> $DIR/associated-types-eq-hr.rs:86:5 | -LL | / fn bar() -LL | | where T : for<'x> TheTrait<&'x isize, A = &'x usize> -LL | | { -LL | | // ok for UintStruct, but not IntStruct -LL | | } - | |_- required by `bar` +LL | fn bar() + | --- +LL | where T : for<'x> TheTrait<&'x isize, A = &'x usize> + | ------------- required by this bound in `bar` ... -LL | bar::(); - | ^^^^^^^^^^^^^^^^ expected isize, found usize +LL | bar::(); + | ^^^^^^^^^^^^^^^^ 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 - --> $DIR/associated-types-eq-hr.rs:91:5 + --> $DIR/associated-types-eq-hr.rs:91:17 | -LL | / fn tuple_one() -LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize> -LL | | { -LL | | // not ok for tuple, two lifetimes and we pick first -LL | | } - | |_- required by `tuple_one` +LL | fn tuple_one() + | --------- +LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize> + | ---------------------------------------------------------- required by this bound in `tuple_one` ... -LL | tuple_one::(); - | ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple` +LL | tuple_one::(); + | ^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple` | = help: the following implementations were found: > @@ -49,28 +43,24 @@ LL | tuple_one::(); error[E0271]: type mismatch resolving `for<'x, 'y> >::A == &'x isize` --> $DIR/associated-types-eq-hr.rs:91:5 | -LL | / fn tuple_one() -LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize> -LL | | { -LL | | // not ok for tuple, two lifetimes and we pick first -LL | | } - | |_- required by `tuple_one` +LL | fn tuple_one() + | --------- +LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize> + | ------------- required by this bound in `tuple_one` ... -LL | tuple_one::(); - | ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime +LL | tuple_one::(); + | ^^^^^^^^^^^^^^^^^^ 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 - --> $DIR/associated-types-eq-hr.rs:97:5 + --> $DIR/associated-types-eq-hr.rs:97:17 | -LL | / fn tuple_two() -LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize> -LL | | { -LL | | // not ok for tuple, two lifetimes and we pick second -LL | | } - | |_- required by `tuple_two` +LL | fn tuple_two() + | --------- +LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize> + | ---------------------------------------------------------- required by this bound in `tuple_two` ... -LL | tuple_two::(); - | ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple` +LL | tuple_two::(); + | ^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple` | = help: the following implementations were found: > @@ -78,28 +68,24 @@ LL | tuple_two::(); error[E0271]: type mismatch resolving `for<'x, 'y> >::A == &'y isize` --> $DIR/associated-types-eq-hr.rs:97:5 | -LL | / fn tuple_two() -LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize> -LL | | { -LL | | // not ok for tuple, two lifetimes and we pick second -LL | | } - | |_- required by `tuple_two` +LL | fn tuple_two() + | --------- +LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize> + | ------------- required by this bound in `tuple_two` ... -LL | tuple_two::(); - | ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime +LL | tuple_two::(); + | ^^^^^^^^^^^^^^^^^^ 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 - --> $DIR/associated-types-eq-hr.rs:107:5 + --> $DIR/associated-types-eq-hr.rs:107:18 | -LL | / fn tuple_four() -LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)> -LL | | { -LL | | // not ok for tuple, two lifetimes, and lifetime matching is invariant -LL | | } - | |_- required by `tuple_four` +LL | fn tuple_four() + | ---------- +LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)> + | ------------------------------------------- required by this bound in `tuple_four` ... -LL | tuple_four::(); - | ^^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple` +LL | tuple_four::(); + | ^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple` | = help: the following implementations were found: > diff --git a/src/test/ui/associated-types/associated-types-issue-20346.stderr b/src/test/ui/associated-types/associated-types-issue-20346.stderr index e037bd851ca2..c8f8725afc45 100644 --- a/src/test/ui/associated-types/associated-types-issue-20346.stderr +++ b/src/test/ui/associated-types/associated-types-issue-20346.stderr @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving ` as Iterator>::Item == std::op --> $DIR/associated-types-issue-20346.rs:34:5 | LL | fn is_iterator_of>(_: &I) {} - | ------------------------------------------------ required by `is_iterator_of` + | -------------- ------ required by this bound in `is_iterator_of` ... LL | is_iterator_of::, _>(&adapter); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter, found enum `std::option::Option` diff --git a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr index d6328a64c7c7..c7de186c1d3e 100644 --- a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr +++ b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr @@ -5,7 +5,7 @@ LL | want_y(t); | ^^^^^^ expected associated type, found i32 ... LL | fn want_y>(t: &T) { } - | ------------------------------ required by `want_y` + | ------ ----- required by this bound in `want_y` | = note: expected type `::Y` found type `i32` @@ -19,7 +19,7 @@ LL | want_x(t); | ^^^^^^ expected associated type, found u32 ... LL | fn want_x>(t: &T) { } - | ------------------------------ required by `want_x` + | ------ ----- required by this bound in `want_x` | = note: expected type `::X` found type `u32` diff --git a/src/test/ui/associated-types/associated-types-path-2.stderr b/src/test/ui/associated-types/associated-types-path-2.stderr index a8fcaeac95d5..bb2e7251849d 100644 --- a/src/test/ui/associated-types/associated-types-path-2.stderr +++ b/src/test/ui/associated-types/associated-types-path-2.stderr @@ -12,7 +12,7 @@ error[E0277]: the trait bound `u32: Foo` is not satisfied --> $DIR/associated-types-path-2.rs:29:5 | LL | pub fn f1(a: T, x: T::A) {} - | -------------------------------- required by `f1` + | -- --- required by this bound in `f1` ... LL | f1(2u32, 4u32); | ^^ the trait `Foo` is not implemented for `u32` @@ -27,7 +27,7 @@ error[E0277]: the trait bound `u32: Foo` is not satisfied --> $DIR/associated-types-path-2.rs:35:5 | LL | pub fn f1(a: T, x: T::A) {} - | -------------------------------- required by `f1` + | -- --- required by this bound in `f1` ... LL | f1(2u32, 4i32); | ^^ the trait `Foo` is not implemented for `u32` diff --git a/src/test/ui/associated-types/higher-ranked-projection.bad.stderr b/src/test/ui/associated-types/higher-ranked-projection.bad.stderr index 22d44888e951..74c9ad2c39e6 100644 --- a/src/test/ui/associated-types/higher-ranked-projection.bad.stderr +++ b/src/test/ui/associated-types/higher-ranked-projection.bad.stderr @@ -1,13 +1,13 @@ error[E0271]: type mismatch resolving `for<'a> <&'a _ as Mirror>::Image == _` --> $DIR/higher-ranked-projection.rs:25:5 | -LL | / fn foo(_t: T) -LL | | where for<'a> &'a T: Mirror -LL | | {} - | |__- required by `foo` +LL | fn foo(_t: T) + | --- +LL | where for<'a> &'a T: Mirror + | ------- required by this bound in `foo` ... -LL | foo(()); - | ^^^ expected bound lifetime parameter 'a, found concrete lifetime +LL | foo(()); + | ^^^ expected bound lifetime parameter 'a, found concrete lifetime error: aborting due to previous error diff --git a/src/test/ui/async-await/async-fn-nonsend.stderr b/src/test/ui/async-await/async-fn-nonsend.stderr index d2f92f04f40a..001e0b1cad30 100644 --- a/src/test/ui/async-await/async-fn-nonsend.stderr +++ b/src/test/ui/async-await/async-fn-nonsend.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely --> $DIR/async-fn-nonsend.rs:50:5 | LL | fn assert_send(_: impl Send) {} - | ---------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send(local_dropped_before_await()); | ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely @@ -19,7 +19,7 @@ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely --> $DIR/async-fn-nonsend.rs:52:5 | LL | fn assert_send(_: impl Send) {} - | ---------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send(non_send_temporary_in_match()); | ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely @@ -36,7 +36,7 @@ error[E0277]: `dyn std::fmt::Write` cannot be sent between threads safely --> $DIR/async-fn-nonsend.rs:54:5 | LL | fn assert_send(_: impl Send) {} - | ---------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^ `dyn std::fmt::Write` cannot be sent between threads safely @@ -55,7 +55,7 @@ error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between thr --> $DIR/async-fn-nonsend.rs:54:5 | LL | fn assert_send(_: impl Send) {} - | ---------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely diff --git a/src/test/ui/async-await/issues/issue-62009-1.rs b/src/test/ui/async-await/issues/issue-62009-1.rs index 3ee7ab2e9d12..788474365c9e 100644 --- a/src/test/ui/async-await/issues/issue-62009-1.rs +++ b/src/test/ui/async-await/issues/issue-62009-1.rs @@ -1,4 +1,6 @@ // edition:2018 +// ignore-x86 +// ^ due to stderr output differences async fn print_dur() {} diff --git a/src/test/ui/async-await/issues/issue-62009-1.stderr b/src/test/ui/async-await/issues/issue-62009-1.stderr index cd155f0fc32b..f63eaa4c48a9 100644 --- a/src/test/ui/async-await/issues/issue-62009-1.stderr +++ b/src/test/ui/async-await/issues/issue-62009-1.stderr @@ -1,5 +1,5 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-62009-1.rs:6:5 + --> $DIR/issue-62009-1.rs:8:5 | LL | fn main() { | ---- this is not `async` @@ -7,7 +7,7 @@ LL | async { let (); }.await; | ^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-62009-1.rs:8:5 + --> $DIR/issue-62009-1.rs:10:5 | LL | fn main() { | ---- this is not `async` @@ -19,7 +19,7 @@ LL | | }.await; | |___________^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-62009-1.rs:12:5 + --> $DIR/issue-62009-1.rs:14:5 | LL | fn main() { | ---- this is not `async` @@ -27,13 +27,16 @@ LL | fn main() { LL | (|_| 2333).await; | ^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks -error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]: std::future::Future` is not satisfied - --> $DIR/issue-62009-1.rs:12:5 +error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]: std::future::Future` is not satisfied + --> $DIR/issue-62009-1.rs:14:5 | LL | (|_| 2333).await; - | ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` + | ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]` + | + ::: $SRC_DIR/libstd/future.rs:LL:COL | - = note: required by `std::future::poll_with_tls_context` +LL | F: Future + | ------ required by this bound in `std::future::poll_with_tls_context` error: aborting due to 4 previous errors diff --git a/src/test/ui/chalkify/type_inference.stderr b/src/test/ui/chalkify/type_inference.stderr index 15c52f461c18..c6bc306e45a1 100644 --- a/src/test/ui/chalkify/type_inference.stderr +++ b/src/test/ui/chalkify/type_inference.stderr @@ -11,7 +11,7 @@ error[E0277]: the trait bound `{float}: Bar` is not satisfied --> $DIR/type_inference.rs:25:5 | LL | fn only_bar(_x: T) { } - | -------------------------- required by `only_bar` + | -------- --- required by this bound in `only_bar` ... LL | only_bar(x); | ^^^^^^^^ the trait `Bar` is not implemented for `{float}` diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr index 565c60e5216d..a6b52b258f00 100644 --- a/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr +++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr @@ -1,44 +1,41 @@ error[E0631]: type mismatch in closure arguments --> $DIR/expect-fn-supply-fn.rs:30:5 | -LL | / fn with_closure_expecting_fn_with_free_region(_: F) -LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32) -LL | | { -LL | | } - | |_- required by `with_closure_expecting_fn_with_free_region` +LL | fn with_closure_expecting_fn_with_free_region(_: F) + | ------------------------------------------ +LL | where F: for<'a> FnOnce(fn(&'a u32), &i32) + | ------------------------- required by this bound in `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) -> _` +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 --> $DIR/expect-fn-supply-fn.rs:37:5 | -LL | / fn with_closure_expecting_fn_with_bound_region(_: F) -LL | | where F: FnOnce(fn(&u32), &i32) -LL | | { -LL | | } - | |_- required by `with_closure_expecting_fn_with_bound_region` +LL | fn with_closure_expecting_fn_with_bound_region(_: F) + | ------------------------------------------- +LL | where F: FnOnce(fn(&u32), &i32) + | ---------------------- required by this bound in `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) -> _` +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 --> $DIR/expect-fn-supply-fn.rs:46:5 | -LL | / fn with_closure_expecting_fn_with_bound_region(_: F) -LL | | where F: FnOnce(fn(&u32), &i32) -LL | | { -LL | | } - | |_- required by `with_closure_expecting_fn_with_bound_region` +LL | fn with_closure_expecting_fn_with_bound_region(_: F) + | ------------------------------------------- +LL | where F: FnOnce(fn(&u32), &i32) + | ---------------------- required by this bound in `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) -> _` +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 3 previous errors diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr index c618c2c550ba..ac4666fe36de 100644 --- a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr +++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr @@ -39,44 +39,41 @@ LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {}); error[E0631]: type mismatch in closure arguments --> $DIR/expect-fn-supply-fn.rs:30:5 | -LL | / fn with_closure_expecting_fn_with_free_region(_: F) -LL | | where F: for<'a> FnOnce(fn(&'a u32), &i32) -LL | | { -LL | | } - | |_- required by `with_closure_expecting_fn_with_free_region` +LL | fn with_closure_expecting_fn_with_free_region(_: F) + | ------------------------------------------ +LL | where F: for<'a> FnOnce(fn(&'a u32), &i32) + | ------------------------- required by this bound in `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) -> _` +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 --> $DIR/expect-fn-supply-fn.rs:37:5 | -LL | / fn with_closure_expecting_fn_with_bound_region(_: F) -LL | | where F: FnOnce(fn(&u32), &i32) -LL | | { -LL | | } - | |_- required by `with_closure_expecting_fn_with_bound_region` +LL | fn with_closure_expecting_fn_with_bound_region(_: F) + | ------------------------------------------- +LL | where F: FnOnce(fn(&u32), &i32) + | ---------------------- required by this bound in `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) -> _` +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 --> $DIR/expect-fn-supply-fn.rs:46:5 | -LL | / fn with_closure_expecting_fn_with_bound_region(_: F) -LL | | where F: FnOnce(fn(&u32), &i32) -LL | | { -LL | | } - | |_- required by `with_closure_expecting_fn_with_bound_region` +LL | fn with_closure_expecting_fn_with_bound_region(_: F) + | ------------------------------------------- +LL | where F: FnOnce(fn(&u32), &i32) + | ---------------------- required by this bound in `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) -> _` +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 diff --git a/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr b/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr index a2b3a66dc4d2..9fbe95a9c394 100644 --- a/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr +++ b/src/test/ui/closure-expected-type/expect-infer-var-appearing-twice.stderr @@ -1,16 +1,15 @@ error[E0631]: type mismatch in closure arguments --> $DIR/expect-infer-var-appearing-twice.rs:14:5 | -LL | / fn with_closure(_: F) -LL | | where F: FnOnce(A, A) -LL | | { -LL | | } - | |_- required by `with_closure` +LL | fn with_closure(_: F) + | ------------ +LL | where F: FnOnce(A, A) + | ------------ required by this bound in `with_closure` ... -LL | with_closure(|x: u32, y: i32| { - | ^^^^^^^^^^^^ ---------------- found signature of `fn(u32, i32) -> _` - | | - | expected signature of `fn(_, _) -> _` +LL | with_closure(|x: u32, y: i32| { + | ^^^^^^^^^^^^ ---------------- found signature of `fn(u32, i32) -> _` + | | + | expected signature of `fn(_, _) -> _` error: aborting due to previous error diff --git a/src/test/ui/closures/closure-bounds-subtype.stderr b/src/test/ui/closures/closure-bounds-subtype.stderr index e9b34e05ac2e..4b703eded69c 100644 --- a/src/test/ui/closures/closure-bounds-subtype.stderr +++ b/src/test/ui/closures/closure-bounds-subtype.stderr @@ -2,7 +2,7 @@ error[E0277]: `F` cannot be shared between threads safely --> $DIR/closure-bounds-subtype.rs:13:22 | LL | fn take_const_owned(_: F) where F: FnOnce() + Sync + Send { - | ------------------------------------------------------------ required by `take_const_owned` + | ---------------- ---- required by this bound in `take_const_owned` ... LL | take_const_owned(f); | ^ `F` cannot be shared between threads safely diff --git a/src/test/ui/closures/closure-move-sync.rs b/src/test/ui/closures/closure-move-sync.rs index 580cd1af4f30..951a3bcb5f42 100644 --- a/src/test/ui/closures/closure-move-sync.rs +++ b/src/test/ui/closures/closure-move-sync.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences use std::thread; use std::sync::mpsc::channel; diff --git a/src/test/ui/closures/closure-move-sync.stderr b/src/test/ui/closures/closure-move-sync.stderr index 8afebc7c7481..f676df9c559e 100644 --- a/src/test/ui/closures/closure-move-sync.stderr +++ b/src/test/ui/closures/closure-move-sync.stderr @@ -1,24 +1,32 @@ error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely - --> $DIR/closure-move-sync.rs:6:13 + --> $DIR/closure-move-sync.rs:8:13 | LL | let t = thread::spawn(|| { | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely + | + ::: $SRC_DIR/libstd/thread/mod.rs:LL:COL + | +LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static + | ---- required by this bound in `std::thread::spawn` | = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<()>` = note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Receiver<()>` - = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:6:27: 9:6 recv:&std::sync::mpsc::Receiver<()>]` - = note: required by `std::thread::spawn` + = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:8:27: 11:6 recv:&std::sync::mpsc::Receiver<()>]` error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely - --> $DIR/closure-move-sync.rs:18:5 + --> $DIR/closure-move-sync.rs:20:5 | LL | thread::spawn(|| tx.send(()).unwrap()); | ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared between threads safely + | + ::: $SRC_DIR/libstd/thread/mod.rs:LL:COL + | +LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static + | ---- required by this bound in `std::thread::spawn` | = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<()>` = note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Sender<()>` - = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:18:19: 18:42 tx:&std::sync::mpsc::Sender<()>]` - = note: required by `std::thread::spawn` + = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:20:19: 20:42 tx:&std::sync::mpsc::Sender<()>]` error: aborting due to 2 previous errors diff --git a/src/test/ui/defaulted-never-note.rs b/src/test/ui/defaulted-never-note.rs index cf1922ecc789..d3fb8a09414c 100644 --- a/src/test/ui/defaulted-never-note.rs +++ b/src/test/ui/defaulted-never-note.rs @@ -19,7 +19,8 @@ trait ImplementedForUnitButNotNever {} impl ImplementedForUnitButNotNever for () {} fn foo(_t: T) {} -//~^ NOTE required by `foo` +//~^ NOTE required by this bound in `foo` +//~| NOTE fn smeg() { let _x = return; diff --git a/src/test/ui/defaulted-never-note.stderr b/src/test/ui/defaulted-never-note.stderr index 277477a0b0ac..28c9da059eda 100644 --- a/src/test/ui/defaulted-never-note.stderr +++ b/src/test/ui/defaulted-never-note.stderr @@ -1,8 +1,8 @@ error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied - --> $DIR/defaulted-never-note.rs:26:5 + --> $DIR/defaulted-never-note.rs:27:5 | LL | fn foo(_t: T) {} - | ----------------------------------------------- required by `foo` + | --- ----------------------------- required by this bound in `foo` ... LL | foo(_x); | ^^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!` diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs index 3018a7b6d03e..ed87360a0be9 100644 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs +++ b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr index 417c720c63e9..708ebca9fb15 100644 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr @@ -1,10 +1,13 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied - --> $DIR/derives-span-Hash-enum-struct-variant.rs:9:6 + --> $DIR/derives-span-Hash-enum-struct-variant.rs:11:6 | LL | x: Error | ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | + ::: $SRC_DIR/libcore/hash/mod.rs:LL:COL | - = note: required by `std::hash::Hash::hash` +LL | fn hash(&self, state: &mut H); + | - required by this bound in `std::hash::Hash::hash` error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Hash-enum.rs b/src/test/ui/derives/derives-span-Hash-enum.rs index bb656e5c2fe3..5b3649c9826e 100644 --- a/src/test/ui/derives/derives-span-Hash-enum.rs +++ b/src/test/ui/derives/derives-span-Hash-enum.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' diff --git a/src/test/ui/derives/derives-span-Hash-enum.stderr b/src/test/ui/derives/derives-span-Hash-enum.stderr index 25be8794889f..dc171cbe5dd1 100644 --- a/src/test/ui/derives/derives-span-Hash-enum.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum.stderr @@ -1,10 +1,13 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied - --> $DIR/derives-span-Hash-enum.rs:9:6 + --> $DIR/derives-span-Hash-enum.rs:11:6 | LL | Error | ^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | + ::: $SRC_DIR/libcore/hash/mod.rs:LL:COL | - = note: required by `std::hash::Hash::hash` +LL | fn hash(&self, state: &mut H); + | - required by this bound in `std::hash::Hash::hash` error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Hash-struct.rs b/src/test/ui/derives/derives-span-Hash-struct.rs index fa5e2af6be87..ead70861a0ad 100644 --- a/src/test/ui/derives/derives-span-Hash-struct.rs +++ b/src/test/ui/derives/derives-span-Hash-struct.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' diff --git a/src/test/ui/derives/derives-span-Hash-struct.stderr b/src/test/ui/derives/derives-span-Hash-struct.stderr index c0574453a7a6..429449b82bf6 100644 --- a/src/test/ui/derives/derives-span-Hash-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-struct.stderr @@ -1,10 +1,13 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied - --> $DIR/derives-span-Hash-struct.rs:8:5 + --> $DIR/derives-span-Hash-struct.rs:10:5 | LL | x: Error | ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | + ::: $SRC_DIR/libcore/hash/mod.rs:LL:COL | - = note: required by `std::hash::Hash::hash` +LL | fn hash(&self, state: &mut H); + | - required by this bound in `std::hash::Hash::hash` error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.rs b/src/test/ui/derives/derives-span-Hash-tuple-struct.rs index 3822bce1466e..820f13ed18ef 100644 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.rs +++ b/src/test/ui/derives/derives-span-Hash-tuple-struct.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py' diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr index 6339c38578eb..a6c4c479b24d 100644 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr @@ -1,10 +1,13 @@ error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied - --> $DIR/derives-span-Hash-tuple-struct.rs:8:5 + --> $DIR/derives-span-Hash-tuple-struct.rs:10:5 | LL | Error | ^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | + ::: $SRC_DIR/libcore/hash/mod.rs:LL:COL | - = note: required by `std::hash::Hash::hash` +LL | fn hash(&self, state: &mut H); + | - required by this bound in `std::hash::Hash::hash` error: aborting due to previous error diff --git a/src/test/ui/derives/deriving-copyclone.stderr b/src/test/ui/derives/deriving-copyclone.stderr index f142257604cc..4cca14ae089e 100644 --- a/src/test/ui/derives/deriving-copyclone.stderr +++ b/src/test/ui/derives/deriving-copyclone.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `C: std::marker::Copy` is not satisfied --> $DIR/deriving-copyclone.rs:31:13 | LL | fn is_copy(_: T) {} - | ------------------------- required by `is_copy` + | ------- ---- required by this bound in `is_copy` ... LL | is_copy(B { a: 1, b: C }); | ^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `C` @@ -13,7 +13,7 @@ error[E0277]: the trait bound `C: std::clone::Clone` is not satisfied --> $DIR/deriving-copyclone.rs:32:14 | LL | fn is_clone(_: T) {} - | --------------------------- required by `is_clone` + | -------- ----- required by this bound in `is_clone` ... LL | is_clone(B { a: 1, b: C }); | ^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `C` @@ -24,7 +24,7 @@ error[E0277]: the trait bound `D: std::marker::Copy` is not satisfied --> $DIR/deriving-copyclone.rs:35:13 | LL | fn is_copy(_: T) {} - | ------------------------- required by `is_copy` + | ------- ---- required by this bound in `is_copy` ... LL | is_copy(B { a: 1, b: D }); | ^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `D` diff --git a/src/test/ui/did_you_mean/recursion_limit.stderr b/src/test/ui/did_you_mean/recursion_limit.stderr index 745d90a5d4cb..b05b92bf1e94 100644 --- a/src/test/ui/did_you_mean/recursion_limit.stderr +++ b/src/test/ui/did_you_mean/recursion_limit.stderr @@ -2,7 +2,7 @@ error[E0275]: overflow evaluating the requirement `J: std::marker::Send` --> $DIR/recursion_limit.rs:34:5 | LL | fn is_send() { } - | -------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` ... LL | is_send::(); | ^^^^^^^^^^^^ diff --git a/src/test/ui/error-codes/E0214.stderr b/src/test/ui/error-codes/E0214.stderr index a10f2c00578c..bcbd3a91cb95 100644 --- a/src/test/ui/error-codes/E0214.stderr +++ b/src/test/ui/error-codes/E0214.stderr @@ -1,11 +1,11 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/E0214.rs:2:15 + --> $DIR/E0214.rs:2:12 | LL | let v: Vec(&str) = vec!["foo"]; - | ^^^^^^ - | | - | only `Fn` traits may use parentheses - | help: use angle brackets instead: `<&str>` + | ^^^^^^^^^ + | | + | only `Fn` traits may use parentheses + | help: use angle brackets instead: `Vec<&str>` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr index 0afcbcc79eee..c56853f45a0b 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `::AssociatedType == u32` --> $DIR/E0271.rs:10:5 | LL | fn foo(t: T) where T: Trait { - | -------------------------------------------------- required by `foo` + | --- ------------------ required by this bound in `foo` ... LL | foo(3_i8); | ^^^ expected reference, found u32 diff --git a/src/test/ui/error-codes/E0277-2.stderr b/src/test/ui/error-codes/E0277-2.stderr index b42849cd8420..407e51e4f5f9 100644 --- a/src/test/ui/error-codes/E0277-2.stderr +++ b/src/test/ui/error-codes/E0277-2.stderr @@ -2,7 +2,7 @@ error[E0277]: `*const u8` cannot be sent between threads safely --> $DIR/E0277-2.rs:16:5 | LL | fn is_send() { } - | --------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` ... LL | is_send::(); | ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely diff --git a/src/test/ui/error-codes/E0277.stderr b/src/test/ui/error-codes/E0277.stderr index 9cd0dc7a68e7..a069d048c886 100644 --- a/src/test/ui/error-codes/E0277.stderr +++ b/src/test/ui/error-codes/E0277.stderr @@ -14,7 +14,7 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied --> $DIR/E0277.rs:17:15 | LL | fn some_func(foo: T) { - | ---------------------------- required by `some_func` + | --------- --- required by this bound in `some_func` ... LL | some_func(5i32); | ^^^^ the trait `Foo` is not implemented for `i32` diff --git a/src/test/ui/error-should-say-copy-not-pod.stderr b/src/test/ui/error-should-say-copy-not-pod.stderr index df79aeea054c..d0148f418e33 100644 --- a/src/test/ui/error-should-say-copy-not-pod.stderr +++ b/src/test/ui/error-should-say-copy-not-pod.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not sa --> $DIR/error-should-say-copy-not-pod.rs:6:17 | LL | fn check_bound(_: T) {} - | ---------------------------- required by `check_bound` + | ----------- ---- required by this bound in `check_bound` ... LL | check_bound("nocopy".to_string()); | ^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` diff --git a/src/test/ui/extern/extern-types-not-sync-send.stderr b/src/test/ui/extern/extern-types-not-sync-send.stderr index 0f32d4489dec..c395f3875ea0 100644 --- a/src/test/ui/extern/extern-types-not-sync-send.stderr +++ b/src/test/ui/extern/extern-types-not-sync-send.stderr @@ -1,22 +1,22 @@ 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:19 | LL | fn assert_sync() { } - | ---------------------------------- required by `assert_sync` + | ----------- ---- required by this bound in `assert_sync` ... LL | assert_sync::(); - | ^^^^^^^^^^^^^^^^ `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` 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:19 | LL | fn assert_send() { } - | ---------------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::(); - | ^^^^^^^^^^^^^^^^ `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` diff --git a/src/test/ui/extern/extern-types-unsized.stderr b/src/test/ui/extern/extern-types-unsized.stderr index 06527d973e2a..0417186eed34 100644 --- a/src/test/ui/extern/extern-types-unsized.stderr +++ b/src/test/ui/extern/extern-types-unsized.stderr @@ -1,11 +1,11 @@ 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:20 | LL | fn assert_sized() { } - | -------------------- required by `assert_sized` + | ------------ - required by this bound in `assert_sized` ... LL | assert_sized::(); - | ^^^^^^^^^^^^^^^^^ 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` = note: to learn more, visit @@ -14,7 +14,7 @@ error[E0277]: the size for values of type `A` cannot be known at compilation tim --> $DIR/extern-types-unsized.rs:25:5 | LL | fn assert_sized() { } - | -------------------- required by `assert_sized` + | ------------ - required by this bound in `assert_sized` ... LL | assert_sized::(); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -27,7 +27,7 @@ error[E0277]: the size for values of type `A` cannot be known at compilation tim --> $DIR/extern-types-unsized.rs:28:5 | LL | fn assert_sized() { } - | -------------------- required by `assert_sized` + | ------------ - required by this bound in `assert_sized` ... LL | assert_sized::>(); | ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -40,7 +40,7 @@ error[E0277]: the size for values of type `A` cannot be known at compilation tim --> $DIR/extern-types-unsized.rs:31:5 | LL | fn assert_sized() { } - | -------------------- required by `assert_sized` + | ------------ - required by this bound in `assert_sized` ... LL | assert_sized::>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/extern/extern-wrong-value-type.stderr b/src/test/ui/extern/extern-wrong-value-type.stderr index f2468895d21d..9a6af8119a8c 100644 --- a/src/test/ui/extern/extern-wrong-value-type.stderr +++ b/src/test/ui/extern/extern-wrong-value-type.stderr @@ -2,7 +2,7 @@ error[E0277]: expected a `std::ops::Fn<()>` closure, found `extern "C" fn() {f}` --> $DIR/extern-wrong-value-type.rs:9:11 | LL | fn is_fn(_: F) where F: Fn() {} - | ------------------------------- required by `is_fn` + | ----- ---- required by this bound in `is_fn` ... LL | is_fn(f); | ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}` diff --git a/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr b/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr index fc4317b316a3..c05379c71eea 100644 --- a/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr +++ b/src/test/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr @@ -44,10 +44,10 @@ LL | impl Fn<()> for Foo { = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable error[E0229]: associated type bindings are not allowed here - --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:15:12 + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:15:6 | LL | impl FnOnce() for Foo1 { - | ^^ associated type not allowed here + | ^^^^^^^^ associated type not allowed here error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:21:6 diff --git a/src/test/ui/fmt/send-sync.stderr b/src/test/ui/fmt/send-sync.stderr index 599dcfaa7261..be6e41afaf81 100644 --- a/src/test/ui/fmt/send-sync.stderr +++ b/src/test/ui/fmt/send-sync.stderr @@ -2,7 +2,7 @@ error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between thr --> $DIR/send-sync.rs:8:5 | LL | fn send(_: T) {} - | ---------------------- required by `send` + | ---- ---- required by this bound in `send` ... LL | send(format_args!("{:?}", c)); | ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely @@ -20,7 +20,7 @@ error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between thr --> $DIR/send-sync.rs:9:5 | LL | fn sync(_: T) {} - | ---------------------- required by `sync` + | ---- ---- required by this bound in `sync` ... LL | sync(format_args!("{:?}", c)); | ^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr index 4d610b49dff8..f891b9c6439b 100644 --- a/src/test/ui/fn/fn-trait-formatting.stderr +++ b/src/test/ui/fn/fn-trait-formatting.stderr @@ -29,7 +29,7 @@ error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `{integer}` --> $DIR/fn-trait-formatting.rs:19:14 | LL | fn needs_fn(x: F) where F: Fn(isize) -> isize {} - | ------------------------------------------------ required by `needs_fn` + | -------- ------------------ required by this bound in `needs_fn` ... LL | needs_fn(1); | ^ expected an `Fn<(isize,)>` closure, found `{integer}` diff --git a/src/test/ui/generator-yielding-or-returning-itself.stderr b/src/test/ui/generator-yielding-or-returning-itself.stderr index 1049bb6240a2..c9a71e03858f 100644 --- a/src/test/ui/generator-yielding-or-returning-itself.stderr +++ b/src/test/ui/generator-yielding-or-returning-itself.stderr @@ -16,14 +16,13 @@ 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 _]` --> $DIR/generator-yielding-or-returning-itself.rs:28:5 | -LL | / pub fn want_cyclic_generator_yield(_: T) -LL | | where T: Generator -LL | | { -LL | | } - | |_- required by `want_cyclic_generator_yield` +LL | pub fn want_cyclic_generator_yield(_: T) + | --------------------------- +LL | where T: Generator + | --------- required by this bound in `want_cyclic_generator_yield` ... -LL | want_cyclic_generator_yield(|| { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic type of infinite size +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, diff --git a/src/test/ui/generator/not-send-sync.stderr b/src/test/ui/generator/not-send-sync.stderr index 51416ce0d2f7..620db245d3e5 100644 --- a/src/test/ui/generator/not-send-sync.stderr +++ b/src/test/ui/generator/not-send-sync.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::cell::Cell` cannot be shared between threads safely --> $DIR/not-send-sync.rs:16:5 | LL | fn assert_send(_: T) {} - | ----------------------------- required by `main::assert_send` + | ----------- ---- required by this bound in `main::assert_send` ... LL | assert_send(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely @@ -15,7 +15,7 @@ error[E0277]: `std::cell::Cell` cannot be shared between threads safely --> $DIR/not-send-sync.rs:9:5 | LL | fn assert_sync(_: T) {} - | ----------------------------- required by `main::assert_sync` + | ----------- ---- required by this bound in `main::assert_sync` ... LL | assert_sync(|| { | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely diff --git a/src/test/ui/generator/static-not-unpin.stderr b/src/test/ui/generator/static-not-unpin.stderr index b7871ee3478a..f2b1078e2b53 100644 --- a/src/test/ui/generator/static-not-unpin.stderr +++ b/src/test/ui/generator/static-not-unpin.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `[static generator@$DIR/static-not-unpin.rs:11:25: --> $DIR/static-not-unpin.rs:14:18 | LL | fn assert_unpin(_: T) { - | ------------------------------- required by `assert_unpin` + | ------------ ----- required by this bound in `assert_unpin` ... LL | assert_unpin(generator); | ^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]` diff --git a/src/test/ui/hrtb/due-to-where-clause.stderr b/src/test/ui/hrtb/due-to-where-clause.stderr index e698584bb716..9fef1e335439 100644 --- a/src/test/ui/hrtb/due-to-where-clause.stderr +++ b/src/test/ui/hrtb/due-to-where-clause.stderr @@ -2,15 +2,12 @@ error: implementation of `Foo` is not general enough --> $DIR/due-to-where-clause.rs:5:5 | LL | test::(&mut 42); - | ^^^^^^^^^^^^ doesn't satisfy where-clause + | ^^^^^^^^^^^^ implementation of `Foo` is not general enough ... LL | trait Foo<'a> {} | ---------------- trait `Foo` defined here -... -LL | fn test<'a, F>(data: &'a mut u32) where F: for<'b> Foo<'b> {} - | ------------------------------------------------------------- due to a where-clause on `test`... | - = note: ...`FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`... + = note: `FooS<'_>` must implement `Foo<'0>`, for any lifetime `'0`... = note: ...but `FooS<'_>` actually implements `Foo<'1>`, for some specific lifetime `'1` error: aborting due to previous error diff --git a/src/test/ui/hrtb/hrtb-conflate-regions.stderr b/src/test/ui/hrtb/hrtb-conflate-regions.stderr index e0b968b67645..9822b48f4f48 100644 --- a/src/test/ui/hrtb/hrtb-conflate-regions.stderr +++ b/src/test/ui/hrtb/hrtb-conflate-regions.stderr @@ -1,14 +1,13 @@ 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:22 | -LL | / fn want_foo2() -LL | | where T : for<'a,'b> Foo<(&'a isize, &'b isize)> -LL | | { -LL | | } - | |_- required by `want_foo2` +LL | fn want_foo2() + | --------- +LL | where T : for<'a,'b> Foo<(&'a isize, &'b isize)> + | -------------------------------------- required by this bound in `want_foo2` ... -LL | fn b() { want_foo2::(); } - | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct` +LL | fn b() { want_foo2::(); } + | ^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct` | = help: the following implementations were found: > diff --git a/src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr b/src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr index bc58b8e16aaf..969d9eda7351 100644 --- a/src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr +++ b/src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr @@ -1,15 +1,14 @@ error[E0277]: the trait bound `(): Trait fn(&'b u32)>` is not satisfied - --> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5 + --> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:11 | -LL | / fn foo() -LL | | where -LL | | T: Trait fn(&'b u32)>, -LL | | { -LL | | } - | |_- required by `foo` +LL | fn foo() + | --- +LL | where +LL | T: Trait fn(&'b u32)>, + | -------------------------- required by this bound in `foo` ... -LL | foo::<()>(); - | ^^^^^^^^^ the trait `Trait fn(&'b u32)>` is not implemented for `()` +LL | foo::<()>(); + | ^^ the trait `Trait fn(&'b u32)>` is not implemented for `()` | = help: the following implementations were found: <() as Trait> diff --git a/src/test/ui/hrtb/hrtb-exists-forall-trait-covariant.stderr b/src/test/ui/hrtb/hrtb-exists-forall-trait-covariant.stderr index 441f75135f3a..dddc2bcce49e 100644 --- a/src/test/ui/hrtb/hrtb-exists-forall-trait-covariant.stderr +++ b/src/test/ui/hrtb/hrtb-exists-forall-trait-covariant.stderr @@ -1,15 +1,14 @@ error[E0277]: the trait bound `(): Trait fn(fn(&'b u32))>` is not satisfied - --> $DIR/hrtb-exists-forall-trait-covariant.rs:36:5 + --> $DIR/hrtb-exists-forall-trait-covariant.rs:36:11 | -LL | / fn foo() -LL | | where -LL | | T: Trait fn(fn(&'b u32))>, -LL | | { -LL | | } - | |_- required by `foo` +LL | fn foo() + | --- +LL | where +LL | T: Trait fn(fn(&'b u32))>, + | ------------------------------ required by this bound in `foo` ... -LL | foo::<()>(); - | ^^^^^^^^^ the trait `Trait fn(fn(&'b u32))>` is not implemented for `()` +LL | foo::<()>(); + | ^^ the trait `Trait fn(fn(&'b u32))>` is not implemented for `()` | = help: the following implementations were found: <() as Trait> diff --git a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr index a11949735b9d..23ef75944d31 100644 --- a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr +++ b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr @@ -1,15 +1,14 @@ error[E0277]: the trait bound `(): Trait 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:11 | -LL | / fn foo() -LL | | where -LL | | T: Trait fn(Cell<&'b u32>)>, -LL | | { -LL | | } - | |_- required by `foo` +LL | fn foo() + | --- +LL | where +LL | T: Trait fn(Cell<&'b u32>)>, + | -------------------------------- required by this bound in `foo` ... -LL | foo::<()>(); - | ^^^^^^^^^ the trait `Trait fn(std::cell::Cell<&'b u32>)>` is not implemented for `()` +LL | foo::<()>(); + | ^^ the trait `Trait fn(std::cell::Cell<&'b u32>)>` is not implemented for `()` | = help: the following implementations were found: <() as Trait)>> diff --git a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr index 18f49089302e..c2cc8ebad272 100644 --- a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr +++ b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits-transitive.stderr @@ -1,14 +1,13 @@ error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied --> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:26 | -LL | / fn want_bar_for_any_ccx(b: &B) -LL | | where B : for<'ccx> Bar<'ccx> -LL | | { -LL | | } - | |_- required by `want_bar_for_any_ccx` +LL | fn want_bar_for_any_ccx(b: &B) + | -------------------- +LL | where B : for<'ccx> Bar<'ccx> + | ------------------- required by this bound in `want_bar_for_any_ccx` ... -LL | want_bar_for_any_ccx(b); - | ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` +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 diff --git a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr index 7857ab6e86a2..a93814ad4c25 100644 --- a/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr +++ b/src/test/ui/hrtb/hrtb-higher-ranker-supertraits.stderr @@ -1,33 +1,26 @@ error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied --> $DIR/hrtb-higher-ranker-supertraits.rs:18:26 | -LL | want_foo_for_any_tcx(f); - | ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F` +LL | want_foo_for_any_tcx(f); + | ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F` ... -LL | / fn want_foo_for_any_tcx(f: &F) -LL | | where F : for<'tcx> Foo<'tcx> -LL | | { -LL | | want_foo_for_some_tcx(f); -LL | | want_foo_for_any_tcx(f); -LL | | } - | |_- required by `want_foo_for_any_tcx` +LL | fn want_foo_for_any_tcx(f: &F) + | -------------------- +LL | where F : for<'tcx> Foo<'tcx> + | ------------------- required by this bound in `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 --> $DIR/hrtb-higher-ranker-supertraits.rs:35:26 | -LL | want_bar_for_any_ccx(b); - | ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` +LL | want_bar_for_any_ccx(b); + | ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` ... -LL | / fn want_bar_for_any_ccx(b: &B) -LL | | where B : for<'ccx> Bar<'ccx> -LL | | { -LL | | want_foo_for_some_tcx(b); -... | -LL | | want_bar_for_any_ccx(b); -LL | | } - | |_- required by `want_bar_for_any_ccx` +LL | fn want_bar_for_any_ccx(b: &B) + | -------------------- +LL | where B : for<'ccx> Bar<'ccx> + | ------------------- required by this bound in `want_bar_for_any_ccx` | = help: consider adding a `where for<'ccx> B: Bar<'ccx>` bound diff --git a/src/test/ui/hrtb/hrtb-just-for-static.stderr b/src/test/ui/hrtb/hrtb-just-for-static.stderr index b2938e541fdd..6ec0beefd60e 100644 --- a/src/test/ui/hrtb/hrtb-just-for-static.stderr +++ b/src/test/ui/hrtb/hrtb-just-for-static.stderr @@ -1,29 +1,27 @@ 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:17 | -LL | / fn want_hrtb() -LL | | where T : for<'a> Foo<&'a isize> -LL | | { -LL | | } - | |_- required by `want_hrtb` +LL | fn want_hrtb() + | --------- +LL | where T : for<'a> Foo<&'a isize> + | ---------------------- required by this bound in `want_hrtb` ... -LL | want_hrtb::() - | ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `StaticInt` +LL | want_hrtb::() + | ^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `StaticInt` | = help: the following implementations were found: > 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:17 | -LL | / fn want_hrtb() -LL | | where T : for<'a> Foo<&'a isize> -LL | | { -LL | | } - | |_- required by `want_hrtb` +LL | fn want_hrtb() + | --------- +LL | where T : for<'a> Foo<&'a isize> + | ---------------------- required by this bound in `want_hrtb` ... -LL | want_hrtb::<&'a u32>() - | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `&'a u32` +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>> diff --git a/src/test/ui/hrtb/issue-46989.stderr b/src/test/ui/hrtb/issue-46989.stderr index 57eaf2aad2bc..c818041e5963 100644 --- a/src/test/ui/hrtb/issue-46989.stderr +++ b/src/test/ui/hrtb/issue-46989.stderr @@ -1,11 +1,11 @@ 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:18 | LL | fn assert_foo() {} - | ----------------------- required by `assert_foo` + | ---------- --- required by this bound in `assert_foo` ... LL | assert_foo::(); - | ^^^^^^^^^^^^^^^^^^^^^^ 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: diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index af641a89e7f9..d11941fee182 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -73,7 +73,7 @@ error[E0277]: `std::rc::Rc` cannot be sent between threads --> $DIR/auto-trait-leak.rs:15:5 | LL | fn send(_: T) {} - | ---------------------- required by `send` + | ---- ---- required by this bound in `send` ... LL | send(cycle2().clone()); | ^^^^ `std::rc::Rc` cannot be sent between threads safely diff --git a/src/test/ui/impl-trait/auto-trait-leak2.stderr b/src/test/ui/impl-trait/auto-trait-leak2.stderr index 460af7dedbea..d163e1dff7ac 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak2.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc>` cannot be sent between threads --> $DIR/auto-trait-leak2.rs:13:5 | LL | fn send(_: T) {} - | ---------------------- required by `send` + | ---- ---- required by this bound in `send` ... LL | send(before()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely @@ -15,7 +15,7 @@ error[E0277]: `std::rc::Rc>` cannot be sent between threads --> $DIR/auto-trait-leak2.rs:16:5 | LL | fn send(_: T) {} - | ---------------------- required by `send` + | ---- ---- required by this bound in `send` ... LL | send(after()); | ^^^^ `std::rc::Rc>` cannot be sent between threads safely diff --git a/src/test/ui/interior-mutability/interior-mutability.rs b/src/test/ui/interior-mutability/interior-mutability.rs index ddc882cccf39..6968e3669cae 100644 --- a/src/test/ui/interior-mutability/interior-mutability.rs +++ b/src/test/ui/interior-mutability/interior-mutability.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences use std::cell::Cell; use std::panic::catch_unwind; fn main() { diff --git a/src/test/ui/interior-mutability/interior-mutability.stderr b/src/test/ui/interior-mutability/interior-mutability.stderr index 31390bc6ccef..b76fce288055 100644 --- a/src/test/ui/interior-mutability/interior-mutability.stderr +++ b/src/test/ui/interior-mutability/interior-mutability.stderr @@ -1,14 +1,18 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary - --> $DIR/interior-mutability.rs:5:5 + --> $DIR/interior-mutability.rs:7:5 | LL | catch_unwind(|| { x.set(23); }); | ^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | + ::: $SRC_DIR/libstd/panic.rs:LL:COL + | +LL | pub fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { + | ---------- required by this bound in `std::panic::catch_unwind` | = help: within `std::cell::Cell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` = note: required because it appears within the type `std::cell::Cell` = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::Cell` - = note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:5:18: 5:35 x:&std::cell::Cell]` - = note: required by `std::panic::catch_unwind` + = note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:7:18: 7:35 x:&std::cell::Cell]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1920-1.stderr b/src/test/ui/issues/issue-1920-1.stderr index c62cbb0cf8b9..089968ede7d0 100644 --- a/src/test/ui/issues/issue-1920-1.stderr +++ b/src/test/ui/issues/issue-1920-1.stderr @@ -1,11 +1,11 @@ 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:20 | LL | fn assert_clone() where T : Clone { } - | ------------------------------------ required by `assert_clone` + | ------------ ----- required by this bound in `assert_clone` ... LL | assert_clone::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1920-2.stderr b/src/test/ui/issues/issue-1920-2.stderr index aad076244699..eaf34e076c08 100644 --- a/src/test/ui/issues/issue-1920-2.stderr +++ b/src/test/ui/issues/issue-1920-2.stderr @@ -1,11 +1,11 @@ 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:20 | LL | fn assert_clone() where T : Clone { } - | ------------------------------------ required by `assert_clone` + | ------------ ----- required by this bound in `assert_clone` ... LL | assert_clone::(); - | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `bar::S` + | ^^^^^^ the trait `std::clone::Clone` is not implemented for `bar::S` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1920-3.stderr b/src/test/ui/issues/issue-1920-3.stderr index 4378ea49755a..0550f5feba5b 100644 --- a/src/test/ui/issues/issue-1920-3.stderr +++ b/src/test/ui/issues/issue-1920-3.stderr @@ -1,11 +1,11 @@ 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:20 | LL | fn assert_clone() where T : Clone { } - | ------------------------------------ required by `assert_clone` + | ------------ ----- required by this bound in `assert_clone` ... LL | assert_clone::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `issue_1920::S` + | ^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `issue_1920::S` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-21160.rs b/src/test/ui/issues/issue-21160.rs index 46733566cf38..dfb39743352f 100644 --- a/src/test/ui/issues/issue-21160.rs +++ b/src/test/ui/issues/issue-21160.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences struct Bar; impl Bar { diff --git a/src/test/ui/issues/issue-21160.stderr b/src/test/ui/issues/issue-21160.stderr index e32343e9682d..9f88fa2fadd4 100644 --- a/src/test/ui/issues/issue-21160.stderr +++ b/src/test/ui/issues/issue-21160.stderr @@ -1,10 +1,13 @@ error[E0277]: the trait bound `Bar: std::hash::Hash` is not satisfied - --> $DIR/issue-21160.rs:8:12 + --> $DIR/issue-21160.rs:10:12 | LL | struct Foo(Bar); | ^^^ the trait `std::hash::Hash` is not implemented for `Bar` + | + ::: $SRC_DIR/libcore/hash/mod.rs:LL:COL | - = note: required by `std::hash::Hash::hash` +LL | fn hash(&self, state: &mut H); + | - required by this bound in `std::hash::Hash::hash` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-21763.stderr b/src/test/ui/issues/issue-21763.stderr index 99d004a973a2..2bede9120cf1 100644 --- a/src/test/ui/issues/issue-21763.stderr +++ b/src/test/ui/issues/issue-21763.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely --> $DIR/issue-21763.rs:9:5 | LL | fn foo() {} - | ----------------- required by `foo` + | --- ---- required by this bound in `foo` ... LL | foo::, Rc<()>>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely diff --git a/src/test/ui/issues/issue-23589.stderr b/src/test/ui/issues/issue-23589.stderr index d169fdfe2ddd..c3b419fe939c 100644 --- a/src/test/ui/issues/issue-23589.stderr +++ b/src/test/ui/issues/issue-23589.stderr @@ -1,11 +1,11 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-23589.rs:2:15 + --> $DIR/issue-23589.rs:2:12 | LL | let v: Vec(&str) = vec!['1', '2']; - | ^^^^^^ - | | - | only `Fn` traits may use parentheses - | help: use angle brackets instead: `<&str>` + | ^^^^^^^^^ + | | + | only `Fn` traits may use parentheses + | help: use angle brackets instead: `Vec<&str>` error[E0308]: mismatched types --> $DIR/issue-23589.rs:2:29 diff --git a/src/test/ui/issues/issue-25076.stderr b/src/test/ui/issues/issue-25076.stderr index a7b6626b16a1..0a13a2bc3302 100644 --- a/src/test/ui/issues/issue-25076.stderr +++ b/src/test/ui/issues/issue-25076.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): InOut<_>` is not satisfied --> $DIR/issue-25076.rs:10:20 | LL | fn do_fold>(init: B, f: F) {} - | ------------------------------------------------ required by `do_fold` + | ------- --------------- required by this bound in `do_fold` ... LL | do_fold(bot(), ()); | ^^ the trait `InOut<_>` is not implemented for `()` diff --git a/src/test/ui/issues/issue-32963.stderr b/src/test/ui/issues/issue-32963.stderr index 2960f4e59899..e3564e867017 100644 --- a/src/test/ui/issues/issue-32963.stderr +++ b/src/test/ui/issues/issue-32963.stderr @@ -13,7 +13,7 @@ error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied --> $DIR/issue-32963.rs:8:5 | LL | fn size_of_copy() -> usize { mem::size_of::() } - | ------------------------------------------ required by `size_of_copy` + | ------------ ---- required by this bound in `size_of_copy` ... LL | size_of_copy::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc` diff --git a/src/test/ui/issues/issue-32995-2.stderr b/src/test/ui/issues/issue-32995-2.stderr index 4a580b09bf37..976e3064db64 100644 --- a/src/test/ui/issues/issue-32995-2.stderr +++ b/src/test/ui/issues/issue-32995-2.stderr @@ -1,27 +1,27 @@ error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:4:28 + --> $DIR/issue-32995-2.rs:4:22 | LL | { fn f() {} } - | ^^ + | ^^^^^^^^ | = note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:8:35 + --> $DIR/issue-32995-2.rs:8:29 | LL | { fn f() -> impl ::std::marker()::Send { } } - | ^^ + | ^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995-2.rs:16:19 + --> $DIR/issue-32995-2.rs:16:13 | LL | impl ::std::marker()::Copy for X {} - | ^^ + | ^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 diff --git a/src/test/ui/issues/issue-32995.stderr b/src/test/ui/issues/issue-32995.stderr index 59d93ece0674..724e82a59dc3 100644 --- a/src/test/ui/issues/issue-32995.stderr +++ b/src/test/ui/issues/issue-32995.stderr @@ -1,63 +1,63 @@ error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:4:17 + --> $DIR/issue-32995.rs:4:12 | LL | let x: usize() = 1; - | ^^ + | ^^^^^^^ | = note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:8:24 + --> $DIR/issue-32995.rs:8:19 | LL | let b: ::std::boxed()::Box<_> = Box::new(1); - | ^^ + | ^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:12:25 + --> $DIR/issue-32995.rs:12:20 | LL | let p = ::std::str::()::from_utf8(b"foo").unwrap(); - | ^^ + | ^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:16:36 + --> $DIR/issue-32995.rs:16:25 | LL | let p = ::std::str::from_utf8::()(b"foo").unwrap(); - | ^^ + | ^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:20:35 + --> $DIR/issue-32995.rs:20:29 | LL | let o : Box = Box::new(1); - | ^^ + | ^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:24:41 + --> $DIR/issue-32995.rs:24:35 | LL | let o : Box = Box::new(1); - | ^^ + | ^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-32995.rs:30:14 + --> $DIR/issue-32995.rs:30:13 | LL | let d : X() = Default::default(); - | ^^ + | ^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42238 diff --git a/src/test/ui/issues/issue-39687.stderr b/src/test/ui/issues/issue-39687.stderr index 886de1d6faff..b1b3041ea027 100644 --- a/src/test/ui/issues/issue-39687.stderr +++ b/src/test/ui/issues/issue-39687.stderr @@ -1,8 +1,8 @@ error[E0229]: associated type bindings are not allowed here - --> $DIR/issue-39687.rs:4:16 + --> $DIR/issue-39687.rs:4:14 | LL | ::call; - | ^^ associated type not allowed here + | ^^^^ associated type not allowed here error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40827.stderr b/src/test/ui/issues/issue-40827.stderr index 9131120671f4..3fe47e249f10 100644 --- a/src/test/ui/issues/issue-40827.stderr +++ b/src/test/ui/issues/issue-40827.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc` cannot be sent between threads safely --> $DIR/issue-40827.rs:14:5 | LL | fn f(_: T) {} - | ------------------- required by `f` + | - ---- required by this bound in `f` ... LL | f(Foo(Arc::new(Bar::B(None)))); | ^ `std::rc::Rc` cannot be sent between threads safely @@ -16,7 +16,7 @@ error[E0277]: `std::rc::Rc` cannot be shared between threads safely --> $DIR/issue-40827.rs:14:5 | LL | fn f(_: T) {} - | ------------------- required by `f` + | - ---- required by this bound in `f` ... LL | f(Foo(Arc::new(Bar::B(None)))); | ^ `std::rc::Rc` cannot be shared between threads safely diff --git a/src/test/ui/issues/issue-43623.stderr b/src/test/ui/issues/issue-43623.stderr index d843629e8a26..2c57b8585d92 100644 --- a/src/test/ui/issues/issue-43623.stderr +++ b/src/test/ui/issues/issue-43623.stderr @@ -1,31 +1,27 @@ error[E0631]: type mismatch in function arguments --> $DIR/issue-43623.rs:14:5 | -LL | / pub fn break_me(f: F) -LL | | where T: for<'b> Trait<'b>, -LL | | F: for<'b> FnMut(>::Assoc) { -LL | | break_me::; - | | ^^^^^^^^^^^^^^^^^^^^^^^ - | | | - | | expected signature of `for<'b> fn(>::Assoc) -> _` - | | found signature of `fn(_) -> _` -LL | | -LL | | -LL | | } - | |_- required by `break_me` +LL | pub fn break_me(f: F) + | -------- +LL | where T: for<'b> Trait<'b>, +LL | F: for<'b> FnMut(>::Assoc) { + | -------------------------------------- required by this bound in `break_me` +LL | break_me::; + | ^^^^^^^^^^^^^^^^^^^^^^^ + | | + | expected signature of `for<'b> fn(>::Assoc) -> _` + | found signature of `fn(_) -> _` error[E0271]: type mismatch resolving `for<'b> >::Assoc,)>>::Output == ()` --> $DIR/issue-43623.rs:14:5 | -LL | / pub fn break_me(f: F) -LL | | where T: for<'b> Trait<'b>, -LL | | F: for<'b> FnMut(>::Assoc) { -LL | | break_me::; - | | ^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'b, found concrete lifetime -LL | | -LL | | -LL | | } - | |_- required by `break_me` +LL | pub fn break_me(f: F) + | -------- +LL | where T: for<'b> Trait<'b>, +LL | F: for<'b> FnMut(>::Assoc) { + | ------------------------------ required by this bound in `break_me` +LL | break_me::; + | ^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'b, found concrete lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-47706.stderr b/src/test/ui/issues/issue-47706.stderr index 4f64a643fe57..6cde93734667 100644 --- a/src/test/ui/issues/issue-47706.stderr +++ b/src/test/ui/issues/issue-47706.stderr @@ -10,18 +10,17 @@ LL | self.foo.map(Foo::new) error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> $DIR/issue-47706.rs:27:9 | -LL | Bar(i32), - | -------- takes 1 argument +LL | Bar(i32), + | -------- takes 1 argument ... -LL | / fn foo(f: F) -LL | | where -LL | | F: Fn(), -LL | | { -LL | | } - | |_- required by `foo` +LL | fn foo(f: F) + | --- +LL | where +LL | F: Fn(), + | ---- required by this bound in `foo` ... -LL | foo(Qux::Bar); - | ^^^^^^^^ expected function that takes 0 arguments +LL | foo(Qux::Bar); + | ^^^^^^^^ expected function that takes 0 arguments error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-60283.stderr b/src/test/ui/issues/issue-60283.stderr index 2b01a64d39a9..69c1d85e4e12 100644 --- a/src/test/ui/issues/issue-60283.stderr +++ b/src/test/ui/issues/issue-60283.stderr @@ -1,27 +1,29 @@ error[E0631]: type mismatch in function arguments --> $DIR/issue-60283.rs:14:13 | -LL | / pub fn foo(_: T, _: F) -LL | | where T: for<'a> Trait<'a>, -LL | | F: for<'a> FnMut(>::Item) {} - | |_________________________________________________- required by `foo` +LL | pub fn foo(_: T, _: F) + | --- +LL | where T: for<'a> Trait<'a>, +LL | F: for<'a> FnMut(>::Item) {} + | ------------------------------------- required by this bound in `foo` ... -LL | foo((), drop) - | ^^^^ - | | - | expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _` - | found signature of `fn(_) -> _` +LL | foo((), drop) + | ^^^^ + | | + | expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _` + | found signature of `fn(_) -> _` error[E0271]: type mismatch resolving `for<'a> } as std::ops::FnOnce<(<() as Trait<'a>>::Item,)>>::Output == ()` --> $DIR/issue-60283.rs:14:5 | -LL | / pub fn foo(_: T, _: F) -LL | | where T: for<'a> Trait<'a>, -LL | | F: for<'a> FnMut(>::Item) {} - | |_________________________________________________- required by `foo` +LL | pub fn foo(_: T, _: F) + | --- +LL | where T: for<'a> Trait<'a>, +LL | F: for<'a> FnMut(>::Item) {} + | ----------------------------- required by this bound in `foo` ... -LL | foo((), drop) - | ^^^ expected bound lifetime parameter 'a, found concrete lifetime +LL | foo((), drop) + | ^^^ expected bound lifetime parameter 'a, found concrete lifetime error: aborting due to 2 previous errors diff --git a/src/test/ui/kindck/kindck-copy.stderr b/src/test/ui/kindck/kindck-copy.stderr index 1fe59460e057..3ca9cf7e973d 100644 --- a/src/test/ui/kindck/kindck-copy.stderr +++ b/src/test/ui/kindck/kindck-copy.stderr @@ -1,68 +1,68 @@ 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:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... 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: 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:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... 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: error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied - --> $DIR/kindck-copy.rs:31:5 + --> $DIR/kindck-copy.rs:31:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` + | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` 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:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy::(); - | ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` + | ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` error[E0277]: the trait bound `std::vec::Vec: std::marker::Copy` is not satisfied - --> $DIR/kindck-copy.rs:33:5 + --> $DIR/kindck-copy.rs:33:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy:: >(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec` + | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec` 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:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>` error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied --> $DIR/kindck-copy.rs:42:5 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` @@ -71,37 +71,37 @@ error[E0277]: the trait bound `std::boxed::Box: s --> $DIR/kindck-copy.rs:43:5 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` 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:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... 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)` error[E0277]: the trait bound `MyNoncopyStruct: std::marker::Copy` is not satisfied - --> $DIR/kindck-copy.rs:64:5 + --> $DIR/kindck-copy.rs:64:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `MyNoncopyStruct` + | ^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `MyNoncopyStruct` error[E0277]: the trait bound `std::rc::Rc: std::marker::Copy` is not satisfied - --> $DIR/kindck-copy.rs:67:5 + --> $DIR/kindck-copy.rs:67:19 | LL | fn assert_copy() { } - | ------------------------ required by `assert_copy` + | ----------- ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc` + | ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc` error: aborting due to 11 previous errors diff --git a/src/test/ui/kindck/kindck-impl-type-params-2.stderr b/src/test/ui/kindck/kindck-impl-type-params-2.stderr index 5e6eca6f0571..8e9891132441 100644 --- a/src/test/ui/kindck/kindck-impl-type-params-2.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params-2.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is --> $DIR/kindck-impl-type-params-2.rs:13:16 | LL | fn take_param(foo: &T) { } - | ----------------------------- required by `take_param` + | ---------- --- required by this bound in `take_param` ... LL | take_param(&x); | ^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr index 9f548083e73d..27901d069279 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is --> $DIR/kindck-inherited-copy-bound.rs:18:16 | LL | fn take_param(foo: &T) { } - | ----------------------------- required by `take_param` + | ---------- --- required by this bound in `take_param` ... LL | take_param(&x); | ^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` diff --git a/src/test/ui/kindck/kindck-nonsendable-1.stderr b/src/test/ui/kindck/kindck-nonsendable-1.stderr index 6d60de888c98..40b67f8fe8cd 100644 --- a/src/test/ui/kindck/kindck-nonsendable-1.stderr +++ b/src/test/ui/kindck/kindck-nonsendable-1.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc` cannot be sent between threads safely --> $DIR/kindck-nonsendable-1.rs:9:5 | LL | fn bar(_: F) { } - | ------------------------------- required by `bar` + | --- ---- required by this bound in `bar` ... LL | bar(move|| foo(x)); | ^^^ `std::rc::Rc` cannot be sent between threads safely diff --git a/src/test/ui/kindck/kindck-send-object.stderr b/src/test/ui/kindck/kindck-send-object.stderr index 3ca2d730cbae..8708537f8630 100644 --- a/src/test/ui/kindck/kindck-send-object.stderr +++ b/src/test/ui/kindck/kindck-send-object.stderr @@ -2,7 +2,7 @@ error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely --> $DIR/kindck-send-object.rs:12:5 | LL | fn assert_send() { } - | ------------------------ required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::<&'static (dyn Dummy + 'static)>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely @@ -14,7 +14,7 @@ error[E0277]: `dyn Dummy` cannot be sent between threads safely --> $DIR/kindck-send-object.rs:17:5 | LL | fn assert_send() { } - | ------------------------ required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely diff --git a/src/test/ui/kindck/kindck-send-object1.nll.stderr b/src/test/ui/kindck/kindck-send-object1.nll.stderr index c7d18cd8b8bb..f882e06ed222 100644 --- a/src/test/ui/kindck/kindck-send-object1.nll.stderr +++ b/src/test/ui/kindck/kindck-send-object1.nll.stderr @@ -2,7 +2,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely --> $DIR/kindck-send-object1.rs:10:5 | LL | fn assert_send() { } - | -------------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::<&'a dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely @@ -14,7 +14,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely --> $DIR/kindck-send-object1.rs:29:5 | LL | fn assert_send() { } - | -------------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely diff --git a/src/test/ui/kindck/kindck-send-object1.stderr b/src/test/ui/kindck/kindck-send-object1.stderr index 0f5f7e0890b2..436b92637aaa 100644 --- a/src/test/ui/kindck/kindck-send-object1.stderr +++ b/src/test/ui/kindck/kindck-send-object1.stderr @@ -2,7 +2,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely --> $DIR/kindck-send-object1.rs:10:5 | LL | fn assert_send() { } - | -------------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::<&'a dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely @@ -22,7 +22,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely --> $DIR/kindck-send-object1.rs:29:5 | LL | fn assert_send() { } - | -------------------------------- required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely diff --git a/src/test/ui/kindck/kindck-send-object2.stderr b/src/test/ui/kindck/kindck-send-object2.stderr index 72cd985cc863..6cb82edf263b 100644 --- a/src/test/ui/kindck/kindck-send-object2.stderr +++ b/src/test/ui/kindck/kindck-send-object2.stderr @@ -2,7 +2,7 @@ error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely --> $DIR/kindck-send-object2.rs:7:5 | LL | fn assert_send() { } - | ------------------------ required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::<&'static dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely @@ -14,7 +14,7 @@ error[E0277]: `dyn Dummy` cannot be sent between threads safely --> $DIR/kindck-send-object2.rs:12:5 | LL | fn assert_send() { } - | ------------------------ required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely diff --git a/src/test/ui/kindck/kindck-send-owned.stderr b/src/test/ui/kindck/kindck-send-owned.stderr index ee919f02d653..c74034954245 100644 --- a/src/test/ui/kindck/kindck-send-owned.stderr +++ b/src/test/ui/kindck/kindck-send-owned.stderr @@ -2,7 +2,7 @@ error[E0277]: `*mut u8` cannot be sent between threads safely --> $DIR/kindck-send-owned.rs:12:5 | LL | fn assert_send() { } - | ------------------------ required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely diff --git a/src/test/ui/kindck/kindck-send-unsafe.stderr b/src/test/ui/kindck/kindck-send-unsafe.stderr index a87e1c7db2a2..05ed51d0f117 100644 --- a/src/test/ui/kindck/kindck-send-unsafe.stderr +++ b/src/test/ui/kindck/kindck-send-unsafe.stderr @@ -1,11 +1,11 @@ error[E0277]: `*mut &'a isize` cannot be sent between threads safely - --> $DIR/kindck-send-unsafe.rs:6:5 + --> $DIR/kindck-send-unsafe.rs:6:19 | LL | fn assert_send() { } - | ------------------------ required by `assert_send` + | ----------- ---- required by this bound in `assert_send` ... 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` diff --git a/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr b/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr index 4e79fbdeadc5..4508870746bc 100644 --- a/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr +++ b/src/test/ui/marker_trait_attr/overlap-marker-trait.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `NotDebugOrDisplay: Marker` is not satisfied - --> $DIR/overlap-marker-trait.rs:27:5 + --> $DIR/overlap-marker-trait.rs:27:17 | LL | fn is_marker() { } - | ------------------------- required by `is_marker` + | --------- ------ required by this bound in `is_marker` ... LL | is_marker::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay` + | ^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay` error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/E0631.stderr b/src/test/ui/mismatched_types/E0631.stderr index 64ddf1deb063..88c1efdbb90f 100644 --- a/src/test/ui/mismatched_types/E0631.stderr +++ b/src/test/ui/mismatched_types/E0631.stderr @@ -2,7 +2,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:7:5 | LL | fn foo(_: F) {} - | -------------------------- required by `foo` + | --- --------- required by this bound in `foo` ... LL | foo(|_: isize| {}); | ^^^ ---------- found signature of `fn(isize) -> _` @@ -13,7 +13,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/E0631.rs:8:5 | LL | fn bar>(_: F) {} - | -------------------------- required by `bar` + | --- --------- required by this bound in `bar` ... LL | bar(|_: isize| {}); | ^^^ ---------- found signature of `fn(isize) -> _` @@ -24,7 +24,7 @@ error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:9:9 | LL | fn foo(_: F) {} - | -------------------------- required by `foo` + | --- --------- required by this bound in `foo` ... LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` @@ -36,7 +36,7 @@ error[E0631]: type mismatch in function arguments --> $DIR/E0631.rs:10:9 | LL | fn bar>(_: F) {} - | -------------------------- required by `bar` + | --- --------- required by this bound in `bar` LL | fn main() { LL | fn f(_: u64) {} | ------------ found signature of `fn(u64) -> _` diff --git a/src/test/ui/mismatched_types/closure-arg-count.stderr b/src/test/ui/mismatched_types/closure-arg-count.stderr index 12ae8acaee5c..ed2b3f0c3ce6 100644 --- a/src/test/ui/mismatched_types/closure-arg-count.stderr +++ b/src/test/ui/mismatched_types/closure-arg-count.stderr @@ -46,7 +46,7 @@ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments --> $DIR/closure-arg-count.rs:13:5 | LL | fn f>(_: F) {} - | ------------------------ required by `f` + | - --------- required by this bound in `f` ... LL | f(|| panic!()); | ^ -- takes 0 arguments @@ -61,7 +61,7 @@ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments --> $DIR/closure-arg-count.rs:15:5 | LL | fn f>(_: F) {} - | ------------------------ required by `f` + | - --------- required by this bound in `f` ... LL | f( move || panic!()); | ^ ---------- takes 0 arguments @@ -143,7 +143,7 @@ LL | call(Foo); | ^^^ expected function that takes 0 arguments ... LL | fn call(_: F) where F: FnOnce() -> R {} - | ------------------------------------------ required by `call` + | ---- ------------- required by this bound in `call` LL | struct Foo(u8); | --------------- takes 1 argument diff --git a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr index 68bc17b4966f..85cad61210eb 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -26,7 +26,7 @@ error[E0631]: type mismatch in function arguments --> $DIR/closure-arg-type-mismatch.rs:10:9 | LL | fn baz(_: F) {} - | ------------------------------ required by `baz` + | --- ------------- required by this bound in `baz` LL | fn _test<'a>(f: fn(*mut &'a u32)) { LL | baz(f); | ^ @@ -38,7 +38,7 @@ error[E0271]: type mismatch resolving `for<'r> $DIR/closure-arg-type-mismatch.rs:10:5 | LL | fn baz(_: F) {} - | ------------------------------ required by `baz` + | --- ------------- required by this bound in `baz` LL | fn _test<'a>(f: fn(*mut &'a u32)) { LL | baz(f); | ^^^ expected bound lifetime parameter, found concrete lifetime diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/src/test/ui/mismatched_types/closure-mismatch.stderr index 0fe4909eaa77..fd2b9f3c66b0 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-mismatch.stderr @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/closure-mismatch.r --> $DIR/closure-mismatch.rs:8:5 | LL | fn baz(_: T) {} - | -------------------- required by `baz` + | --- --- required by this bound in `baz` ... LL | baz(|_| ()); | ^^^ expected bound lifetime parameter, found concrete lifetime @@ -13,7 +13,7 @@ error[E0631]: type mismatch in closure arguments --> $DIR/closure-mismatch.rs:8:5 | LL | fn baz(_: T) {} - | -------------------- required by `baz` + | --- --- required by this bound in `baz` ... LL | baz(|_| ()); | ^^^ ------ found signature of `fn(_) -> _` diff --git a/src/test/ui/mismatched_types/fn-variance-1.stderr b/src/test/ui/mismatched_types/fn-variance-1.stderr index 6342ee770dda..1a82dd53edc7 100644 --- a/src/test/ui/mismatched_types/fn-variance-1.stderr +++ b/src/test/ui/mismatched_types/fn-variance-1.stderr @@ -5,7 +5,7 @@ LL | fn takes_mut(x: &mut isize) { } | --------------------------- found signature of `for<'r> fn(&'r mut isize) -> _` LL | LL | fn apply(t: T, f: F) where F: FnOnce(T) { - | --------------------------------------------- required by `apply` + | ----- --------- required by this bound in `apply` ... LL | apply(&3, takes_mut); | ^^^^^^^^^ expected signature of `fn(&{integer}) -> _` @@ -17,7 +17,7 @@ LL | fn takes_imm(x: &isize) { } | ----------------------- found signature of `for<'r> fn(&'r isize) -> _` ... LL | fn apply(t: T, f: F) where F: FnOnce(T) { - | --------------------------------------------- required by `apply` + | ----- --------- required by this bound in `apply` ... LL | apply(&mut 3, takes_imm); | ^^^^^^^^^ expected signature of `fn(&mut {integer}) -> _` diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs index 88bea979b97f..2bd4d3384469 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs +++ b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.rs @@ -5,7 +5,8 @@ use std::ops::FnMut; fn to_fn_mut>(f: F) -> F { f } fn call_itisize>(y: isize, mut f: F) -> isize { -//~^ NOTE required by `call_it` +//~^ NOTE required by this bound in `call_it` +//~| NOTE f(2, y) } diff --git a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr index 139d87d58b64..2daf4781c7e6 100644 --- a/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr +++ b/src/test/ui/mismatched_types/unboxed-closures-vtable-mismatch.stderr @@ -1,8 +1,8 @@ error[E0631]: type mismatch in closure arguments - --> $DIR/unboxed-closures-vtable-mismatch.rs:15:24 + --> $DIR/unboxed-closures-vtable-mismatch.rs:16:24 | LL | fn call_itisize>(y: isize, mut f: F) -> isize { - | -------------------------------------------------------------------- required by `call_it` + | ------- ------------------------- required by this bound in `call_it` ... LL | let f = to_fn_mut(|x: usize, y: isize| -> isize { (x as isize) + y }); | ----------------------------- found signature of `fn(usize, isize) -> _` diff --git a/src/test/ui/mut/mutable-enum-indirect.stderr b/src/test/ui/mut/mutable-enum-indirect.stderr index 4efb10b56290..0290efc3d967 100644 --- a/src/test/ui/mut/mutable-enum-indirect.stderr +++ b/src/test/ui/mut/mutable-enum-indirect.stderr @@ -2,7 +2,7 @@ error[E0277]: `NoSync` cannot be shared between threads safely --> $DIR/mutable-enum-indirect.rs:17:5 | LL | fn bar(_: T) {} - | --------------------- required by `bar` + | --- ---- required by this bound in `bar` ... LL | bar(&x); | ^^^ `NoSync` cannot be shared between threads safely diff --git a/src/test/ui/mutexguard-sync.stderr b/src/test/ui/mutexguard-sync.stderr index 1cda2da5061a..71a06fce4b9e 100644 --- a/src/test/ui/mutexguard-sync.stderr +++ b/src/test/ui/mutexguard-sync.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::cell::Cell` cannot be shared between threads safely --> $DIR/mutexguard-sync.rs:11:15 | LL | fn test_sync(_t: T) {} - | ---------------------------- required by `test_sync` + | --------- ---- required by this bound in `test_sync` ... LL | test_sync(guard); | ^^^^^ `std::cell::Cell` cannot be shared between threads safely diff --git a/src/test/ui/namespace/namespace-mix.stderr b/src/test/ui/namespace/namespace-mix.stderr index 249ad1c58442..aa21928aaeff 100644 --- a/src/test/ui/namespace/namespace-mix.stderr +++ b/src/test/ui/namespace/namespace-mix.stderr @@ -70,7 +70,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:33:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m1::S{}); | ^^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -79,7 +79,7 @@ error[E0277]: the trait bound `c::S: Impossible` is not satisfied --> $DIR/namespace-mix.rs:35:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m2::S{}); | ^^^^^^^ the trait `Impossible` is not implemented for `c::S` @@ -88,7 +88,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:36:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m2::S); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -97,7 +97,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:39:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm1::S{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -106,7 +106,7 @@ error[E0277]: the trait bound `namespace_mix::c::S: Impossible` is not satisfied --> $DIR/namespace-mix.rs:41:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm2::S{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::S` @@ -115,7 +115,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:42:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm2::S); | ^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -124,7 +124,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:55:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m3::TS{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -133,7 +133,7 @@ error[E0277]: the trait bound `fn() -> c::TS {c::TS}: Impossible` is not satisfi --> $DIR/namespace-mix.rs:56:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m3::TS); | ^^^^^^ the trait `Impossible` is not implemented for `fn() -> c::TS {c::TS}` @@ -142,7 +142,7 @@ error[E0277]: the trait bound `c::TS: Impossible` is not satisfied --> $DIR/namespace-mix.rs:57:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m4::TS{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::TS` @@ -151,7 +151,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:58:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m4::TS); | ^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -160,7 +160,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:61:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm3::TS{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -169,7 +169,7 @@ error[E0277]: the trait bound `fn() -> namespace_mix::c::TS {namespace_mix::c::T --> $DIR/namespace-mix.rs:62:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm3::TS); | ^^^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}` @@ -178,7 +178,7 @@ error[E0277]: the trait bound `namespace_mix::c::TS: Impossible` is not satisfie --> $DIR/namespace-mix.rs:63:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm4::TS{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::TS` @@ -187,7 +187,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:64:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm4::TS); | ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -196,7 +196,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:77:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m5::US{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -205,7 +205,7 @@ error[E0277]: the trait bound `c::US: Impossible` is not satisfied --> $DIR/namespace-mix.rs:78:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m5::US); | ^^^^^^ the trait `Impossible` is not implemented for `c::US` @@ -214,7 +214,7 @@ error[E0277]: the trait bound `c::US: Impossible` is not satisfied --> $DIR/namespace-mix.rs:79:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m6::US{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::US` @@ -223,7 +223,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:80:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m6::US); | ^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -232,7 +232,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:83:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm5::US{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -241,7 +241,7 @@ error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfie --> $DIR/namespace-mix.rs:84:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm5::US); | ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US` @@ -250,7 +250,7 @@ error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfie --> $DIR/namespace-mix.rs:85:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm6::US{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::US` @@ -259,7 +259,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:86:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm6::US); | ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -268,7 +268,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:99:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m7::V{}); | ^^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -277,7 +277,7 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:101:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m8::V{}); | ^^^^^^^ the trait `Impossible` is not implemented for `c::E` @@ -286,7 +286,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:102:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m8::V); | ^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -295,7 +295,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:105:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm7::V{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -304,7 +304,7 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:107:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm8::V{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` @@ -313,7 +313,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:108:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm8::V); | ^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -322,7 +322,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:121:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m9::TV{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -331,7 +331,7 @@ error[E0277]: the trait bound `fn() -> c::E {c::E::TV}: Impossible` is not satis --> $DIR/namespace-mix.rs:122:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(m9::TV); | ^^^^^^ the trait `Impossible` is not implemented for `fn() -> c::E {c::E::TV}` @@ -340,7 +340,7 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:123:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(mA::TV{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::E` @@ -349,7 +349,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:124:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(mA::TV); | ^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -358,7 +358,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:127:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm9::TV{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -367,7 +367,7 @@ error[E0277]: the trait bound `fn() -> namespace_mix::c::E {namespace_mix::xm7:: --> $DIR/namespace-mix.rs:128:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xm9::TV); | ^^^^^^^ the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}` @@ -376,7 +376,7 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:129:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xmA::TV{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` @@ -385,7 +385,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:130:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xmA::TV); | ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -394,7 +394,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:143:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(mB::UV{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -403,7 +403,7 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:144:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(mB::UV); | ^^^^^^ the trait `Impossible` is not implemented for `c::E` @@ -412,7 +412,7 @@ error[E0277]: the trait bound `c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:145:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(mC::UV{}); | ^^^^^^^^ the trait `Impossible` is not implemented for `c::E` @@ -421,7 +421,7 @@ error[E0277]: the trait bound `c::Item: Impossible` is not satisfied --> $DIR/namespace-mix.rs:146:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(mC::UV); | ^^^^^^ the trait `Impossible` is not implemented for `c::Item` @@ -430,7 +430,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:149:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xmB::UV{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` @@ -439,7 +439,7 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:150:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xmB::UV); | ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` @@ -448,7 +448,7 @@ error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied --> $DIR/namespace-mix.rs:151:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xmC::UV{}); | ^^^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::E` @@ -457,7 +457,7 @@ error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisf --> $DIR/namespace-mix.rs:152:11 | LL | fn check(_: T) {} - | ----------------------------- required by `check` + | ----- ---------- required by this bound in `check` ... LL | check(xmC::UV); | ^^^^^^^ the trait `Impossible` is not implemented for `namespace_mix::c::Item` diff --git a/src/test/ui/no-send-res-ports.rs b/src/test/ui/no-send-res-ports.rs index e10f447365ea..01fc29713a45 100644 --- a/src/test/ui/no-send-res-ports.rs +++ b/src/test/ui/no-send-res-ports.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences use std::thread; use std::rc::Rc; diff --git a/src/test/ui/no-send-res-ports.stderr b/src/test/ui/no-send-res-ports.stderr index 515b948cc7eb..dc186f7c85e9 100644 --- a/src/test/ui/no-send-res-ports.stderr +++ b/src/test/ui/no-send-res-ports.stderr @@ -1,14 +1,18 @@ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely - --> $DIR/no-send-res-ports.rs:25:5 + --> $DIR/no-send-res-ports.rs:27:5 | LL | thread::spawn(move|| { | ^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely + | + ::: $SRC_DIR/libstd/thread/mod.rs:LL:COL | - = help: within `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` +LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static + | ---- required by this bound in `std::thread::spawn` + | + = help: within `[closure@$DIR/no-send-res-ports.rs:27:19: 31:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` = note: required because it appears within the type `Port<()>` = note: required because it appears within the type `main::Foo` - = note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:main::Foo]` - = note: required by `std::thread::spawn` + = note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:27:19: 31:6 x:main::Foo]` error: aborting due to previous error diff --git a/src/test/ui/no_send-enum.stderr b/src/test/ui/no_send-enum.stderr index d1f3398ff902..8a4b2e9c7a7c 100644 --- a/src/test/ui/no_send-enum.stderr +++ b/src/test/ui/no_send-enum.stderr @@ -2,7 +2,7 @@ error[E0277]: `NoSend` cannot be sent between threads safely --> $DIR/no_send-enum.rs:16:5 | LL | fn bar(_: T) {} - | --------------------- required by `bar` + | --- ---- required by this bound in `bar` ... LL | bar(x); | ^^^ `NoSend` cannot be sent between threads safely diff --git a/src/test/ui/no_send-rc.stderr b/src/test/ui/no_send-rc.stderr index de08634e16ac..bd646d0509da 100644 --- a/src/test/ui/no_send-rc.stderr +++ b/src/test/ui/no_send-rc.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc<{integer}>` cannot be sent between threads safely --> $DIR/no_send-rc.rs:7:9 | LL | fn bar(_: T) {} - | --------------------- required by `bar` + | --- ---- required by this bound in `bar` ... LL | bar(x); | ^ `std::rc::Rc<{integer}>` cannot be sent between threads safely diff --git a/src/test/ui/no_send-struct.stderr b/src/test/ui/no_send-struct.stderr index 3865971fcfdd..4823852c2ff8 100644 --- a/src/test/ui/no_send-struct.stderr +++ b/src/test/ui/no_send-struct.stderr @@ -2,7 +2,7 @@ error[E0277]: `Foo` cannot be sent between threads safely --> $DIR/no_send-struct.rs:15:9 | LL | fn bar(_: T) {} - | --------------------- required by `bar` + | --- ---- required by this bound in `bar` ... LL | bar(x); | ^ `Foo` cannot be sent between threads safely diff --git a/src/test/ui/no_share-enum.stderr b/src/test/ui/no_share-enum.stderr index 5a9b7cae0b9f..f42228ef6ab4 100644 --- a/src/test/ui/no_share-enum.stderr +++ b/src/test/ui/no_share-enum.stderr @@ -2,7 +2,7 @@ error[E0277]: `NoSync` cannot be shared between threads safely --> $DIR/no_share-enum.rs:14:5 | LL | fn bar(_: T) {} - | --------------------- required by `bar` + | --- ---- required by this bound in `bar` ... LL | bar(x); | ^^^ `NoSync` cannot be shared between threads safely diff --git a/src/test/ui/no_share-struct.stderr b/src/test/ui/no_share-struct.stderr index 13de5bd6fe84..620b5427b9ae 100644 --- a/src/test/ui/no_share-struct.stderr +++ b/src/test/ui/no_share-struct.stderr @@ -2,7 +2,7 @@ error[E0277]: `Foo` cannot be shared between threads safely --> $DIR/no_share-struct.rs:12:9 | LL | fn bar(_: T) {} - | --------------------- required by `bar` + | --- ---- required by this bound in `bar` ... LL | bar(x); | ^ `Foo` cannot be shared between threads safely diff --git a/src/test/ui/not-panic/not-panic-safe-2.stderr b/src/test/ui/not-panic/not-panic-safe-2.stderr index 5bacf0bbc6b4..6668d2d0db19 100644 --- a/src/test/ui/not-panic/not-panic-safe-2.stderr +++ b/src/test/ui/not-panic/not-panic-safe-2.stderr @@ -2,7 +2,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutabil --> $DIR/not-panic-safe-2.rs:10:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary @@ -15,7 +15,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutab --> $DIR/not-panic-safe-2.rs:10:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary diff --git a/src/test/ui/not-panic/not-panic-safe-3.stderr b/src/test/ui/not-panic/not-panic-safe-3.stderr index 6d2a450115df..c23b08fc9eda 100644 --- a/src/test/ui/not-panic/not-panic-safe-3.stderr +++ b/src/test/ui/not-panic/not-panic-safe-3.stderr @@ -2,7 +2,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutabil --> $DIR/not-panic-safe-3.rs:10:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary @@ -15,7 +15,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutab --> $DIR/not-panic-safe-3.rs:10:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary diff --git a/src/test/ui/not-panic/not-panic-safe-4.stderr b/src/test/ui/not-panic/not-panic-safe-4.stderr index e28f169b72b6..916804a834f5 100644 --- a/src/test/ui/not-panic/not-panic-safe-4.stderr +++ b/src/test/ui/not-panic/not-panic-safe-4.stderr @@ -2,7 +2,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutabil --> $DIR/not-panic-safe-4.rs:9:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::<&RefCell>(); | ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary @@ -15,7 +15,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutab --> $DIR/not-panic-safe-4.rs:9:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::<&RefCell>(); | ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary diff --git a/src/test/ui/not-panic/not-panic-safe-5.stderr b/src/test/ui/not-panic/not-panic-safe-5.stderr index f8c4fe68dde7..d5c189723f40 100644 --- a/src/test/ui/not-panic/not-panic-safe-5.stderr +++ b/src/test/ui/not-panic/not-panic-safe-5.stderr @@ -2,7 +2,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutabil --> $DIR/not-panic-safe-5.rs:9:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::<*const UnsafeCell>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary diff --git a/src/test/ui/not-panic/not-panic-safe-6.stderr b/src/test/ui/not-panic/not-panic-safe-6.stderr index 2cd780590729..c8013a836a17 100644 --- a/src/test/ui/not-panic/not-panic-safe-6.stderr +++ b/src/test/ui/not-panic/not-panic-safe-6.stderr @@ -2,7 +2,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutabil --> $DIR/not-panic-safe-6.rs:9:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::<*mut RefCell>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary @@ -15,7 +15,7 @@ error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutab --> $DIR/not-panic-safe-6.rs:9:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::<*mut RefCell>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary diff --git a/src/test/ui/not-panic/not-panic-safe.stderr b/src/test/ui/not-panic/not-panic-safe.stderr index 315ea17971aa..aa18b923044c 100644 --- a/src/test/ui/not-panic/not-panic-safe.stderr +++ b/src/test/ui/not-panic/not-panic-safe.stderr @@ -2,7 +2,7 @@ error[E0277]: the type `&mut i32` may not be safely transferred across an unwind --> $DIR/not-panic-safe.rs:9:5 | LL | fn assert() {} - | ----------------------------------- required by `assert` + | ------ ---------- required by this bound in `assert` ... LL | assert::<&mut i32>(); | ^^^^^^^^^^^^^^^^^^ `&mut i32` may not be safely transferred across an unwind boundary diff --git a/src/test/ui/not-sync.stderr b/src/test/ui/not-sync.stderr index 57f1122be2b3..8bb4ce2e2c77 100644 --- a/src/test/ui/not-sync.stderr +++ b/src/test/ui/not-sync.stderr @@ -1,66 +1,66 @@ error[E0277]: `std::cell::Cell` cannot be shared between threads safely - --> $DIR/not-sync.rs:8:5 + --> $DIR/not-sync.rs:8:12 | LL | fn test() {} - | ------------------ required by `test` + | ---- ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely + | ^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell` error[E0277]: `std::cell::RefCell` cannot be shared between threads safely - --> $DIR/not-sync.rs:10:5 + --> $DIR/not-sync.rs:10:12 | LL | fn test() {} - | ------------------ required by `test` + | ---- ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^^^^^^^^^^ `std::cell::RefCell` cannot be shared between threads safely + | ^^^^^^^^^^^^ `std::cell::RefCell` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` error[E0277]: `std::rc::Rc` cannot be shared between threads safely - --> $DIR/not-sync.rs:13:5 + --> $DIR/not-sync.rs:13:12 | LL | fn test() {} - | ------------------ required by `test` + | ---- ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^^^^^ `std::rc::Rc` cannot be shared between threads safely + | ^^^^^^^ `std::rc::Rc` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc` error[E0277]: `std::rc::Weak` cannot be shared between threads safely - --> $DIR/not-sync.rs:15:5 + --> $DIR/not-sync.rs:15:12 | LL | fn test() {} - | ------------------ required by `test` + | ---- ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^^^^^^^ `std::rc::Weak` cannot be shared between threads safely + | ^^^^^^^^^ `std::rc::Weak` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::rc::Weak` error[E0277]: `std::sync::mpsc::Receiver` cannot be shared between threads safely - --> $DIR/not-sync.rs:18:5 + --> $DIR/not-sync.rs:18:12 | LL | fn test() {} - | ------------------ required by `test` + | ---- ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Receiver` cannot be shared between threads safely + | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver` error[E0277]: `std::sync::mpsc::Sender` cannot be shared between threads safely - --> $DIR/not-sync.rs:20:5 + --> $DIR/not-sync.rs:20:12 | LL | fn test() {} - | ------------------ required by `test` + | ---- ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^^^^^^^^^ `std::sync::mpsc::Sender` cannot be shared between threads safely + | ^^^^^^^^^^^ `std::sync::mpsc::Sender` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender` diff --git a/src/test/ui/object-does-not-impl-trait.stderr b/src/test/ui/object-does-not-impl-trait.stderr index 83ca9a7212b2..7ac199d09438 100644 --- a/src/test/ui/object-does-not-impl-trait.stderr +++ b/src/test/ui/object-does-not-impl-trait.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `std::boxed::Box: Foo` is not satisfied --> $DIR/object-does-not-impl-trait.rs:6:44 | LL | fn take_foo(f: F) {} - | ------------------------ required by `take_foo` + | -------- --- required by this bound in `take_foo` LL | fn take_object(f: Box) { take_foo(f); } | ^ the trait `Foo` is not implemented for `std::boxed::Box` diff --git a/src/test/ui/on-unimplemented/on-trait.stderr b/src/test/ui/on-unimplemented/on-trait.stderr index 992f53b1da6b..8fe7ed4a2044 100644 --- a/src/test/ui/on-unimplemented/on-trait.stderr +++ b/src/test/ui/on-unimplemented/on-trait.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `std::option::Option>: MyFromIte --> $DIR/on-trait.rs:28:30 | LL | fn collect, B: MyFromIterator>(it: I) -> B { - | -------------------------------------------------------------------- required by `collect` + | ------- ----------------- required by this bound in `collect` ... LL | let y: Option> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() | ^^^^^^^ a collection of type `std::option::Option>` cannot be built from an iterator over elements of type `&u8` @@ -13,7 +13,7 @@ error[E0277]: the trait bound `std::string::String: Bar::Foo` is not --> $DIR/on-trait.rs:31:21 | LL | fn foobar>() -> T { - | ---------------------------------------------- required by `foobar` + | ------ --------------- required by this bound in `foobar` ... LL | let x: String = foobar(); | ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` diff --git a/src/test/ui/overlap-marker-trait.stderr b/src/test/ui/overlap-marker-trait.stderr index a66e3990e8bd..15ebcd17b0db 100644 --- a/src/test/ui/overlap-marker-trait.stderr +++ b/src/test/ui/overlap-marker-trait.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `NotDebugOrDisplay: Marker` is not satisfied - --> $DIR/overlap-marker-trait.rs:30:5 + --> $DIR/overlap-marker-trait.rs:30:17 | LL | fn is_marker() { } - | ------------------------- required by `is_marker` + | --------- ------ required by this bound in `is_marker` ... LL | is_marker::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay` + | ^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay` error: aborting due to previous error diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.stderr b/src/test/ui/parser/type-parameters-in-field-exprs.stderr index 2183c74da0ac..8f32fb0eca10 100644 --- a/src/test/ui/parser/type-parameters-in-field-exprs.stderr +++ b/src/test/ui/parser/type-parameters-in-field-exprs.stderr @@ -11,10 +11,10 @@ LL | f.x::<>; | ^^ error: field expressions may not have generic arguments - --> $DIR/type-parameters-in-field-exprs.rs:17:10 + --> $DIR/type-parameters-in-field-exprs.rs:17:7 | LL | f.x::(); - | ^^ + | ^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/phantom-oibit.stderr b/src/test/ui/phantom-oibit.stderr index c1b60e0823fd..ac48ee0cb0fe 100644 --- a/src/test/ui/phantom-oibit.stderr +++ b/src/test/ui/phantom-oibit.stderr @@ -2,7 +2,7 @@ error[E0277]: `T` cannot be shared between threads safely --> $DIR/phantom-oibit.rs:21:12 | LL | fn is_zen(_: T) {} - | ----------------------- required by `is_zen` + | ------ --- required by this bound in `is_zen` ... LL | is_zen(x) | ^ `T` cannot be shared between threads safely @@ -17,7 +17,7 @@ error[E0277]: `T` cannot be shared between threads safely --> $DIR/phantom-oibit.rs:26:12 | LL | fn is_zen(_: T) {} - | ----------------------- required by `is_zen` + | ------ --- required by this bound in `is_zen` ... LL | is_zen(x) | ^ `T` cannot be shared between threads safely diff --git a/src/test/ui/regions/regions-close-object-into-object-5.stderr b/src/test/ui/regions/regions-close-object-into-object-5.stderr index 390f8e7baa34..01975d40fdf1 100644 --- a/src/test/ui/regions/regions-close-object-into-object-5.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-5.stderr @@ -52,26 +52,26 @@ LL | // oh dear! LL | box B(&*v) as Box | ^^^^^^ | -note: ...so that the reference type `&dyn A` does not outlive the data it points at +note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-close-object-into-object-5.rs:17:9 | LL | box B(&*v) as Box | ^^^^^^ error[E0310]: the parameter type `T` may not live long enough - --> $DIR/regions-close-object-into-object-5.rs:17:9 + --> $DIR/regions-close-object-into-object-5.rs:17:11 | LL | fn f<'a, T, U>(v: Box+'static>) -> Box { | - help: consider adding an explicit lifetime bound `T: 'static`... LL | // oh dear! LL | box B(&*v) as Box - | ^^^^^^ + | ^^^ | -note: ...so that the type `T` will meet its required lifetime bounds - --> $DIR/regions-close-object-into-object-5.rs:17:9 +note: ...so that the reference type `&dyn A` does not outlive the data it points at + --> $DIR/regions-close-object-into-object-5.rs:17:11 | LL | box B(&*v) as Box - | ^^^^^^ + | ^^^ error[E0310]: the parameter type `T` may not live long enough --> $DIR/regions-close-object-into-object-5.rs:17:11 diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs index 193a523aed24..c27cea302fc4 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs @@ -1,4 +1,6 @@ // compile-flags: --test +// ignore-x86 +// ^ due to stderr output differences use std::num::ParseFloatError; diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index f253b67a0191..6aa95c308f24 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -1,13 +1,17 @@ error[E0277]: `main` has invalid return type `std::result::Result` - --> $DIR/termination-trait-test-wrong-type.rs:6:1 + --> $DIR/termination-trait-test-wrong-type.rs:8:1 | LL | / fn can_parse_zero_as_f32() -> Result { LL | | "0".parse() LL | | } | |_^ `main` can only return types that implement `std::process::Termination` + | + ::: $SRC_DIR/libtest/lib.rs:LL:COL + | +LL | pub fn assert_test_result(result: T) { + | ----------- required by this bound in `test::assert_test_result` | = help: the trait `std::process::Termination` is not implemented for `std::result::Result` - = note: required by `test::assert_test_result` error: aborting due to previous error diff --git a/src/test/ui/str/str-mut-idx.stderr b/src/test/ui/str/str-mut-idx.stderr index 372077a465e4..3c957970e51c 100644 --- a/src/test/ui/str/str-mut-idx.stderr +++ b/src/test/ui/str/str-mut-idx.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t --> $DIR/str-mut-idx.rs:4:15 | LL | fn bot() -> T { loop {} } - | ---------------- required by `bot` + | --- - required by this bound in `bot` ... LL | s[1..2] = bot(); | ^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr index 4a8c99cdef3f..cb55203c88e3 100644 --- a/src/test/ui/substs-ppaux.normal.stderr +++ b/src/test/ui/substs-ppaux.normal.stderr @@ -62,7 +62,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t --> $DIR/substs-ppaux.rs:49:5 | LL | fn bar<'a, T>() where T: 'a {} - | --------------------------- required by `Foo::bar` + | --- -- required by this bound in `Foo::bar` ... LL | >::bar; | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr index 3314eb60cdea..cafcba97b92c 100644 --- a/src/test/ui/substs-ppaux.verbose.stderr +++ b/src/test/ui/substs-ppaux.verbose.stderr @@ -62,7 +62,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t --> $DIR/substs-ppaux.rs:49:5 | LL | fn bar<'a, T>() where T: 'a {} - | --------------------------- required by `Foo::bar` + | --- -- required by this bound in `Foo::bar` ... LL | >::bar; | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index 6bb653389966..1cc704b44336 100644 --- a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `fn() -> impl std::future::Future {foo}: std::futu --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:9:9 | LL | fn bar(f: impl Future) {} - | --------------------------------- required by `bar` + | --- ----------------- required by this bound in `bar` ... LL | bar(foo); | ^^^ diff --git a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index 59726c82c237..7a49031bde7c 100644 --- a/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/src/test/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `fn() -> impl T {foo}: T` is not satisfied --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9 | LL | fn bar(f: impl T) {} - | ----------------------- required by `bar` + | --- ------- required by this bound in `bar` ... LL | bar(foo); | ^^^ diff --git a/src/test/ui/suggestions/into-str.stderr b/src/test/ui/suggestions/into-str.stderr index da5aeb63b909..fb3e1096ad54 100644 --- a/src/test/ui/suggestions/into-str.stderr +++ b/src/test/ui/suggestions/into-str.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `&str: std::convert::From` is --> $DIR/into-str.rs:4:5 | LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {} - | ------------------------------------------- required by `foo` + | --- ------------- required by this bound in `foo` ... LL | foo(String::new()); | ^^^ the trait `std::convert::From` is not implemented for `&str` diff --git a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr b/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr index 8403b2ebaca1..cad5c81f5a6c 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr +++ b/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr @@ -1,22 +1,22 @@ error[E0277]: `std::rc::Rc` cannot be sent between threads safely - --> $DIR/trait-alias-cross-crate.rs:14:5 + --> $DIR/trait-alias-cross-crate.rs:14:17 | LL | fn use_alias() {} - | --------------------------- required by `use_alias` + | --------- -------- required by this bound in `use_alias` ... LL | use_alias::>(); - | ^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc` cannot be sent between threads safely + | ^^^^^^^ `std::rc::Rc` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc` error[E0277]: `std::rc::Rc` cannot be shared between threads safely - --> $DIR/trait-alias-cross-crate.rs:14:5 + --> $DIR/trait-alias-cross-crate.rs:14:17 | LL | fn use_alias() {} - | --------------------------- required by `use_alias` + | --------- -------- required by this bound in `use_alias` ... LL | use_alias::>(); - | ^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc` cannot be shared between threads safely + | ^^^^^^^ `std::rc::Rc` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc` diff --git a/src/test/ui/traits/trait-suggest-where-clause.rs b/src/test/ui/traits/trait-suggest-where-clause.rs index 8405e5ff62e8..5ed14a6a8668 100644 --- a/src/test/ui/traits/trait-suggest-where-clause.rs +++ b/src/test/ui/traits/trait-suggest-where-clause.rs @@ -1,3 +1,5 @@ +// ignore-x86 +// ^ due to stderr output differences use std::mem; struct Misc(T); diff --git a/src/test/ui/traits/trait-suggest-where-clause.stderr b/src/test/ui/traits/trait-suggest-where-clause.stderr index f88dae37e48e..d15edaa9c814 100644 --- a/src/test/ui/traits/trait-suggest-where-clause.stderr +++ b/src/test/ui/traits/trait-suggest-where-clause.stderr @@ -1,28 +1,36 @@ error[E0277]: the size for values of type `U` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:7:5 + --> $DIR/trait-suggest-where-clause.rs:9:20 | LL | mem::size_of::(); - | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | ^ doesn't have a size known at compile-time + | + ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL + | +LL | pub const fn size_of() -> usize { + | - required by this bound in `std::mem::size_of` | = help: the trait `std::marker::Sized` is not implemented for `U` = note: to learn more, visit = help: consider adding a `where U: std::marker::Sized` bound - = note: required by `std::mem::size_of` error[E0277]: the size for values of type `U` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:10:5 + --> $DIR/trait-suggest-where-clause.rs:12:5 | LL | mem::size_of::>(); | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL + | +LL | pub const fn size_of() -> usize { + | - required by this bound in `std::mem::size_of` | = help: within `Misc`, the trait `std::marker::Sized` is not implemented for `U` = note: to learn more, visit = help: consider adding a `where U: std::marker::Sized` bound = note: required because it appears within the type `Misc` - = note: required by `std::mem::size_of` error[E0277]: the trait bound `u64: std::convert::From` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:15:5 + --> $DIR/trait-suggest-where-clause.rs:17:5 | LL | >::from; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `u64` @@ -31,7 +39,7 @@ LL | >::from; = note: required by `std::convert::From::from` error[E0277]: the trait bound `u64: std::convert::From<::Item>` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:18:5 + --> $DIR/trait-suggest-where-clause.rs:20:5 | LL | ::Item>>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<::Item>` is not implemented for `u64` @@ -40,7 +48,7 @@ LL | ::Item>>::from; = note: required by `std::convert::From::from` error[E0277]: the trait bound `Misc<_>: std::convert::From` is not satisfied - --> $DIR/trait-suggest-where-clause.rs:23:5 + --> $DIR/trait-suggest-where-clause.rs:25:5 | LL | as From>::from; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `Misc<_>` @@ -48,24 +56,32 @@ LL | as From>::from; = note: required by `std::convert::From::from` error[E0277]: the size for values of type `[T]` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:28:5 + --> $DIR/trait-suggest-where-clause.rs:30:20 | LL | mem::size_of::<[T]>(); - | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | ^^^ doesn't have a size known at compile-time + | + ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL + | +LL | pub const fn size_of() -> usize { + | - required by this bound in `std::mem::size_of` | = help: the trait `std::marker::Sized` is not implemented for `[T]` = note: to learn more, visit - = note: required by `std::mem::size_of` error[E0277]: the size for values of type `[&U]` cannot be known at compilation time - --> $DIR/trait-suggest-where-clause.rs:31:5 + --> $DIR/trait-suggest-where-clause.rs:33:5 | LL | mem::size_of::<[&U]>(); | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL + | +LL | pub const fn size_of() -> usize { + | - required by this bound in `std::mem::size_of` | = help: the trait `std::marker::Sized` is not implemented for `[&U]` = note: to learn more, visit - = note: required by `std::mem::size_of` error: aborting due to 7 previous errors diff --git a/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr b/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr index b29d726fbba9..6fd6a37b22df 100644 --- a/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-simultaneous.stderr @@ -2,7 +2,7 @@ error[E0275]: overflow evaluating the requirement `{integer}: Tweedledum` --> $DIR/traits-inductive-overflow-simultaneous.rs:18:5 | LL | fn is_ee(t: T) { - | ------------------------ required by `is_ee` + | ----- ----- required by this bound in `is_ee` ... LL | is_ee(4); | ^^^^^ diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr index 76d486a51e5c..40c2c2e4c9d1 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr @@ -8,7 +8,7 @@ error[E0277]: the trait bound `NoClone: std::marker::Copy` is not satisfied --> $DIR/traits-inductive-overflow-supertrait-oibit.rs:15:23 | LL | fn copy(x: T) -> (T, T) { (x, x) } - | --------------------------------- required by `copy` + | ---- ----- required by this bound in `copy` ... LL | let (a, b) = copy(NoClone); | ^^^^^^^ the trait `std::marker::Copy` is not implemented for `NoClone` diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr b/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr index 92747be7d2c6..96a9343d4ebf 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait.stderr @@ -2,7 +2,7 @@ error[E0275]: overflow evaluating the requirement `NoClone: Magic` --> $DIR/traits-inductive-overflow-supertrait.rs:13:18 | LL | fn copy(x: T) -> (T, T) { (x, x) } - | --------------------------------- required by `copy` + | ---- ----- required by this bound in `copy` ... LL | let (a, b) = copy(NoClone); | ^^^^ diff --git a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr b/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr index 58d7fcd56c71..447fc5643483 100644 --- a/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-two-traits.stderr @@ -2,7 +2,7 @@ error[E0275]: overflow evaluating the requirement `*mut (): Magic` --> $DIR/traits-inductive-overflow-two-traits.rs:19:5 | LL | fn wizard() { check::<::X>(); } - | --------------------- required by `wizard` + | ------ ----- required by this bound in `wizard` ... LL | wizard::<*mut ()>(); | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/traits/traits-negative-impls.stderr b/src/test/ui/traits/traits-negative-impls.stderr index 022b12d256cc..22b6d2a0c4e9 100644 --- a/src/test/ui/traits/traits-negative-impls.stderr +++ b/src/test/ui/traits/traits-negative-impls.stderr @@ -24,7 +24,7 @@ error[E0277]: `dummy1b::TestType` cannot be sent between threads safely --> $DIR/traits-negative-impls.rs:32:13 | LL | fn is_send(_: T) {} - | ------------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` ... LL | is_send(TestType); | ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely @@ -35,7 +35,7 @@ error[E0277]: `dummy1c::TestType` cannot be sent between threads safely --> $DIR/traits-negative-impls.rs:40:13 | LL | fn is_send(_: T) {} - | ------------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` ... LL | is_send((8, TestType)); | ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely @@ -47,7 +47,7 @@ error[E0277]: `dummy2::TestType` cannot be sent between threads safely --> $DIR/traits-negative-impls.rs:48:13 | LL | fn is_send(_: T) {} - | ------------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` ... LL | is_send(Box::new(TestType)); | ^^^^^^^^^^^^^^^^^^ `dummy2::TestType` cannot be sent between threads safely @@ -60,7 +60,7 @@ error[E0277]: `dummy3::TestType` cannot be sent between threads safely --> $DIR/traits-negative-impls.rs:56:13 | LL | fn is_send(_: T) {} - | ------------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` ... LL | is_send(Box::new(Outer2(TestType))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely @@ -74,7 +74,7 @@ error[E0277]: `main::TestType` cannot be sent between threads safely --> $DIR/traits-negative-impls.rs:66:13 | LL | fn is_sync(_: T) {} - | ------------------------- required by `is_sync` + | ------- ---- required by this bound in `is_sync` ... LL | is_sync(Outer2(TestType)); | ^^^^^^^^^^^^^^^^ `main::TestType` cannot be sent between threads safely diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr index 49393a8678ef..acf309ac6087 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr @@ -34,7 +34,7 @@ LL | generic_function(5i32); | ^^^^ the trait `Foo` is not implemented for `i32` ... LL | fn generic_function(t: T) {} - | --------------------------------- required by `generic_function` + | ---------------- --- required by this bound in `generic_function` error: aborting due to 4 previous errors diff --git a/src/test/ui/try-operator-on-main.stderr b/src/test/ui/try-operator-on-main.stderr index 6878cd80629b..d2f1a04837b8 100644 --- a/src/test/ui/try-operator-on-main.stderr +++ b/src/test/ui/try-operator-on-main.stderr @@ -17,13 +17,13 @@ LL | ()?; = note: required by `std::ops::Try::into_result` error[E0277]: the trait bound `(): std::ops::Try` is not satisfied - --> $DIR/try-operator-on-main.rs:15:5 + --> $DIR/try-operator-on-main.rs:15:25 | LL | try_trait_generic::<()>(); - | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Try` is not implemented for `()` + | ^^ the trait `std::ops::Try` is not implemented for `()` ... LL | fn try_trait_generic() -> T { - | ----------------------------------- required by `try_trait_generic` + | ----------------- --- required by this bound in `try_trait_generic` error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` --> $DIR/try-operator-on-main.rs:22:5 diff --git a/src/test/ui/type/ascription/issue-34255-1.stderr b/src/test/ui/type/ascription/issue-34255-1.stderr index 195b393b2f60..0d0acfde8860 100644 --- a/src/test/ui/type/ascription/issue-34255-1.stderr +++ b/src/test/ui/type/ascription/issue-34255-1.stderr @@ -5,10 +5,10 @@ LL | input_cells: Vec::new() | ^^^^^^^^^^^ a field by this name exists in `Self` error: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/issue-34255-1.rs:7:30 + --> $DIR/issue-34255-1.rs:7:27 | LL | input_cells: Vec::new() - | ^^ + | ^^^^^ | = note: `#[deny(parenthesized_params_in_types_and_modules)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! diff --git a/src/test/ui/type/type-annotation-needed.rs b/src/test/ui/type/type-annotation-needed.rs index ff2342c4455c..ddf16f769951 100644 --- a/src/test/ui/type/type-annotation-needed.rs +++ b/src/test/ui/type/type-annotation-needed.rs @@ -1,5 +1,6 @@ fn foo>(x: i32) {} //~^ NOTE required by +//~| NOTE fn main() { foo(42); diff --git a/src/test/ui/type/type-annotation-needed.stderr b/src/test/ui/type/type-annotation-needed.stderr index 1dd2aafeb62f..01287b727d2f 100644 --- a/src/test/ui/type/type-annotation-needed.stderr +++ b/src/test/ui/type/type-annotation-needed.stderr @@ -1,8 +1,8 @@ error[E0283]: type annotations required: cannot resolve `_: std::convert::Into` - --> $DIR/type-annotation-needed.rs:5:5 + --> $DIR/type-annotation-needed.rs:6:5 | LL | fn foo>(x: i32) {} - | ------------------------------- required by `foo` + | --- ------------ required by this bound in `foo` ... LL | foo(42); | ^^^ diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr index 7fb3731be23e..b842d0ae1a24 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr @@ -5,7 +5,7 @@ LL | is_send::(); | ^^^^^^^^^^^^^^^^^^^^^^^ `::AssocType` cannot be sent between threads safely ... LL | fn is_send() { - | -------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` | = help: the trait `std::marker::Send` is not implemented for `::AssocType` = help: consider adding a `where ::AssocType: std::marker::Send` bound diff --git a/src/test/ui/typeck/typeck-default-trait-impl-constituent-types-2.stderr b/src/test/ui/typeck/typeck-default-trait-impl-constituent-types-2.stderr index 8389356fdd6f..f060afea24e7 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-constituent-types-2.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-constituent-types-2.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied in `(MyS2, MyS)` --> $DIR/typeck-default-trait-impl-constituent-types-2.rs:16:5 | LL | fn is_mytrait() {} - | --------------------------- required by `is_mytrait` + | ---------- ------- required by this bound in `is_mytrait` ... LL | is_mytrait::<(MyS2, MyS)>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ within `(MyS2, MyS)`, the trait `MyTrait` is not implemented for `MyS2` diff --git a/src/test/ui/typeck/typeck-default-trait-impl-constituent-types.stderr b/src/test/ui/typeck/typeck-default-trait-impl-constituent-types.stderr index eee186feea67..22a2cb3e0ecb 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-constituent-types.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-constituent-types.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied - --> $DIR/typeck-default-trait-impl-constituent-types.rs:20:5 + --> $DIR/typeck-default-trait-impl-constituent-types.rs:20:18 | LL | fn is_mytrait() {} - | --------------------------- required by `is_mytrait` + | ---------- ------- required by this bound in `is_mytrait` ... LL | is_mytrait::(); - | ^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `MyS2` + | ^^^^ the trait `MyTrait` is not implemented for `MyS2` | = help: the following implementations were found: diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr index 1e6adeb43099..e30d4dfa1b3c 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr @@ -1,11 +1,11 @@ error[E0277]: `MyNotSendable` cannot be sent between threads safely - --> $DIR/typeck-default-trait-impl-negation-send.rs:19:5 + --> $DIR/typeck-default-trait-impl-negation-send.rs:19:15 | LL | fn is_send() {} - | --------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` ... LL | is_send::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ `MyNotSendable` cannot be sent between threads safely + | ^^^^^^^^^^^^^ `MyNotSendable` cannot be sent between threads safely | = help: the trait `std::marker::Send` is not implemented for `MyNotSendable` diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr index d4f8f5ad82c9..4dd8e01cf2d3 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr @@ -1,11 +1,11 @@ error[E0277]: `MyNotSync` cannot be shared between threads safely - --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:5 + --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:15 | LL | fn is_sync() {} - | --------------------- required by `is_sync` + | ------- ---- required by this bound in `is_sync` ... LL | is_sync::(); - | ^^^^^^^^^^^^^^^^^^^^ `MyNotSync` cannot be shared between threads safely + | ^^^^^^^^^ `MyNotSync` cannot be shared between threads safely | = help: the trait `std::marker::Sync` is not implemented for `MyNotSync` @@ -13,7 +13,7 @@ error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safel --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:5 | LL | fn is_sync() {} - | --------------------- required by `is_sync` + | ------- ---- required by this bound in `is_sync` ... LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely @@ -25,7 +25,7 @@ error[E0277]: `Managed` cannot be shared between threads safely --> $DIR/typeck-default-trait-impl-negation-sync.rs:39:5 | LL | fn is_sync() {} - | --------------------- required by `is_sync` + | ------- ---- required by this bound in `is_sync` ... LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation.stderr index e993098b2dee..4b13fcc885a0 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation.stderr @@ -1,23 +1,23 @@ error[E0277]: the trait bound `ThisImplsUnsafeTrait: MyTrait` is not satisfied - --> $DIR/typeck-default-trait-impl-negation.rs:21:5 + --> $DIR/typeck-default-trait-impl-negation.rs:21:19 | LL | fn is_my_trait() {} - | ---------------------------- required by `is_my_trait` + | ----------- ------- required by this bound in `is_my_trait` ... LL | is_my_trait::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `ThisImplsUnsafeTrait` + | ^^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `ThisImplsUnsafeTrait` | = help: the following implementations were found: error[E0277]: the trait bound `ThisImplsTrait: MyUnsafeTrait` is not satisfied - --> $DIR/typeck-default-trait-impl-negation.rs:24:5 + --> $DIR/typeck-default-trait-impl-negation.rs:24:26 | LL | fn is_my_unsafe_trait() {} - | ----------------------------------------- required by `is_my_unsafe_trait` + | ------------------ ------------- required by this bound in `is_my_unsafe_trait` ... LL | is_my_unsafe_trait::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyUnsafeTrait` is not implemented for `ThisImplsTrait` + | ^^^^^^^^^^^^^^ the trait `MyUnsafeTrait` is not implemented for `ThisImplsTrait` | = help: the following implementations were found: diff --git a/src/test/ui/typeck/typeck-default-trait-impl-precedence.stderr b/src/test/ui/typeck/typeck-default-trait-impl-precedence.stderr index d87a6384e5c0..158773044182 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-precedence.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-precedence.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `u32: Signed` is not satisfied --> $DIR/typeck-default-trait-impl-precedence.rs:18:5 | LL | fn is_defaulted() { } - | ------------------------------ required by `is_defaulted` + | ------------ --------- required by this bound in `is_defaulted` ... LL | is_defaulted::<&'static u32>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Signed` is not implemented for `u32` diff --git a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr index 5f3a5bc6e005..b3139083b1ac 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr @@ -1,11 +1,11 @@ error[E0277]: `T` cannot be sent between threads safely - --> $DIR/typeck-default-trait-impl-send-param.rs:5:5 + --> $DIR/typeck-default-trait-impl-send-param.rs:5:15 | LL | is_send::() - | ^^^^^^^^^^^^ `T` cannot be sent between threads safely + | ^ `T` cannot be sent between threads safely ... LL | fn is_send() { - | -------------------- required by `is_send` + | ------- ---- required by this bound in `is_send` | = help: the trait `std::marker::Send` is not implemented for `T` = help: consider adding a `where T: std::marker::Send` bound diff --git a/src/test/ui/typeck/typeck-unsafe-always-share.stderr b/src/test/ui/typeck/typeck-unsafe-always-share.stderr index 8b3032b088d0..d08613238f86 100644 --- a/src/test/ui/typeck/typeck-unsafe-always-share.stderr +++ b/src/test/ui/typeck/typeck-unsafe-always-share.stderr @@ -2,7 +2,7 @@ error[E0277]: `std::cell::UnsafeCell>` cannot be shared betwee --> $DIR/typeck-unsafe-always-share.rs:19:10 | LL | fn test(s: T) {} - | ---------------------- required by `test` + | ---- ---- required by this bound in `test` ... LL | test(us); | ^^ `std::cell::UnsafeCell>` cannot be shared between threads safely @@ -13,7 +13,7 @@ error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads s --> $DIR/typeck-unsafe-always-share.rs:23:10 | LL | fn test(s: T) {} - | ---------------------- required by `test` + | ---- ---- required by this bound in `test` ... LL | test(uns); | ^^^ `std::cell::UnsafeCell` cannot be shared between threads safely @@ -24,7 +24,7 @@ error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads s --> $DIR/typeck-unsafe-always-share.rs:27:5 | LL | fn test(s: T) {} - | ---------------------- required by `test` + | ---- ---- required by this bound in `test` ... LL | test(ms); | ^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely @@ -36,7 +36,7 @@ error[E0277]: `NoSync` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:30:10 | LL | fn test(s: T) {} - | ---------------------- required by `test` + | ---- ---- required by this bound in `test` ... LL | test(NoSync); | ^^^^^^ `NoSync` cannot be shared between threads safely diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr index dd024b76c3ba..6ec406382891 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-default.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `dyn Foo<(isize,), isize, Output = ()>: Eq $DIR/unboxed-closure-sugar-default.rs:21:5 | LL | fn eq() where A : Eq { } - | -------------------------------------------- required by `eq` + | -- ----- required by this bound in `eq` ... LL | eq::, dyn Foo(isize)>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>` diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr index 83754bd36ef2..8dd32ee7f104 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `dyn Foo<(char,), Output = ()>: Eq $DIR/unboxed-closure-sugar-equiv.rs:43:5 | LL | fn eq>() { } - | ----------------------------------- required by `eq` + | -- ----- required by this bound in `eq` ... LL | / eq::< dyn Foo<(),Output=()>, LL | | dyn Foo(char) >(); diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr index 81095826f38a..32619420f6d5 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.stderr @@ -1,8 +1,8 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:19 + --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16 | LL | let x: Box = panic!(); - | ^^ only `Fn` traits may use parentheses + | ^^^^^ only `Fn` traits may use parentheses error[E0107]: wrong number of type arguments: expected 1, found 0 --> $DIR/unboxed-closure-sugar-used-on-struct-1.rs:8:16 diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr index 7d05ca55ffdb..f5cf6db30f99 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-3.stderr @@ -1,11 +1,11 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/unboxed-closure-sugar-used-on-struct-3.rs:14:18 + --> $DIR/unboxed-closure-sugar-used-on-struct-3.rs:14:13 | LL | let b = Bar::(isize, usize)::new(); // OK too (for the parser) - | ^^^^^^^^^^^^^^ - | | - | only `Fn` traits may use parentheses - | help: use angle brackets instead: `` + | ^^^^^^^^^^^^^^^^^^^ + | | + | only `Fn` traits may use parentheses + | help: use angle brackets instead: `Bar::` error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr index 3c78d9f9135c..ba93b60dad87 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct.stderr @@ -1,8 +1,8 @@ error[E0214]: parenthesized type parameters may only be used with a `Fn` trait - --> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:18 + --> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:15 | LL | fn foo(b: Box) { - | ^^ only `Fn` traits may use parentheses + | ^^^^^ only `Fn` traits may use parentheses error[E0107]: wrong number of type arguments: expected 1, found 0 --> $DIR/unboxed-closure-sugar-used-on-struct.rs:7:15 diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr index c59082932ddf..59e7bc8c832d 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-1.stderr @@ -1,8 +1,8 @@ error[E0220]: associated type `Output` not found for `One<()>` - --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs:5:19 + --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-1.rs:5:16 | LL | fn foo(_: &dyn One()) - | ^^ associated type `Output` not found + | ^^^^^ associated type `Output` not found error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr index 6c61e74584a5..f42ac38d370d 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr @@ -5,10 +5,10 @@ LL | fn foo(_: &dyn Three()) | ^^^^^^^ expected 3 type arguments error[E0220]: associated type `Output` not found for `Three<(), [type error], [type error]>` - --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:21 + --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:5:16 | LL | fn foo(_: &dyn Three()) - | ^^ associated type `Output` not found + | ^^^^^^^ associated type `Output` not found error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr index b96e2cbc36bb..8185a798e7b6 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr @@ -1,14 +1,14 @@ error[E0107]: wrong number of type arguments: expected 0, found 1 - --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:19 + --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:15 | LL | fn foo(_: dyn Zero()) - | ^^ unexpected type argument + | ^^^^^^ unexpected type argument error[E0220]: associated type `Output` not found for `Zero` - --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:19 + --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:5:15 | LL | fn foo(_: dyn Zero()) - | ^^ associated type `Output` not found + | ^^^^^^ associated type `Output` not found error: aborting due to 2 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr index bd707a8508a7..c81402a3dcc0 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.stderr @@ -1,8 +1,8 @@ error[E0107]: wrong number of type arguments: expected 0, found 1 - --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:13 + --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:8 | LL | fn f isize>(x: F) {} - | ^^^^^^^ unexpected type argument + | ^^^^^^^^^^^^ unexpected type argument error[E0220]: associated type `Output` not found for `Trait` --> $DIR/unboxed-closure-sugar-wrong-trait.rs:5:24 diff --git a/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr index d03397e42445..dc7661815310 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr @@ -2,7 +2,7 @@ error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `S` --> $DIR/unboxed-closures-fnmut-as-fn.rs:28:21 | LL | fn call_itisize>(f: &F, x: isize) -> isize { - | -------------------------------------------------------- required by `call_it` + | ------- ---------------- required by this bound in `call_it` ... LL | let x = call_it(&S, 22); | ^^ expected an `Fn<(isize,)>` closure, found `S` diff --git a/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr index bde30729a3ca..0b86719df848 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr @@ -2,7 +2,7 @@ error[E0277]: expected a `std::ops::Fn<(&isize,)>` closure, found `for<'r> unsaf --> $DIR/unboxed-closures-unsafe-extern-fn.rs:12:21 | LL | fn call_itisize>(_: &F, _: isize) -> isize { 0 } - | --------------------------------------------------------- required by `call_it` + | ------- ----------------- required by this bound in `call_it` ... LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` @@ -13,7 +13,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> u --> $DIR/unboxed-closures-unsafe-extern-fn.rs:12:21 | LL | fn call_itisize>(_: &F, _: isize) -> isize { 0 } - | --------------------------------------------------------- required by `call_it` + | ------- ----- required by this bound in `call_it` ... LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` @@ -24,7 +24,7 @@ error[E0277]: expected a `std::ops::FnMut<(&isize,)>` closure, found `for<'r> un --> $DIR/unboxed-closures-unsafe-extern-fn.rs:18:25 | LL | fn call_it_mutisize>(_: &mut F, _: isize) -> isize { 0 } - | -------------------------------------------------------------------- required by `call_it_mut` + | ----------- -------------------- required by this bound in `call_it_mut` ... LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` @@ -35,7 +35,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> u --> $DIR/unboxed-closures-unsafe-extern-fn.rs:18:25 | LL | fn call_it_mutisize>(_: &mut F, _: isize) -> isize { 0 } - | -------------------------------------------------------------------- required by `call_it_mut` + | ----------- ----- required by this bound in `call_it_mut` ... LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` @@ -46,7 +46,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> u --> $DIR/unboxed-closures-unsafe-extern-fn.rs:24:26 | LL | fn call_it_onceisize>(_: F, _: isize) -> isize { 0 } - | ----------------------------------------------------------------- required by `call_it_once` + | ------------ ----- required by this bound in `call_it_once` ... LL | let z = call_it_once(square, 22); | ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` diff --git a/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr b/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr index 7b393b35f298..17faf047c14e 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr @@ -2,7 +2,7 @@ error[E0277]: expected a `std::ops::Fn<(&isize,)>` closure, found `for<'r> exter --> $DIR/unboxed-closures-wrong-abi.rs:12:21 | LL | fn call_itisize>(_: &F, _: isize) -> isize { 0 } - | --------------------------------------------------------- required by `call_it` + | ------- ----------------- required by this bound in `call_it` ... LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` @@ -13,7 +13,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> e --> $DIR/unboxed-closures-wrong-abi.rs:12:21 | LL | fn call_itisize>(_: &F, _: isize) -> isize { 0 } - | --------------------------------------------------------- required by `call_it` + | ------- ----- required by this bound in `call_it` ... LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` @@ -24,7 +24,7 @@ error[E0277]: expected a `std::ops::FnMut<(&isize,)>` closure, found `for<'r> ex --> $DIR/unboxed-closures-wrong-abi.rs:18:25 | LL | fn call_it_mutisize>(_: &mut F, _: isize) -> isize { 0 } - | -------------------------------------------------------------------- required by `call_it_mut` + | ----------- -------------------- required by this bound in `call_it_mut` ... LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` @@ -35,7 +35,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> e --> $DIR/unboxed-closures-wrong-abi.rs:18:25 | LL | fn call_it_mutisize>(_: &mut F, _: isize) -> isize { 0 } - | -------------------------------------------------------------------- required by `call_it_mut` + | ----------- ----- required by this bound in `call_it_mut` ... LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` @@ -46,7 +46,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> e --> $DIR/unboxed-closures-wrong-abi.rs:24:26 | LL | fn call_it_onceisize>(_: F, _: isize) -> isize { 0 } - | ----------------------------------------------------------------- required by `call_it_once` + | ------------ ----- required by this bound in `call_it_once` ... LL | let z = call_it_once(square, 22); | ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` diff --git a/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr index 68fc0d45b9a8..5b1d6eb5b681 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr @@ -2,7 +2,7 @@ error[E0277]: expected a `std::ops::Fn<(&isize,)>` closure, found `unsafe fn(isi --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:13:21 | LL | fn call_itisize>(_: &F, _: isize) -> isize { 0 } - | --------------------------------------------------------- required by `call_it` + | ------- ----------------- required by this bound in `call_it` ... LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` @@ -13,7 +13,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `unsafe fn --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:13:21 | LL | fn call_itisize>(_: &F, _: isize) -> isize { 0 } - | --------------------------------------------------------- required by `call_it` + | ------- ----- required by this bound in `call_it` ... LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` @@ -24,7 +24,7 @@ error[E0277]: expected a `std::ops::FnMut<(&isize,)>` closure, found `unsafe fn( --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:19:25 | LL | fn call_it_mutisize>(_: &mut F, _: isize) -> isize { 0 } - | -------------------------------------------------------------------- required by `call_it_mut` + | ----------- -------------------- required by this bound in `call_it_mut` ... LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` @@ -35,7 +35,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `unsafe fn --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:19:25 | LL | fn call_it_mutisize>(_: &mut F, _: isize) -> isize { 0 } - | -------------------------------------------------------------------- required by `call_it_mut` + | ----------- ----- required by this bound in `call_it_mut` ... LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` @@ -46,7 +46,7 @@ error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `unsafe fn --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:25:26 | LL | fn call_it_onceisize>(_: F, _: isize) -> isize { 0 } - | ----------------------------------------------------------------- required by `call_it_once` + | ------------ ----- required by this bound in `call_it_once` ... LL | let z = call_it_once(square, 22); | ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` diff --git a/src/test/ui/unsized/unsized-bare-typaram.stderr b/src/test/ui/unsized/unsized-bare-typaram.stderr index c39c648f661c..e56176690a11 100644 --- a/src/test/ui/unsized/unsized-bare-typaram.stderr +++ b/src/test/ui/unsized/unsized-bare-typaram.stderr @@ -1,10 +1,10 @@ error[E0277]: the size for values of type `T` cannot be known at compilation time - --> $DIR/unsized-bare-typaram.rs:2:23 + --> $DIR/unsized-bare-typaram.rs:2:29 | LL | fn bar() { } - | ------------------ required by `bar` + | --- - required by this bound in `bar` LL | fn foo() { bar::() } - | ^^^^^^^^ 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 `T` = note: to learn more, visit diff --git a/src/test/ui/unsized/unsized-struct.stderr b/src/test/ui/unsized/unsized-struct.stderr index 795115154e72..0d4776ff6c25 100644 --- a/src/test/ui/unsized/unsized-struct.stderr +++ b/src/test/ui/unsized/unsized-struct.stderr @@ -15,7 +15,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim --> $DIR/unsized-struct.rs:13:24 | LL | fn is_sized() { } - | ---------------------- required by `is_sized` + | -------- - required by this bound in `is_sized` ... LL | fn bar2() { is_sized::>() } | ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/unsized3.stderr b/src/test/ui/unsized3.stderr index f381cacadf9c..c821a08f6b58 100644 --- a/src/test/ui/unsized3.stderr +++ b/src/test/ui/unsized3.stderr @@ -5,7 +5,7 @@ LL | f2::(x); | ^ doesn't have a size known at compile-time ... LL | fn f2(x: &X) { - | --------------- required by `f2` + | -- - required by this bound in `f2` | = help: the trait `std::marker::Sized` is not implemented for `X` = note: to learn more, visit @@ -18,7 +18,7 @@ LL | f4::(x); | ^ doesn't have a size known at compile-time ... LL | fn f4(x: &X) { - | ------------------ required by `f4` + | -- - required by this bound in `f4` | = help: the trait `std::marker::Sized` is not implemented for `X` = note: to learn more, visit @@ -28,7 +28,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized3.rs:33:8 | LL | fn f5(x: &Y) {} - | --------------- required by `f5` + | -- - required by this bound in `f5` ... LL | f5(x1); | ^^ doesn't have a size known at compile-time @@ -67,7 +67,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized3.rs:45:8 | LL | fn f5(x: &Y) {} - | --------------- required by `f5` + | -- - required by this bound in `f5` ... LL | f5(&(32, *x1)); | ^^^^^^^^^^ doesn't have a size known at compile-time diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr index 118caf8cccec..727c9b8e0672 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/where-clause-constraints-are-local-for-inherent-impl.rs:13:22 | LL | fn require_copy(x: T) {} - | ------------------------------ required by `require_copy` + | ------------ ---- required by this bound in `require_copy` ... LL | require_copy(self.x); | ^^^^^^ the trait `std::marker::Copy` is not implemented for `T` diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr index d1cb4e1cc7d1..1c1937c3074d 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied --> $DIR/where-clause-constraints-are-local-for-trait-impl.rs:18:22 | LL | fn require_copy(x: T) {} - | ------------------------------ required by `require_copy` + | ------------ ---- required by this bound in `require_copy` ... LL | require_copy(self.x); | ^^^^^^ the trait `std::marker::Copy` is not implemented for `T` diff --git a/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr b/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr index e59d6089ea53..1c859ac648c3 100644 --- a/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr +++ b/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `Struct: std::cmp::Eq` is not satisfied --> $DIR/where-clauses-unsatisfied.rs:6:10 | LL | fn equal(a: &T, b: &T) -> bool where T : Eq { a == b } - | ---------------------------------------------- required by `equal` + | ----- -- required by this bound in `equal` ... LL | drop(equal(&Struct, &Struct)) | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Struct` diff --git a/src/test/ui/where-clauses/where-for-self-2.stderr b/src/test/ui/where-clauses/where-for-self-2.stderr index 32dc0e7359cb..b18b36d029d7 100644 --- a/src/test/ui/where-clauses/where-for-self-2.stderr +++ b/src/test/ui/where-clauses/where-for-self-2.stderr @@ -1,13 +1,13 @@ error[E0277]: the trait bound `for<'a> &'a _: Bar` is not satisfied --> $DIR/where-for-self-2.rs:21:5 | -LL | / fn foo(x: &T) -LL | | where for<'a> &'a T: Bar -LL | | {} - | |__- required by `foo` +LL | fn foo(x: &T) + | --- +LL | where for<'a> &'a T: Bar + | --- required by this bound in `foo` ... -LL | foo(&X); - | ^^^ the trait `for<'a> Bar` is not implemented for `&'a _` +LL | foo(&X); + | ^^^ the trait `for<'a> Bar` is not implemented for `&'a _` | = help: the following implementations were found: <&'static u32 as Bar>