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 single-variant `Guard` enums. #58283

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@nnethercote
Copy link
Contributor

nnethercote commented Feb 8, 2019

They're not useful.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 8, 2019

r? @varkor

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

@nnethercote nnethercote closed this Feb 8, 2019

@nnethercote nnethercote force-pushed the nnethercote:rm-Guard branch from e3cfc73 to d173180 Feb 8, 2019

Remove single-variant `Guard` enums.
They're not useful.

@nnethercote nnethercote reopened this Feb 8, 2019

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 8, 2019

cc @F001
The enum was introduced in #53815 as a "first step to implement RFC 2294: if-let-guard".

Citing my comment there:

My only concern is that there's pretty long road between adding if-let guards into AST/HIR and making them actually work, so this might stay as dead code for some time.

@nnethercote

This comment has been minimized.

Copy link
Contributor Author

nnethercote commented Feb 8, 2019

I see. I will change this PR so it just adds a comment on the types explaining why they exist.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 9, 2019

☔️ The latest upstream changes (presumably #58316) made this pull request unmergeable. Please resolve the merge conflicts.

@nnethercote nnethercote deleted the nnethercote:rm-Guard branch Feb 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment