mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
b2e73e9aad
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 https://github.com/rust-lang/rust/pull/118118 but unrelated to that PR. r? `@compiler-errors` `@lcnr` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |