diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-11-17 11:21:39 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-11-21 20:31:59 +0000 |
| commit | 6f77c97b386f05083f039f0130146addf99eefd9 (patch) | |
| tree | 4bebb22479b94e1134ee458f5f45efaea839ca26 /compiler/rustc_hir_analysis/src/bounds.rs | |
| parent | d9a02b0fb728ac994883845b1c53630c2dec4657 (diff) | |
| download | rust-6f77c97b386f05083f039f0130146addf99eefd9.tar.gz rust-6f77c97b386f05083f039f0130146addf99eefd9.zip | |
Assert that various types have the right amount of generic args and fix the sites that used the wrong amount
Diffstat (limited to 'compiler/rustc_hir_analysis/src/bounds.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/bounds.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/bounds.rs b/compiler/rustc_hir_analysis/src/bounds.rs index 6a28bb16a20..9944114f495 100644 --- a/compiler/rustc_hir_analysis/src/bounds.rs +++ b/compiler/rustc_hir_analysis/src/bounds.rs @@ -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) }) }); |
