about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/bounds.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-04 05:54:09 +0000
committerbors <bors@rust-lang.org>2023-05-04 05:54:09 +0000
commit6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c (patch)
treefbb65379db25781d8f39e9086d8b03c37a06b504 /compiler/rustc_hir_analysis/src/bounds.rs
parent129195f57c02c8a8e4cfc4b766d4ff7a3a837882 (diff)
parent689721d3c57253c2e438727350caeaebf46d2336 (diff)
downloadrust-6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c.tar.gz
rust-6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c.zip
Auto merge of #110806 - WaffleLapkin:unmkI, r=lcnr
Replace `tcx.mk_trait_ref` with `TraitRef::new`

First step in implementing https://github.com/rust-lang/compiler-team/issues/616
r? `@lcnr`
Diffstat (limited to 'compiler/rustc_hir_analysis/src/bounds.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/bounds.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/bounds.rs b/compiler/rustc_hir_analysis/src/bounds.rs
index 7156fea8f89..686066abbf0 100644
--- a/compiler/rustc_hir_analysis/src/bounds.rs
+++ b/compiler/rustc_hir_analysis/src/bounds.rs
@@ -63,7 +63,7 @@ impl<'tcx> Bounds<'tcx> {
 
     pub fn push_sized(&mut self, tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, span: Span) {
         let sized_def_id = tcx.require_lang_item(LangItem::Sized, Some(span));
-        let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(sized_def_id, [ty]));
+        let trait_ref = ty::TraitRef::new(tcx, sized_def_id, [ty]);
         // Preferable to put this obligation first, since we report better errors for sized ambiguity.
         self.predicates.insert(0, (trait_ref.without_const().to_predicate(tcx), span));
     }