-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 a dead code path. #91493
Remove a dead code path. #91493
Conversation
…n it existed. Also, no tests fail when turning that arm into an ICE
(rust-highfive has picked a reviewer for you, use r? to override) |
@@ -481,7 +477,14 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> { | |||
}) => { | |||
(may_define_opaque_type(tcx, parent_def_id, opaque_hir_id), origin) | |||
} | |||
_ => (def_scope_default(), hir::OpaqueTyOrigin::TyAlias), |
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.
This may be a leftover from impl-trait-in-bindings that we overlooked. We only have impl trait in return position and type alias impl trait, there are no other places that generate ty::Opaque
, thus I concluded that this arm is unreachable.
I don't know the code involved here -- but since it will ICE immediately if it's not dead code after all, this looks like a low risk change. @bors r+ rollup |
📌 Commit 9e5939a has been approved by |
Remove a dead code path. It is neither documented nor can I see any way it could ever be reached. Also, no tests fail when turning that arm into an ICE
Remove a dead code path. It is neither documented nor can I see any way it could ever be reached. Also, no tests fail when turning that arm into an ICE
Remove a dead code path. It is neither documented nor can I see any way it could ever be reached. Also, no tests fail when turning that arm into an ICE
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#87614 (Recommend fix `count()` -> `len()` on slices) - rust-lang#91065 (Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE) - rust-lang#91312 (Fix AnonConst ICE) - rust-lang#91341 (Add `array::IntoIter::{empty, from_raw_parts}`) - rust-lang#91493 (Remove a dead code path.) - rust-lang#91503 (Tweak "call this function" suggestion to have smaller span) - rust-lang#91547 (Suggest try_reserve in try_reserve_exact) - rust-lang#91562 (Pretty print async block without redundant space) - rust-lang#91620 (Update books) - rust-lang#91622 (:arrow_up: rust-analyzer) Failed merges: - rust-lang#91571 (Remove unneeded access to pretty printer's `s` field in favor of deref) r? `@ghost` `@rustbot` modify labels: rollup
It is neither documented nor can I see any way it could ever be reached.
Also, no tests fail when turning that arm into an ICE