Use List::empty()
instead of mk_substs(&[])
.
This commit is contained in:
parent
c09f5b6a6b
commit
08f28f9447
5 changed files with 8 additions and 8 deletions
|
@ -677,21 +677,21 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
|
|||
return;
|
||||
}
|
||||
let def = cx.tcx.adt_def(item.owner_id);
|
||||
(def, cx.tcx.mk_adt(def, cx.tcx.mk_substs(&[])))
|
||||
(def, cx.tcx.mk_adt(def, ty::List::empty()))
|
||||
}
|
||||
hir::ItemKind::Union(_, ref ast_generics) => {
|
||||
if !ast_generics.params.is_empty() {
|
||||
return;
|
||||
}
|
||||
let def = cx.tcx.adt_def(item.owner_id);
|
||||
(def, cx.tcx.mk_adt(def, cx.tcx.mk_substs(&[])))
|
||||
(def, cx.tcx.mk_adt(def, ty::List::empty()))
|
||||
}
|
||||
hir::ItemKind::Enum(_, ref ast_generics) => {
|
||||
if !ast_generics.params.is_empty() {
|
||||
return;
|
||||
}
|
||||
let def = cx.tcx.adt_def(item.owner_id);
|
||||
(def, cx.tcx.mk_adt(def, cx.tcx.mk_substs(&[])))
|
||||
(def, cx.tcx.mk_adt(def, ty::List::empty()))
|
||||
}
|
||||
_ => return,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue