diff options
| author | lcnr <rust@lcnr.de> | 2025-04-01 23:48:41 +0200 | 
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-04-03 11:13:10 +0200 | 
| commit | 509a144eed84e6ccd1227cd0d90f877a774aae70 (patch) | |
| tree | 1f8df82dd01f7ae1085129d79d2144e5d00746ee /compiler/rustc_pattern_analysis/src/rustc.rs | |
| parent | 990201cb78a77ec0c148a880e6ab46bafa3468df (diff) | |
| download | rust-509a144eed84e6ccd1227cd0d90f877a774aae70.tar.gz rust-509a144eed84e6ccd1227cd0d90f877a774aae70.zip | |
add `TypingMode::Borrowck`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/rustc.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/rustc.rs | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs index a25a80cd45f..31c4ee0fa0b 100644 --- a/compiler/rustc_pattern_analysis/src/rustc.rs +++ b/compiler/rustc_pattern_analysis/src/rustc.rs @@ -135,7 +135,10 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> { /// Returns the hidden type corresponding to this key if the body under analysis is allowed to /// know it. fn reveal_opaque_key(&self, key: OpaqueTypeKey<'tcx>) -> Option<Ty<'tcx>> { - self.typeck_results.concrete_opaque_types.get(&key).map(|x| x.ty) + self.typeck_results + .concrete_opaque_types + .get(&key.def_id) + .map(|x| ty::EarlyBinder::bind(x.ty).instantiate(self.tcx, key.args)) } // This can take a non-revealed `Ty` because it reveals opaques itself. pub fn is_uninhabited(&self, ty: Ty<'tcx>) -> bool { | 
