about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/from_u.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-25 05:10:10 +0000
committerbors <bors@rust-lang.org>2023-11-25 05:10:10 +0000
commitb2e73e9aadcc57c7119b5cc14f708100ccb6d3e2 (patch)
treef8fc5ad9f7ac6daf723720f7c862197376fd3de2 /tests/rustdoc-js-std/from_u.js
parent34c5ab9aac327a8a18e18ea37a2468a320d82fb0 (diff)
parentf57e1843f3596f842e6b0c594566f3326f008083 (diff)
downloadrust-b2e73e9aadcc57c7119b5cc14f708100ccb6d3e2.tar.gz
rust-b2e73e9aadcc57c7119b5cc14f708100ccb6d3e2.zip
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 https://github.com/rust-lang/rust/pull/118118 but unrelated to that PR.

r? `@compiler-errors` `@lcnr`
Diffstat (limited to 'tests/rustdoc-js-std/from_u.js')
0 files changed, 0 insertions, 0 deletions