Skip to content

Commit 9d23e12

Browse files
committed
Auto merge of #118261 - spastorino:fix-placeholder-replacer, r=compiler-errors
Make PlaceholderReplacer shallow_resolver and recur when infer vars This makes resolve type and const infer vars resolve. Given: ```rust #![feature(inherent_associated_types)] #![allow(incomplete_features)] struct Foo<T>(T); impl<'a> Foo<fn(&'a ())> { type Assoc = &'a (); } fn bar(_: for<'a> fn(Foo<fn(Foo<fn(&'static ())>::Assoc)>::Assoc)) {} fn main() {} ``` We should normalize `for<'a> fn(Foo<fn(Foo<fn(&'static ())>::Assoc)>::Assoc)` to `for<'0> fn(&'1 ())` with `'1 == '0` and `'0 == 'static` constraints. We have to resolve `'1` to `'static` in the infcx associated to `PlaceholderReplacer`. This is part of rust-lang/rust#118118 but unrelated to that PR. r? `@compiler-errors` `@lcnr`
2 parents a34e2d7 + 2e94f97 commit 9d23e12

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)