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

remove inline const deadcode in typeck #110893

Merged
merged 1 commit into from
Apr 28, 2023
Merged

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Apr 27, 2023

inline consts get typeck'd with their parent so this is not reachable

@rustbot
Copy link
Collaborator

rustbot commented Apr 27, 2023

r? @petrochenkov

(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 Apr 27, 2023
@BoxyUwU
Copy link
Member Author

BoxyUwU commented Apr 27, 2023

r? @nbdd0121

@rustbot
Copy link
Collaborator

rustbot commented Apr 27, 2023

Failed to set assignee to nbdd0121: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

@BoxyUwU
Copy link
Member Author

BoxyUwU commented Apr 27, 2023

oh

@nbdd0121
Copy link
Contributor

The code indeed looks unreachable to me.

I don't recall writing these lines. though. git blame shows that these are introduced in #103310, but that PR just seems to be doing the refactoring?

r? @lcnr anyway

@rustbot rustbot assigned lcnr and unassigned petrochenkov Apr 27, 2023
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 27, 2023

📌 Commit bdb956e has been approved by compiler-errors

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 27, 2023
@@ -221,12 +221,6 @@ fn typeck_with_fallback<'tcx>(
}))
} else if let Node::AnonConst(_) = node {
match tcx.hir().get(tcx.hir().parent_id(id)) {
Node::Expr(&hir::Expr {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to assert that we're only calling typeck_with_fallback on things that aren't typeck children, just in case someone messes with that typeck_root_def_id != def_id branch above, but whatever

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#109702 (configure --set support list as arguments)
 - rust-lang#110620 (Document `const {}` syntax for `std::thread_local`.)
 - rust-lang#110721 (format panic message only once)
 - rust-lang#110881 (refactor(docs): remove macro resolution fallback)
 - rust-lang#110893 (remove inline const deadcode in typeck)
 - rust-lang#110898 (Remove unused std::sys_common::thread_local_key::Key)
 - rust-lang#110909 (Skip `rustc` version detection on macOS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c464be9 into rust-lang:master Apr 28, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 28, 2023
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.

7 participants