Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some subst cleanup #96854

Merged
merged 2 commits into from
May 9, 2022
Merged

Some subst cleanup #96854

merged 2 commits into from
May 9, 2022

Conversation

jackh726
Copy link
Member

@jackh726 jackh726 commented May 9, 2022

Two separate things here. Both changes are useful for some refactoring I'm doing to add an "EarlyBinder" newtype. (Part of chalkification).

  1. Remove subst_spanned and just use subst. It wasn't used much anyways. In practice, I think we can probably get most of the info just from the actual error message. If not, outputting logs should do the trick. (The specific line probably wouldn't help much anyways).

  2. Call .subst() before replace_bound_vars_with_fresh_vars and erase_late_bound_regions in three places that do the opposite. I think there might have been some time in the past that the order here matter for something, but this shouldn't be the case anymore. Conceptually, it makes more sense to the of the early bound vars on fns as "outside" the late bound vars.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 9, 2022
@rust-highfive
Copy link
Collaborator

r? @compiler-errors

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 9, 2022
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 9, 2022

📌 Commit 657499d has been approved by compiler-errors

@bors 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 May 9, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#95483 (Improve floating point documentation)
 - rust-lang#96008 (Warn on unused `#[doc(hidden)]` attributes on trait impl items)
 - rust-lang#96841 (Revert "Implement [OsStr]::join", which was merged without FCP.)
 - rust-lang#96844 (Actually fix ICE from rust-lang#96583)
 - rust-lang#96854 (Some subst cleanup)
 - rust-lang#96858 (Remove unused param from search.js::checkPath)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0e00ed5 into rust-lang:master May 9, 2022
@rustbot rustbot added this to the 1.62.0 milestone May 9, 2022
@jackh726 jackh726 deleted the subst-cleanup branch May 9, 2022 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Development

Successfully merging this pull request may close these issues.

5 participants