summaryrefslogtreecommitdiff
path: root/compiler/rustc_ty_utils
diff options
context:
space:
mode:
authorKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-05-09 16:02:52 -0600
committerKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-05-09 16:22:50 -0600
commit26dc139b3702e7d3d2ea9dd0915da1d307f55011 (patch)
tree254b503b0ab0af7aa005b991c8e5e9abc87a05f6 /compiler/rustc_ty_utils
parent3a37c2f0523c87147b64f1b8099fc9df22e8c53e (diff)
downloadrust-26dc139b3702e7d3d2ea9dd0915da1d307f55011.tar.gz
add EarlyBinder to thir_abstract_const; remove tcx.bound_abstract_const
Diffstat (limited to 'compiler/rustc_ty_utils')
-rw-r--r--compiler/rustc_ty_utils/src/consts.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs
index b08a92570ed..3dd1d056be2 100644
--- a/compiler/rustc_ty_utils/src/consts.rs
+++ b/compiler/rustc_ty_utils/src/consts.rs
@@ -394,7 +394,7 @@ impl<'a, 'tcx> visit::Visitor<'a, 'tcx> for IsThirPolymorphic<'a, 'tcx> {
pub fn thir_abstract_const(
tcx: TyCtxt<'_>,
def: LocalDefId,
-) -> Result<Option<ty::Const<'_>>, ErrorGuaranteed> {
+) -> Result<Option<ty::EarlyBinder<ty::Const<'_>>>, ErrorGuaranteed> {
if !tcx.features().generic_const_exprs {
return Ok(None);
}
@@ -420,7 +420,7 @@ pub fn thir_abstract_const(
let root_span = body.exprs[body_id].span;
- Some(recurse_build(tcx, body, body_id, root_span)).transpose()
+ Ok(Some(ty::EarlyBinder(recurse_build(tcx, body, body_id, root_span)?)))
}
pub fn provide(providers: &mut ty::query::Providers) {