diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-26 11:48:17 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-04-26 11:48:17 +0000 |
| commit | 1b8c7784e58de489331dd8957a889916a0dcbee3 (patch) | |
| tree | 17771a54655cbbf234a6f8600c73a931518da1ac /compiler/rustc_hir_analysis/src/bounds.rs | |
| parent | 4f2532fb531919478b2655925cacb614d8c9f569 (diff) | |
| download | rust-1b8c7784e58de489331dd8957a889916a0dcbee3.tar.gz rust-1b8c7784e58de489331dd8957a889916a0dcbee3.zip | |
Add new `ToPredicate` impls and `TraitRef` methods to remove some `ty::Binber::dummy` calls
Diffstat (limited to 'compiler/rustc_hir_analysis/src/bounds.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/bounds.rs | 2 |
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 a751639b56f..f25eaa78504 100644 --- a/compiler/rustc_hir_analysis/src/bounds.rs +++ b/compiler/rustc_hir_analysis/src/bounds.rs @@ -57,7 +57,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(ty::TraitRef::new(tcx, 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)); } |
