Rollup merge of #91625 - est31:remove_indexes, r=oli-obk
Remove redundant [..]s
This commit is contained in:
commit
40988591ec
45 changed files with 123 additions and 127 deletions
|
@ -1350,7 +1350,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
tcx,
|
||||
span,
|
||||
item.trait_ref().def_id(),
|
||||
&object_safety_violations[..],
|
||||
&object_safety_violations,
|
||||
)
|
||||
.emit();
|
||||
return tcx.ty_error();
|
||||
|
|
|
@ -496,7 +496,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
call_expr.span,
|
||||
call_expr,
|
||||
fn_sig.inputs(),
|
||||
&expected_arg_tys[..],
|
||||
&expected_arg_tys,
|
||||
arg_exprs,
|
||||
fn_sig.c_variadic,
|
||||
TupleArgumentsFlag::DontTupleArguments,
|
||||
|
|
|
@ -1436,7 +1436,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
<dyn AstConv<'_>>::create_substs_for_generic_args(
|
||||
tcx,
|
||||
def_id,
|
||||
&[][..],
|
||||
&[],
|
||||
has_self,
|
||||
self_ty,
|
||||
&arg_count,
|
||||
|
|
|
@ -54,13 +54,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
|
||||
let err_inputs = match tuple_arguments {
|
||||
DontTupleArguments => err_inputs,
|
||||
TupleArguments => vec![self.tcx.intern_tup(&err_inputs[..])],
|
||||
TupleArguments => vec![self.tcx.intern_tup(&err_inputs)],
|
||||
};
|
||||
|
||||
self.check_argument_types(
|
||||
sp,
|
||||
expr,
|
||||
&err_inputs[..],
|
||||
&err_inputs,
|
||||
&[],
|
||||
args_no_rcvr,
|
||||
false,
|
||||
|
@ -324,7 +324,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
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[..],
|
||||
&final_arg_types,
|
||||
expr,
|
||||
sp,
|
||||
&args,
|
||||
|
|
|
@ -1372,7 +1372,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
|
|||
|
||||
if applicable_candidates.len() > 1 {
|
||||
if let Some(pick) =
|
||||
self.collapse_candidates_to_trait_pick(self_ty, &applicable_candidates[..])
|
||||
self.collapse_candidates_to_trait_pick(self_ty, &applicable_candidates)
|
||||
{
|
||||
return Some(Ok(pick));
|
||||
}
|
||||
|
|
|
@ -1344,7 +1344,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
if candidates.len() > limit {
|
||||
msg.push_str(&format!("\nand {} others", candidates.len() - limit));
|
||||
}
|
||||
err.note(&msg[..]);
|
||||
err.note(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2998,9 +2998,9 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
|
|||
)
|
||||
.emit();
|
||||
InlineAttr::None
|
||||
} else if list_contains_name(&items[..], sym::always) {
|
||||
} else if list_contains_name(&items, sym::always) {
|
||||
InlineAttr::Always
|
||||
} else if list_contains_name(&items[..], sym::never) {
|
||||
} else if list_contains_name(&items, sym::never) {
|
||||
InlineAttr::Never
|
||||
} else {
|
||||
struct_span_err!(
|
||||
|
@ -3034,9 +3034,9 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, id: DefId) -> CodegenFnAttrs {
|
|||
if items.len() != 1 {
|
||||
err(attr.span, "expected one argument");
|
||||
OptimizeAttr::None
|
||||
} else if list_contains_name(&items[..], sym::size) {
|
||||
} else if list_contains_name(&items, sym::size) {
|
||||
OptimizeAttr::Size
|
||||
} else if list_contains_name(&items[..], sym::speed) {
|
||||
} else if list_contains_name(&items, sym::speed) {
|
||||
OptimizeAttr::Speed
|
||||
} else {
|
||||
err(items[0].span(), "invalid argument");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue