eplace usages of vec![].into_iter with [].into_iter
This commit is contained in:
parent
23ce5fc465
commit
08829853d3
36 changed files with 116 additions and 122 deletions
|
@ -1667,10 +1667,10 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
|
|||
],
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
let sugg = vec![sp, cause.span]
|
||||
let sugg = [sp, cause.span]
|
||||
.into_iter()
|
||||
.flat_map(|sp| {
|
||||
vec![
|
||||
[
|
||||
(sp.shrink_to_lo(), "Box::new(".to_string()),
|
||||
(sp.shrink_to_hi(), ")".to_string()),
|
||||
]
|
||||
|
|
|
@ -86,7 +86,7 @@ pub fn determine_parameters_to_be_inferred<'a, 'tcx>(
|
|||
|
||||
fn lang_items(tcx: TyCtxt<'_>) -> Vec<(hir::HirId, Vec<ty::Variance>)> {
|
||||
let lang_items = tcx.lang_items();
|
||||
let all = vec![
|
||||
let all = [
|
||||
(lang_items.phantom_data(), vec![ty::Covariant]),
|
||||
(lang_items.unsafe_cell_type(), vec![ty::Invariant]),
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue