Skip to content

Commit

Permalink
Structurally resolve in probe_adt
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Dec 2, 2024
1 parent d49be02 commit a8df969
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> {
ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _)
if !ty.has_escaping_bound_vars() =>
{
self.normalize(span, ty).ty_adt_def()
self.try_structurally_resolve_type(span, ty).ty_adt_def()
}
_ => None,
}
Expand Down
15 changes: 0 additions & 15 deletions tests/crashes/132320.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//@ check-pass
//@ compile-flags: -Znext-solver

trait Mirror {
type Assoc;
}
impl<T> Mirror for T {
type Assoc = T;
}

type Foo<T> = <Option<T> as Mirror>::Assoc;

fn main() {
let x = Foo::<i32>::None;
}

0 comments on commit a8df969

Please sign in to comment.