mirror of
https://github.com/rust-lang/rust
synced 2024-10-18 22:43:56 +00:00
Only register hidden types for opaque types from the current crate, nothing else would work anyway.
This commit is contained in:
parent
0b863e0024
commit
d6b93eb793
|
@ -101,7 +101,7 @@ pub fn handle_opaque_type(
|
|||
}
|
||||
let (a, b) = if a_is_expected { (a, b) } else { (b, a) };
|
||||
let process = |a: Ty<'tcx>, b: Ty<'tcx>| match *a.kind() {
|
||||
ty::Opaque(def_id, substs) => {
|
||||
ty::Opaque(def_id, substs) if def_id.is_local() => {
|
||||
let origin = if self.defining_use_anchor.is_some() {
|
||||
// Check that this is `impl Trait` type is
|
||||
// declared by `parent_def_id` -- i.e., one whose
|
||||
|
|
|
@ -1105,6 +1105,7 @@ pub fn is_empty(&self) -> bool {
|
|||
Lift
|
||||
)]
|
||||
pub struct OpaqueTypeKey<'tcx> {
|
||||
// FIXME(oli-obk): make this a LocalDefId
|
||||
pub def_id: DefId,
|
||||
pub substs: SubstsRef<'tcx>,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue