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

create def ids for impl traits during ast lowering #102483

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

spastorino
Copy link
Member

@spastorino spastorino commented Sep 29, 2022

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 29, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2022
compiler/rustc_ast_lowering/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_ast_lowering/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_ast_lowering/src/lib.rs Outdated Show resolved Hide resolved
src/test/ui/impl-trait/nested-return-type2-tait3.rs Outdated Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

@spastorino
Copy link
Member Author

It turned out that this was way simpler to what I was trying to do.

@cjgillot I think it's ready unless there's something outside ui tests that need to be blessed because def_ids ordering/numbers have changed now.

@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor

This looks like a bug in the stable hasher. This branch is only used for item-relative spans (-Zincremental-relative-spans). Using a unwrap_or(DUMMY_SP) is safe: span hashing won't try to make this a relative span.
The better solution would ofc to find a way to modify resolutions(()).source_span.

@rustbot rustbot added the A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) label Sep 30, 2022
@spastorino spastorino changed the title create def ids for impl traits during AST Lowering create def ids for impl traits during ast lowering Sep 30, 2022
@spastorino
Copy link
Member Author

@cjgillot now should be ready

@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 30, 2022

📌 Commit b2bef02 has been approved by cjgillot

It is now in the queue for this repository.

@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 Sep 30, 2022
@spastorino
Copy link
Member Author

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#102361 (Fix ICE in const_trait check code)
 - rust-lang#102373 (Flush delayed bugs before codegen)
 - rust-lang#102483 (create def ids for impl traits during ast lowering)
 - rust-lang#102490 (Generate synthetic region from `impl` even in closure body within an associated fn)
 - rust-lang#102492 (Don't lower assoc bindings just to deny them)
 - rust-lang#102493 (Group together more size assertions.)
 - rust-lang#102521 (rustdoc: add missing margin to no-docblock methods)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 05b9f0e into rust-lang:master Oct 1, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.

6 participants