Assert that various types have the right amount of generic args and fix the sites that used the wrong amount
This commit is contained in:
parent
d9a02b0fb7
commit
6f77c97b38
27 changed files with 153 additions and 144 deletions
|
@ -61,10 +61,7 @@ impl<'tcx> Bounds<'tcx> {
|
|||
// If it could be sized, and is, add the `Sized` predicate.
|
||||
let sized_predicate = self.implicitly_sized.and_then(|span| {
|
||||
tcx.lang_items().sized_trait().map(move |sized| {
|
||||
let trait_ref = ty::Binder::dummy(ty::TraitRef {
|
||||
def_id: sized,
|
||||
substs: tcx.mk_substs_trait(param_ty, &[]),
|
||||
});
|
||||
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(sized, param_ty, &[]));
|
||||
(trait_ref.without_const().to_predicate(tcx), span)
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue