Make impl_trait_ref into a query also returning more information about the impl
This commit is contained in:
@@ -177,8 +177,9 @@ impl EraseType for Option<mir::DestructuredConstant<'_>> {
|
||||
type Result = [u8; size_of::<Option<mir::DestructuredConstant<'static>>>()];
|
||||
}
|
||||
|
||||
impl EraseType for Option<ty::EarlyBinder<ty::TraitRef<'_>>> {
|
||||
type Result = [u8; size_of::<Option<ty::EarlyBinder<ty::TraitRef<'static>>>>()];
|
||||
impl EraseType for Option<(ty::EarlyBinder<ty::TraitRef<'_>>, ty::ImplPolarity)> {
|
||||
type Result =
|
||||
[u8; size_of::<Option<(ty::EarlyBinder<ty::TraitRef<'static>>, ty::ImplPolarity)>>()];
|
||||
}
|
||||
|
||||
impl EraseType for Option<ty::EarlyBinder<Ty<'_>>> {
|
||||
|
||||
@@ -846,9 +846,9 @@ rustc_queries! {
|
||||
cache_on_disk_if { true }
|
||||
}
|
||||
|
||||
/// Given an `impl_id`, return the trait it implements.
|
||||
/// Given an `impl_id`, return the trait it implements along with some header information.
|
||||
/// Return `None` if this is an inherent impl.
|
||||
query impl_trait_ref(impl_id: DefId) -> Option<ty::EarlyBinder<ty::TraitRef<'tcx>>> {
|
||||
query impl_trait_header(impl_id: DefId) -> Option<(ty::EarlyBinder<ty::TraitRef<'tcx>>, ty::ImplPolarity)> {
|
||||
desc { |tcx| "computing trait implemented by `{}`", tcx.def_path_str(impl_id) }
|
||||
cache_on_disk_if { impl_id.is_local() }
|
||||
separate_provide_extern
|
||||
|
||||
Reference in New Issue
Block a user