-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 redundant logic #120987
remove redundant logic #120987
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use r? to explicitly pick a reviewer |
Made redundant in 3f697b8
&& self | ||
.tcx | ||
.at(span) | ||
.type_of(*def_id) | ||
.instantiate_identity() | ||
!= rcvr_ty |
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.
@compiler-errors you updated this 3f697b8, but I'm not sure changing the use of actual
to rcvr_ty
is correct here. My read of the comment above suggests we explicitly wanted to compare the type before and after resolve_vars_if_possible
.
Am I misreading this?
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.
I don't believe it makes sense to compare before rcvr_ty
has been resolved, so it makes sense to remove this branch. At least according to that commit, it was not actually ever being exercised either?
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.
Looks like this has been essentially unchanged since it was added in #84221 which didn't add a test that covers the Box<Self>
case the comment talks about.
I don't have an objection to removing the check, just thought I'd flag it as a bit suspicious 🙂
@bors r+ |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#120696 (Properly handle `async` block and `async fn` in `if` exprs without `else`) - rust-lang#120751 (Provide more suggestions on invalid equality where bounds) - rust-lang#120802 (Bail out of drop elaboration when encountering error types) - rust-lang#120967 (docs: mention round-to-even in precision formatting) - rust-lang#120973 (allow static_mut_ref in some tests that specifically test mutable statics) - rust-lang#120974 (llvm-wrapper: adapt for LLVM API change: Add support for EXPORTAS name types) - rust-lang#120986 (iterator.rs: remove "Basic usage" text) - rust-lang#120987 (remove redundant logic) - rust-lang#120988 (fix comment) - rust-lang#120995 (PassWrapper: adapt for llvm/llvm-project@93cdd1b5cfa3735c) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#120987 - tshepang:redundant, r=compiler-errors remove redundant logic Made redundant in 3f697b8
Made redundant in 3f697b8