Skip to content

rustc_middle: Document which exactly DefIds don't have DefKinds #109778

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

petrochenkov
Copy link
Contributor

I don't currently have time to investigate when and how to create these missing HIR nodes, but if someone else could do that it would be great.

@rustbot
Copy link
Collaborator

rustbot commented Mar 30, 2023

r? @lcnr

(rustbot has picked a reviewer for you, use r? to override)

@rustbot 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 Mar 30, 2023
@lcnr
Copy link
Contributor

lcnr commented Mar 31, 2023

r? @cjgillot maybe

@rustbot rustbot assigned cjgillot and unassigned lcnr Mar 31, 2023
@cjgillot
Copy link
Contributor

I'm not convinced this is the right direction. I'd suggest the opposite: all LocalDefIds must have a DefKind, and ICEing otherwise. DefKind is one of the primary ways to examine a DefId in many places. If a LocalDefId is missing HIR, the responsible code must provide it with a DefKind some other way.

@petrochenkov
Copy link
Contributor Author

@cjgillot

all LocalDefIds must have a DefKind, and ICEing otherwise ... If a LocalDefId is missing HIR, the responsible code must provide it with a DefKind some other way.

But that's exactly what my FIXME comment says.
And I added ICEs for all cases except the one with anon consts that I'm not going to fix right now.

@cjgillot
Copy link
Contributor

Indeed, I need to re-learn how to read...
@bors r+

@bors
Copy link
Collaborator

bors commented Apr 10, 2023

📌 Commit 2e21b54 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 Apr 10, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 10, 2023
rustc_middle: Document which exactly `DefId`s don't have `DefKind`s

I don't currently have time to investigate when and how to create these missing HIR nodes, but if someone else could do that it would be great.
@bors
Copy link
Collaborator

bors commented Apr 11, 2023

⌛ Testing commit 2e21b54 with merge 5ca6e98...

@bors
Copy link
Collaborator

bors commented Apr 11, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 5ca6e98 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Apr 11, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 5ca6e98 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 11, 2023
@bors bors merged commit 5ca6e98 into rust-lang:master Apr 11, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5ca6e98): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
3.0% [2.0%, 4.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.7% [0.5%, 1.1%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.5%, 1.1%] 3

@petrochenkov petrochenkov deleted the allkind branch February 22, 2025 18:43
# for free to join this conversation on GitHub. Already have an account? # to comment
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
Development

Successfully merging this pull request may close these issues.

6 participants