1
Fork 0

Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino

Address some `EarlyBinder` nits
This commit is contained in:
bors 2022-12-19 19:21:35 +00:00
commit 935dc07218
5 changed files with 27 additions and 45 deletions

View file

@ -3,6 +3,7 @@
use crate::middle::codegen_fn_attrs::CodegenFnAttrFlags;
use crate::mir;
use crate::ty::layout::IntegerExt;
use crate::ty::query::TyCtxtAt;
use crate::ty::{
self, DefIdTree, FallibleTypeFolder, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable,
TypeVisitable,
@ -769,6 +770,12 @@ impl<'tcx> TyCtxt<'tcx> {
}
}
impl<'tcx> TyCtxtAt<'tcx> {
pub fn bound_type_of(self, def_id: DefId) -> ty::EarlyBinder<Ty<'tcx>> {
ty::EarlyBinder(self.type_of(def_id))
}
}
struct OpaqueTypeExpander<'tcx> {
// Contains the DefIds of the opaque types that are currently being
// expanded. When we expand an opaque type we insert the DefId of