Skip to content

Commit 000f7bd

Browse files
Structurally resolve in probe_adt
1 parent 8fa8f40 commit 000f7bd

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> {
307307
ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _)
308308
if !ty.has_escaping_bound_vars() =>
309309
{
310-
self.normalize(span, ty).ty_adt_def()
310+
self.structurally_resolve_type(span, ty).ty_adt_def()
311311
}
312312
_ => None,
313313
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//@ check-pass
2+
//@ compile-flags: -Znext-solver
3+
4+
trait Mirror {
5+
type Assoc;
6+
}
7+
impl<T> Mirror for T {
8+
type Assoc = T;
9+
}
10+
11+
type Foo<T> = <Option<T> as Mirror>::Assoc;
12+
13+
fn main() {
14+
let x = Foo::<i32>::None;
15+
}

0 commit comments

Comments
 (0)