1
Fork 0

add EarlyBinder to thir_abstract_const; remove tcx.bound_abstract_const

This commit is contained in:
Kyle Matsuda 2023-05-09 16:02:52 -06:00
parent 3a37c2f052
commit 26dc139b37
6 changed files with 10 additions and 16 deletions

View file

@ -82,9 +82,10 @@ impl EraseType for Result<Option<ty::Instance<'_>>, rustc_errors::ErrorGuarantee
[u8; size_of::<Result<Option<ty::Instance<'static>>, rustc_errors::ErrorGuaranteed>>()];
}
impl EraseType for Result<Option<ty::Const<'_>>, rustc_errors::ErrorGuaranteed> {
type Result =
[u8; size_of::<Result<Option<ty::Const<'static>>, rustc_errors::ErrorGuaranteed>>()];
impl EraseType for Result<Option<ty::EarlyBinder<ty::Const<'_>>>, rustc_errors::ErrorGuaranteed> {
type Result = [u8; size_of::<
Result<Option<ty::EarlyBinder<ty::Const<'static>>>, rustc_errors::ErrorGuaranteed>,
>()];
}
impl EraseType for Result<ty::GenericArg<'_>, traits::query::NoSolution> {

View file

@ -402,7 +402,7 @@ rustc_queries! {
/// Try to build an abstract representation of the given constant.
query thir_abstract_const(
key: DefId
) -> Result<Option<ty::Const<'tcx>>, ErrorGuaranteed> {
) -> Result<Option<ty::EarlyBinder<ty::Const<'tcx>>>, ErrorGuaranteed> {
desc {
|tcx| "building an abstract representation for `{}`", tcx.def_path_str(key),
}