-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rename ty_def_id
so people will stop using it by accident
#134265
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rustbot
added
A-query-system
Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)
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
Dec 13, 2024
HIR ty lowering was modified cc @fmease Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
compiler-errors
commented
Dec 13, 2024
@@ -44,7 +44,6 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>, a | |||
if name == "filter_map" | |||
&& let hir::ExprKind::Call(expr, args) = body.value.kind | |||
&& is_res_lang_ctor(cx, path_res(cx, expr), OptionSome) | |||
&& arg_id.ty_def_id() == args[0].hir_id().ty_def_id() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HirId
's Key
impl just always returns None
. So this was always None == None
.
r=me with failures fixed |
This comment has been minimized.
This comment has been minimized.
compiler-errors
force-pushed
the
ty_def_id
branch
from
December 13, 2024 16:36
9883ea3
to
efb66e7
Compare
@bors r=oli-obk |
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
Dec 13, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Dec 13, 2024
Rename `ty_def_id` so people will stop using it by accident This function is just for cycle detection, but people keep using it because they think it's the right way of getting the def id from a `Ty` (and I can't blame them necessarily).
This was referenced Dec 13, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 14, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#134252 (Fix `Path::is_absolute` on Hermit) - rust-lang#134254 (Fix building `std` for Hermit after `c_char` change) - rust-lang#134255 (Update includes in `/library/core/src/error.rs`.) - rust-lang#134261 (Document the symbol Visibility enum) - rust-lang#134262 (Arbitrary self types v2: adjust diagnostic.) - rust-lang#134265 (Rename `ty_def_id` so people will stop using it by accident) - rust-lang#134271 (Arbitrary self types v2: better feature gate test) - rust-lang#134274 (Add check-pass test for `&raw`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 14, 2024
Rollup merge of rust-lang#134265 - compiler-errors:ty_def_id, r=oli-obk Rename `ty_def_id` so people will stop using it by accident This function is just for cycle detection, but people keep using it because they think it's the right way of getting the def id from a `Ty` (and I can't blame them necessarily).
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Dec 15, 2024
Rename `ty_def_id` so people will stop using it by accident This function is just for cycle detection, but people keep using it because they think it's the right way of getting the def id from a `Ty` (and I can't blame them necessarily).
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Dec 15, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#134252 (Fix `Path::is_absolute` on Hermit) - rust-lang#134254 (Fix building `std` for Hermit after `c_char` change) - rust-lang#134255 (Update includes in `/library/core/src/error.rs`.) - rust-lang#134261 (Document the symbol Visibility enum) - rust-lang#134262 (Arbitrary self types v2: adjust diagnostic.) - rust-lang#134265 (Rename `ty_def_id` so people will stop using it by accident) - rust-lang#134271 (Arbitrary self types v2: better feature gate test) - rust-lang#134274 (Add check-pass test for `&raw`) r? `@ghost` `@rustbot` modify labels: rollup
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This function is just for cycle detection, but people keep using it because they think it's the right way of getting the def id from a
Ty
(and I can't blame them necessarily).