diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-06 12:21:00 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-07 11:28:01 -0400 |
| commit | 90423a7abbddd98b6fbb22e9780991c736b51ca4 (patch) | |
| tree | ba3f3def980d7945f75b3b1192099a6b7fa49b03 /compiler/rustc_middle/src/ty/sty.rs | |
| parent | 58aad3c72c32936b49f92f552e0157b9c8c862ee (diff) | |
| download | rust-90423a7abbddd98b6fbb22e9780991c736b51ca4.tar.gz rust-90423a7abbddd98b6fbb22e9780991c736b51ca4.zip | |
Uplift elaboration
Diffstat (limited to 'compiler/rustc_middle/src/ty/sty.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 52690ae678d..d2b444a066b 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -811,6 +811,14 @@ impl<'tcx> rustc_type_ir::inherent::Ty<TyCtxt<'tcx>> for Ty<'tcx> { Ty::new_var(tcx, vid) } + fn new_param(tcx: TyCtxt<'tcx>, param: ty::ParamTy) -> Self { + Ty::new_param(tcx, param.index, param.name) + } + + fn new_placeholder(tcx: TyCtxt<'tcx>, placeholder: ty::PlaceholderType) -> Self { + Ty::new_placeholder(tcx, placeholder) + } + fn new_bound(interner: TyCtxt<'tcx>, debruijn: ty::DebruijnIndex, var: ty::BoundTy) -> Self { Ty::new_bound(interner, debruijn, var) } |
