1

Make PlaceholderReplacer shallow_resolver and recur when infer vars by spastorin...

 9 months ago
source link: https://github.com/rust-lang/rust/pull/118261
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Member

This makes resolve type and const infer vars resolve.

Given:

#![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 #118118 but unrelated to that PR.

r? @compiler-errors @lcnr

rustbot

added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Nov 24, 2023

r=me with perf run

Member

Author

This comment has been minimized.

rustbot

added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

Nov 24, 2023

Contributor

⌛ Trying commit f57e184 with merge 5567761...

Contributor

☀️ Try build successful - checks-actions
Build commit: 5567761 (5567761f5b540b701b717b47271aadf924861f81)

This comment has been minimized.

Collaborator

Finished benchmarking commit (5567761): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 676.964s -> 673.318s (-0.54%)
Artifact size: 313.51 MiB -> 313.49 MiB (-0.01%)

rustbot

removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

Nov 25, 2023

Member

Author

@bors r=compiler-errors

Contributor

📌 Commit f57e184 has been approved by compiler-errors

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Nov 25, 2023

Contributor

⌛ Testing commit f57e184 with merge b2e73e9...

Contributor

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing b2e73e9 to master...

bors

added the merged-by-bors This PR was explicitly merged by bors label

Nov 25, 2023

bors

merged commit b2e73e9 into

rust-lang:master

Nov 25, 2023

12 checks passed

Collaborator

Finished benchmarking commit (b2e73e9): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

Cycles

Results

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 673.904s -> 673.908s (0.00%)
Artifact size: 313.23 MiB -> 313.32 MiB (0.03%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Back to tour

No reviews

Labels
merged-by-bors This PR was explicitly merged by bors S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects

None yet

Milestone

1.76.0

Development

Successfully merging this pull request may close these issues.

None yet

5 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK