Auto merge of #64151 - estebank:binding-error, r=varkor

On obligation errors point at the unfulfilled binding when possible

CC #42855, #64130, #64135. Fix #61860.
This commit is contained in:
bors 2019-09-22 22:34:22 +00:00
commit c0b7e71bec
175 changed files with 904 additions and 737 deletions

View File

@ -14,6 +14,8 @@ TEST_DIR = os.path.abspath(
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}

View File

@ -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,
);
}

View File

@ -2750,3 +2750,15 @@ pub enum Node<'hir> {
Crate,
}
impl Node<'_> {
pub fn ident(&self) -> Option<Ident> {
match self {
Node::TraitItem(TraitItem { ident, .. }) |
Node::ImplItem(ImplItem { ident, .. }) |
Node::ForeignItem(ForeignItem { ident, .. }) |
Node::Item(Item { ident, .. }) => Some(*ident),
_ => None,
}
}
}

View File

@ -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<hir::BodyId>,
fallback_has_occurred: bool) {
pub fn report_fulfillment_errors(
&self,
errors: &[FulfillmentError<'tcx>],
body_id: Option<hir::BodyId>,
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)));

View File

@ -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>),

View File

@ -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)
}

View File

@ -2797,6 +2797,10 @@ impl<'tcx> TyCtxt<'tcx> {
})
}
pub fn opt_item_name(self, def_id: DefId) -> Option<Ident> {
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<AssocItem> {
let is_associated_item = if let Some(hir_id) = self.hir().as_local_hir_id(def_id) {
match self.hir().get(hir_id) {

View File

@ -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,

View File

@ -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,

View File

@ -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<Span>) {
let bounds = self.tcx.predicates_of(def_id);
let spans: Vec<Span> = 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<MethodCallee<'tcx>, ()>,
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<Span>,
) {
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<traits::FulfillmentError<'_>>,
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::<T::AssocType>();`
// 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,

View File

@ -129,10 +129,11 @@ impl<'a> Parser<'a> {
self.parse_path(style)
}
crate fn parse_path_segments(&mut self,
segments: &mut Vec<PathSegment>,
style: PathStyle)
-> PResult<'a, ()> {
crate fn parse_path_segments(
&mut self,
segments: &mut Vec<PathSegment>,
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 {

View File

@ -7,7 +7,7 @@ LL | f1(|_: (), _: ()| {});
| expected signature of `for<'r, 's> fn(&'r (), &'s ()) -> _`
...
LL | fn f1<F>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
| ------------------------------------------------- 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>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
| ------------------------------------------------- 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>(_: 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>(_: 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>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
| ------------------------------------------------------------ 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>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
| ------------------------------------------------------------ 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>(_: 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>(_: 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>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), 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>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), 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>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'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>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
| --------------------------------------------------------------------------------- required by `h2`
| -- ------------------------------------------------ required by this bound in `h2`
error: aborting due to 22 previous errors

View File

@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<ModelT as Vehicle>::Color == Blue`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:31:10
|
LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
| ------------------------------------ required by `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 `<ModelU as Vehicle>::Color == Black`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10
|
LL | fn black_car<C:Car<Color=Black>>(c: C) {
| -------------------------------------- required by `black_car`
| --------- ----------- required by this bound in `black_car`
...
LL | fn c() { black_car(ModelU); }
| ^^^^^^^^^ expected struct `Blue`, found struct `Black`

View File

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

View File

@ -1,15 +1,13 @@
error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:82:5
|
LL | / fn foo<T>()
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<T>()
| ---
LL | where T : for<'x> TheTrait<&'x isize, A = &'x isize>
| ------------- required by this bound in `foo`
...
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected usize, found isize
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected usize, found isize
|
= note: expected type `&usize`
found type `&isize`
@ -17,31 +15,27 @@ LL | foo::<UintStruct>();
error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
--> $DIR/associated-types-eq-hr.rs:86:5
|
LL | / fn bar<T>()
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<T>()
| ---
LL | where T : for<'x> TheTrait<&'x isize, A = &'x usize>
| ------------- required by this bound in `bar`
...
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected isize, found usize
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected isize, found usize
|
= note: expected type `&isize`
found type `&usize`
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:91:5
--> $DIR/associated-types-eq-hr.rs:91:17
|
LL | / fn tuple_one<T>()
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<T>()
| ---------
LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
| ---------------------------------------------------------- required by this bound in `tuple_one`
...
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
LL | tuple_one::<Tuple>();
| ^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
@ -49,28 +43,24 @@ LL | tuple_one::<Tuple>();
error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:91:5
|
LL | / fn tuple_one<T>()
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<T>()
| ---------
LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
| ------------- required by this bound in `tuple_one`
...
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:97:5
--> $DIR/associated-types-eq-hr.rs:97:17
|
LL | / fn tuple_two<T>()
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<T>()
| ---------
LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
| ---------------------------------------------------------- required by this bound in `tuple_two`
...
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
LL | tuple_two::<Tuple>();
| ^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
@ -78,28 +68,24 @@ LL | tuple_two::<Tuple>();
error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'y isize`
--> $DIR/associated-types-eq-hr.rs:97:5
|
LL | / fn tuple_two<T>()
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<T>()
| ---------
LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
| ------------- required by this bound in `tuple_two`
...
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:107:5
--> $DIR/associated-types-eq-hr.rs:107:18
|
LL | / fn tuple_four<T>()
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<T>()
| ----------
LL | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)>
| ------------------------------------------- required by this bound in `tuple_four`
...
LL | tuple_four::<Tuple>();
| ^^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
LL | tuple_four::<Tuple>();
| ^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>

View File

@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == std::op
--> $DIR/associated-types-issue-20346.rs:34:5
|
LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
| ------------------------------------------------ required by `is_iterator_of`
| -------------- ------ required by this bound in `is_iterator_of`
...
LL | is_iterator_of::<Option<T>, _>(&adapter);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter, found enum `std::option::Option`

View File

@ -5,7 +5,7 @@ LL | want_y(t);
| ^^^^^^ expected associated type, found i32
...
LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
| ------------------------------ required by `want_y`
| ------ ----- required by this bound in `want_y`
|
= note: expected type `<T as Foo>::Y`
found type `i32`
@ -19,7 +19,7 @@ LL | want_x(t);
| ^^^^^^ expected associated type, found u32
...
LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
| ------------------------------ required by `want_x`
| ------ ----- required by this bound in `want_x`
|
= note: expected type `<T as Foo>::X`
found type `u32`

View File

@ -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<T: Foo>(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<T: Foo>(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`

View File

@ -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<U, T>(_t: T)
LL | | where for<'a> &'a T: Mirror<Image=U>
LL | | {}
| |__- required by `foo`
LL | fn foo<U, T>(_t: T)
| ---
LL | where for<'a> &'a T: Mirror<Image=U>
| ------- 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

View File

@ -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

View File

@ -1,4 +1,6 @@
// edition:2018
// ignore-x86
// ^ due to stderr output differences
async fn print_dur() {}

View File

@ -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

View File

@ -11,7 +11,7 @@ error[E0277]: the trait bound `{float}: Bar` is not satisfied
--> $DIR/type_inference.rs:25:5
|
LL | fn only_bar<T: 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}`

View File

@ -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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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

View File

@ -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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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>(_: 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

View File

@ -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, A>(_: F)
LL | | where F: FnOnce(A, A)
LL | | {
LL | | }
| |_- required by `with_closure`
LL | fn with_closure<F, A>(_: 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

View File

@ -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>(_: 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

View File

@ -1,3 +1,5 @@
// ignore-x86
// ^ due to stderr output differences
use std::thread;
use std::sync::mpsc::channel;

View File

@ -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

View File

@ -19,7 +19,8 @@ trait ImplementedForUnitButNotNever {}
impl ImplementedForUnitButNotNever for () {}
fn foo<T: ImplementedForUnitButNotNever>(_t: T) {}
//~^ NOTE required by `foo`
//~^ NOTE required by this bound in `foo`
//~| NOTE
fn smeg() {
let _x = return;

View File

@ -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: ImplementedForUnitButNotNever>(_t: T) {}
| ----------------------------------------------- required by `foo`
| --- ----------------------------- required by this bound in `foo`
...
LL | foo(_x);
| ^^^ the trait `ImplementedForUnitButNotNever` is not implemented for `!`

View File

@ -1,3 +1,5 @@
// ignore-x86
// ^ due to stderr output differences
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'

View File

@ -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<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
error: aborting due to previous error

View File

@ -1,3 +1,5 @@
// ignore-x86
// ^ due to stderr output differences
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'

View File

@ -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<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
error: aborting due to previous error

View File

@ -1,3 +1,5 @@
// ignore-x86
// ^ due to stderr output differences
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'

View File

@ -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<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
error: aborting due to previous error

View File

@ -1,3 +1,5 @@
// ignore-x86
// ^ due to stderr output differences
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'

View File

@ -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<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
error: aborting due to previous error

View File

@ -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: 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: 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: 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`

View File

@ -2,7 +2,7 @@ error[E0275]: overflow evaluating the requirement `J: std::marker::Send`
--> $DIR/recursion_limit.rs:34:5
|
LL | fn is_send<T:Send>() { }
| -------------------- required by `is_send`
| ------- ---- required by this bound in `is_send`
...
LL | is_send::<A>();
| ^^^^^^^^^^^^

View File

@ -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

View File

@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<i8 as Trait>::AssociatedType == u32`
--> $DIR/E0271.rs:10:5
|
LL | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
| -------------------------------------------------- required by `foo`
| --- ------------------ required by this bound in `foo`
...
LL | foo(3_i8);
| ^^^ expected reference, found u32

View File

@ -2,7 +2,7 @@ error[E0277]: `*const u8` cannot be sent between threads safely
--> $DIR/E0277-2.rs:16:5
|
LL | fn is_send<T: Send>() { }
| --------------------- required by `is_send`
| ------- ---- required by this bound in `is_send`
...
LL | is_send::<Foo>();
| ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely

View File

@ -14,7 +14,7 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
--> $DIR/E0277.rs:17:15
|
LL | fn some_func<T: Foo>(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`

View File

@ -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:Copy>(_: 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`

View File

@ -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<T: ?Sized + Sync>() { }
| ---------------------------------- required by `assert_sync`
| ----------- ---- required by this bound in `assert_sync`
...
LL | assert_sync::<A>();
| ^^^^^^^^^^^^^^^^ `A` cannot be shared between threads safely
| ^ `A` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `A`
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<T: ?Sized + Send>() { }
| ---------------------------------- required by `assert_send`
| ----------- ---- required by this bound in `assert_send`
...
LL | assert_send::<A>();
| ^^^^^^^^^^^^^^^^ `A` cannot be sent between threads safely
| ^ `A` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `A`

View File

@ -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<T>() { }
| -------------------- required by `assert_sized`
| ------------ - required by this bound in `assert_sized`
...
LL | assert_sized::<A>();
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
| ^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `A`
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
@ -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<T>() { }
| -------------------- required by `assert_sized`
| ------------ - required by this bound in `assert_sized`
...
LL | assert_sized::<Foo>();
| ^^^^^^^^^^^^^^^^^^^ 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<T>() { }
| -------------------- required by `assert_sized`
| ------------ - required by this bound in `assert_sized`
...
LL | assert_sized::<Bar<A>>();
| ^^^^^^^^^^^^^^^^^^^^^^ 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<T>() { }
| -------------------- required by `assert_sized`
| ------------ - required by this bound in `assert_sized`
...
LL | assert_sized::<Bar<Bar<A>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time

View File

@ -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>(_: 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}`

View File

@ -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

View File

@ -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: 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: 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

View File

@ -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<F>(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}`

View File

@ -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>(_: T)
LL | | where T: Generator<Yield = T, Return = ()>
LL | | {
LL | | }
| |_- required by `want_cyclic_generator_yield`
LL | pub fn want_cyclic_generator_yield<T>(_: T)
| ---------------------------
LL | where T: Generator<Yield = T, Return = ()>
| --------- 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,

View File

@ -2,7 +2,7 @@ error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/not-send-sync.rs:16:5
|
LL | fn assert_send<T: Send>(_: T) {}
| ----------------------------- required by `main::assert_send`
| ----------- ---- required by this bound in `main::assert_send`
...
LL | assert_send(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely
@ -15,7 +15,7 @@ error[E0277]: `std::cell::Cell<i32>` cannot be shared between threads safely
--> $DIR/not-send-sync.rs:9:5
|
LL | fn assert_sync<T: Sync>(_: T) {}
| ----------------------------- required by `main::assert_sync`
| ----------- ---- required by this bound in `main::assert_sync`
...
LL | assert_sync(|| {
| ^^^^^^^^^^^ `std::cell::Cell<i32>` cannot be shared between threads safely

View File

@ -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: 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 _]`

View File

@ -2,15 +2,12 @@ error: implementation of `Foo` is not general enough
--> $DIR/due-to-where-clause.rs:5:5
|
LL | test::<FooS>(&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

View File

@ -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<T>()
LL | | where T : for<'a,'b> Foo<(&'a isize, &'b isize)>
LL | | {
LL | | }
| |_- required by `want_foo2`
LL | fn want_foo2<T>()
| ---------
LL | where T : for<'a,'b> Foo<(&'a isize, &'b isize)>
| -------------------------------------- required by this bound in `want_foo2`
...
LL | fn b() { want_foo2::<SomeStruct>(); }
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct`
LL | fn b() { want_foo2::<SomeStruct>(); }
| ^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct`
|
= help: the following implementations were found:
<SomeStruct as Foo<(&'a isize, &'a isize)>>

View File

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

View File

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

View File

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

View File

@ -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: &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: &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

View File

@ -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: &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: &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: &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: &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

View File

@ -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<T>()
LL | | where T : for<'a> Foo<&'a isize>
LL | | {
LL | | }
| |_- required by `want_hrtb`
LL | fn want_hrtb<T>()
| ---------
LL | where T : for<'a> Foo<&'a isize>
| ---------------------- required by this bound in `want_hrtb`
...
LL | want_hrtb::<StaticInt>()
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `StaticInt`
LL | want_hrtb::<StaticInt>()
| ^^^^^^^^^ the trait `for<'a> Foo<&'a isize>` is not implemented for `StaticInt`
|
= help: the following implementations were found:
<StaticInt as Foo<&'static isize>>
error[E0277]: the trait bound `for<'a> &'a u32: Foo<&'a isize>` is not satisfied
--> $DIR/hrtb-just-for-static.rs:30:5
--> $DIR/hrtb-just-for-static.rs:30:17
|
LL | / fn want_hrtb<T>()
LL | | where T : for<'a> Foo<&'a isize>
LL | | {
LL | | }
| |_- required by `want_hrtb`
LL | fn want_hrtb<T>()
| ---------
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>>

View File

@ -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<T: Foo>() {}
| ----------------------- required by `assert_foo`
| ---------- --- required by this bound in `assert_foo`
...
LL | assert_foo::<fn(&i32)>();
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `for<'r> fn(&'r i32)`
| ^^^^^^^^ the trait `Foo` is not implemented for `for<'r> fn(&'r i32)`
|
= help: the following implementations were found:
<fn(A) as Foo>

View File

@ -73,7 +73,7 @@ error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads
--> $DIR/auto-trait-leak.rs:15:5
|
LL | fn send<T: Send>(_: T) {}
| ---------------------- required by `send`
| ---- ---- required by this bound in `send`
...
LL | send(cycle2().clone());
| ^^^^ `std::rc::Rc<std::string::String>` cannot be sent between threads safely

View File

@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads
--> $DIR/auto-trait-leak2.rs:13:5
|
LL | fn send<T: Send>(_: T) {}
| ---------------------- required by `send`
| ---- ---- required by this bound in `send`
...
LL | send(before());
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely
@ -15,7 +15,7 @@ error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads
--> $DIR/auto-trait-leak2.rs:16:5
|
LL | fn send<T: Send>(_: T) {}
| ---------------------- required by `send`
| ---- ---- required by this bound in `send`
...
LL | send(after());
| ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely

View File

@ -1,3 +1,5 @@
// ignore-x86
// ^ due to stderr output differences
use std::cell::Cell;
use std::panic::catch_unwind;
fn main() {

View File

@ -1,14 +1,18 @@
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
--> $DIR/interior-mutability.rs:5:5
--> $DIR/interior-mutability.rs:7:5
|
LL | catch_unwind(|| { x.set(23); });
| ^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` 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<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
| ---------- required by this bound in `std::panic::catch_unwind`
|
= help: within `std::cell::Cell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
= note: required because it appears within the type `std::cell::Cell<i32>`
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::Cell<i32>`
= note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:5:18: 5:35 x:&std::cell::Cell<i32>]`
= 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<i32>]`
error: aborting due to previous error

View File

@ -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<T>() where T : Clone { }
| ------------------------------------ required by `assert_clone`
| ------------ ----- required by this bound in `assert_clone`
...
LL | assert_clone::<foo::issue_1920::S>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `foo::issue_1920::S`
| ^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `foo::issue_1920::S`
error: aborting due to previous error

View File

@ -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<T>() where T : Clone { }
| ------------------------------------ required by `assert_clone`
| ------------ ----- required by this bound in `assert_clone`
...
LL | assert_clone::<bar::S>();
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `bar::S`
| ^^^^^^ the trait `std::clone::Clone` is not implemented for `bar::S`
error: aborting due to previous error

View File

@ -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<T>() where T : Clone { }
| ------------------------------------ required by `assert_clone`
| ------------ ----- required by this bound in `assert_clone`
...
LL | assert_clone::<foo::issue_1920::S>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `issue_1920::S`
| ^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `issue_1920::S`
error: aborting due to previous error

View File

@ -1,3 +1,5 @@
// ignore-x86
// ^ due to stderr output differences
struct Bar;
impl Bar {

View File

@ -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<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
--> $DIR/issue-21763.rs:9:5
|
LL | fn foo<T: Send>() {}
| ----------------- required by `foo`
| --- ---- required by this bound in `foo`
...
LL | foo::<HashMap<Rc<()>, Rc<()>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely

View File

@ -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

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `(): InOut<_>` is not satisfied
--> $DIR/issue-25076.rs:10:20
|
LL | fn do_fold<B, F: InOut<B, Out=B>>(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 `()`

View File

@ -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<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
| ------------------------------------------ required by `size_of_copy`
| ------------ ---- required by this bound in `size_of_copy`
...
LL | size_of_copy::<dyn Misc + Copy>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc`

View File

@ -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<X: ::std::marker()::Send>() {} }
| ^^
| ^^^^^^^^
|
= 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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/42238>

View File

@ -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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/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<dyn (::std::marker()::Send)> = 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 <https://github.com/rust-lang/rust/issues/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<dyn Send + ::std::marker()::Sync> = 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 <https://github.com/rust-lang/rust/issues/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 <https://github.com/rust-lang/rust/issues/42238>

View File

@ -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 | <fn() as Fn()>::call;
| ^^ associated type not allowed here
| ^^^^ associated type not allowed here
error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc<Foo>` cannot be sent between threads safely
--> $DIR/issue-40827.rs:14:5
|
LL | fn f<T: Send>(_: T) {}
| ------------------- required by `f`
| - ---- required by this bound in `f`
...
LL | f(Foo(Arc::new(Bar::B(None))));
| ^ `std::rc::Rc<Foo>` cannot be sent between threads safely
@ -16,7 +16,7 @@ error[E0277]: `std::rc::Rc<Foo>` cannot be shared between threads safely
--> $DIR/issue-40827.rs:14:5
|
LL | fn f<T: Send>(_: T) {}
| ------------------- required by `f`
| - ---- required by this bound in `f`
...
LL | f(Foo(Arc::new(Bar::B(None))));
| ^ `std::rc::Rc<Foo>` cannot be shared between threads safely

View File

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

View File

@ -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: F)
LL | | where
LL | | F: Fn(),
LL | | {
LL | | }
| |_- required by `foo`
LL | fn foo<F>(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

View File

@ -1,27 +1,29 @@
error[E0631]: type mismatch in function arguments
--> $DIR/issue-60283.rs:14:13
|
LL | / pub fn foo<T, F>(_: T, _: F)
LL | | where T: for<'a> Trait<'a>,
LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
| |_________________________________________________- required by `foo`
LL | pub fn foo<T, F>(_: T, _: F)
| ---
LL | where T: for<'a> Trait<'a>,
LL | F: for<'a> FnMut(<T as Trait<'a>>::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> <fn(_) {std::mem::drop::<_>} as std::ops::FnOnce<(<() as Trait<'a>>::Item,)>>::Output == ()`
--> $DIR/issue-60283.rs:14:5
|
LL | / pub fn foo<T, F>(_: T, _: F)
LL | | where T: for<'a> Trait<'a>,
LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {}
| |_________________________________________________- required by `foo`
LL | pub fn foo<T, F>(_: T, _: F)
| ---
LL | where T: for<'a> Trait<'a>,
LL | F: for<'a> FnMut(<T as Trait<'a>>::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

View File

@ -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<T: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:
<isize as std::marker::Copy>
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<T: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:
<isize as std::marker::Copy>
error[E0277]: the trait bound `std::boxed::Box<isize>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:31:5
--> $DIR/kindck-copy.rs:31:19
|
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<Box<isize>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<isize>`
| ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<isize>`
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<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<String>();
| ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
| ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
error[E0277]: the trait bound `std::vec::Vec<isize>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:33:5
--> $DIR/kindck-copy.rs:33:19
|
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<Vec<isize> >();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec<isize>`
| ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec<isize>`
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<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<Box<&'a mut isize>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<&'a mut isize>`
| ^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<&'a mut isize>`
error[E0277]: the trait bound `std::boxed::Box<dyn Dummy>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:42:5
|
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy>`
@ -71,37 +71,37 @@ error[E0277]: the trait bound `std::boxed::Box<dyn Dummy + std::marker::Send>: s
--> $DIR/kindck-copy.rs:43:5
|
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<Box<dyn Dummy + Send>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<dyn Dummy + std::marker::Send>`
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<T: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<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<MyNoncopyStruct>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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<isize>: std::marker::Copy` is not satisfied
--> $DIR/kindck-copy.rs:67:5
--> $DIR/kindck-copy.rs:67:19
|
LL | fn assert_copy<T:Copy>() { }
| ------------------------ required by `assert_copy`
| ----------- ---- required by this bound in `assert_copy`
...
LL | assert_copy::<Rc<isize>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc<isize>`
| ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc<isize>`
error: aborting due to 11 previous errors

View File

@ -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<T:Foo>(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}>`

View File

@ -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<T:Foo>(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}>`

View File

@ -2,7 +2,7 @@ error[E0277]: `std::rc::Rc<usize>` cannot be sent between threads safely
--> $DIR/kindck-nonsendable-1.rs:9:5
|
LL | fn bar<F:FnOnce() + Send>(_: F) { }
| ------------------------------- required by `bar`
| --- ---- required by this bound in `bar`
...
LL | bar(move|| foo(x));
| ^^^ `std::rc::Rc<usize>` cannot be sent between threads safely

View File

@ -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<T: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<T:Send>() { }
| ------------------------ required by `assert_send`
| ----------- ---- required by this bound in `assert_send`
...
LL | assert_send::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely

View File

@ -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<T:Send+'static>() { }
| -------------------------------- 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<T:Send+'static>() { }
| -------------------------------- required by `assert_send`
| ----------- ---- required by this bound in `assert_send`
...
LL | assert_send::<Box<dyn Dummy + 'a>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely

View File

@ -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<T:Send+'static>() { }
| -------------------------------- 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<T:Send+'static>() { }
| -------------------------------- required by `assert_send`
| ----------- ---- required by this bound in `assert_send`
...
LL | assert_send::<Box<dyn Dummy + 'a>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely

View File

@ -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<T: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<T:Send>() { }
| ------------------------ required by `assert_send`
| ----------- ---- required by this bound in `assert_send`
...
LL | assert_send::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely

View File

@ -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<T:Send>() { }
| ------------------------ required by `assert_send`
| ----------- ---- required by this bound in `assert_send`
...
LL | assert_send::<Box<*mut u8>>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely

View File

@ -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<T: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`

View File

@ -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<T: Marker>() { }
| ------------------------- required by `is_marker`
| --------- ------ required by this bound in `is_marker`
...
LL | is_marker::<NotDebugOrDisplay>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay`
| ^^^^^^^^^^^^^^^^^ the trait `Marker` is not implemented for `NotDebugOrDisplay`
error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0631]: type mismatch in closure arguments
--> $DIR/E0631.rs:7:5
|
LL | fn foo<F: Fn(usize)>(_: 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: Fn<usize>>(_: 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: Fn(usize)>(_: 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: Fn<usize>>(_: F) {}
| -------------------------- required by `bar`
| --- --------- required by this bound in `bar`
LL | fn main() {
LL | fn f(_: u64) {}
| ------------ found signature of `fn(u64) -> _`

View File

@ -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: Fn<usize>>(_: 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: Fn<usize>>(_: 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, R>(_: F) where F: FnOnce() -> R {}
| ------------------------------------------ required by `call`
| ---- ------------- required by this bound in `call`
LL | struct Foo(u8);
| --------------- takes 1 argument

View File

@ -26,7 +26,7 @@ error[E0631]: type mismatch in function arguments
--> $DIR/closure-arg-type-mismatch.rs:10:9
|
LL | fn baz<F: Fn(*mut &u32)>(_: 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> <fn(*mut &'a u32) as std::ops::Fn
--> $DIR/closure-arg-type-mismatch.rs:10:5
|
LL | fn baz<F: Fn(*mut &u32)>(_: 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

View File

@ -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: Foo>(_: 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: Foo>(_: T) {}
| -------------------- required by `baz`
| --- --- required by this bound in `baz`
...
LL | baz(|_| ());
| ^^^ ------ found signature of `fn(_) -> _`

View File

@ -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, F>(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, F>(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}) -> _`

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