-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
switch_ty is redundant #73586
switch_ty is redundant #73586
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -1075,6 +1075,8 @@ pub enum TerminatorKind<'tcx> { | |||
discr: Operand<'tcx>, | |||
|
|||
/// The type of value being tested. | |||
/// This is always the same as the type of `discr`. | |||
/// FIXME: remove this redundant information. Currently, it is relied on by pretty-printing. |
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.
If you want to be more aggressive about it you can #[deprecate]
it.
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.
Not sure what that would help with?
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.
It would nudge people away from new usages of this field.
@bors r+ |
📌 Commit 7447bf2 has been approved by |
switch_ty is redundant This field is redundant, but we cannot remove it currently as pretty-printing relies on it (and it does not have access to `mir::Body` to compute the type itself). Cc @oli-obk @matthewjasper @jonas-schievink
Rollup of 7 pull requests Successful merges: - rust-lang#71756 (add Windows system error codes that should map to io::ErrorKind::TimedOut) - rust-lang#73495 (Converted all platform-specific stdin/stdout/stderr implementations to use io:: traits) - rust-lang#73575 (Fix typo in error_codes doc) - rust-lang#73578 (Make is_freeze and is_copy_modulo_regions take TyCtxtAt) - rust-lang#73586 (switch_ty is redundant) - rust-lang#73600 (Fix spurious 'value moved here in previous iteration of loop' messages) - rust-lang#73610 (Clean up E0699 explanation) Failed merges: r? @ghost
This field is redundant, but we cannot remove it currently as pretty-printing relies on it (and it does not have access to
mir::Body
to compute the type itself).Cc @oli-obk @matthewjasper @jonas-schievink