Skip to content

switch_ty is redundant#73586

Merged
bors merged 3 commits intorust-lang:masterfrom
RalfJung:switch-ty
Jun 23, 2020
Merged

switch_ty is redundant#73586
bors merged 3 commits intorust-lang:masterfrom
RalfJung:switch-ty

Conversation

@RalfJung
Copy link
Copy Markdown
Member

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

@rust-highfive
Copy link
Copy Markdown
Contributor

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 21, 2020
@RalfJung RalfJung changed the title remove switch_ty reliance in codegen switch_ty is redundant Jun 21, 2020

/// 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.
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

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?

Copy link
Copy Markdown
Contributor

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.

@oli-obk
Copy link
Copy Markdown
Contributor

oli-obk commented Jun 22, 2020

@bors r+

@bors
Copy link
Copy Markdown
Collaborator

bors commented Jun 22, 2020

📌 Commit 7447bf2 has been approved by oli-obk

@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 Jun 22, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 22, 2020
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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 23, 2020
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
@bors bors merged commit 490d820 into rust-lang:master Jun 23, 2020
@RalfJung RalfJung deleted the switch-ty branch June 28, 2020 07:19
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants