Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Handle nonexhaustive in match pattern #59

Closed
roxelo opened this issue Aug 19, 2021 · 4 comments · Fixed by rust-lang/rust#88280
Closed

Handle nonexhaustive in match pattern #59

roxelo opened this issue Aug 19, 2021 · 4 comments · Fixed by rust-lang/rust#88280
Assignees

Comments

@roxelo
Copy link
Member

roxelo commented Aug 19, 2021

No description provided.

@roxelo roxelo self-assigned this Aug 19, 2021
@roxelo
Copy link
Member Author

roxelo commented Aug 19, 2021

@rustbot label +A-closures +A-edition-2021 +T-compiler

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 26, 2021
…atsakis

Handle match statements with non exhaustive variants in closures

This PR ensures that the behavior for match statements with non exhaustive variants is the same inside and outside closures.

If we have a non-exhaustive SingleVariant which is defined in a different crate, then we should handle the case the same way we would handle a MultiVariant: borrow the match discriminant.

Closes rust-lang/project-rfc-2229#59
r? `@nikomatsakis`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 26, 2021
…atsakis

Handle match statements with non exhaustive variants in closures

This PR ensures that the behavior for match statements with non exhaustive variants is the same inside and outside closures.

If we have a non-exhaustive SingleVariant which is defined in a different crate, then we should handle the case the same way we would handle a MultiVariant: borrow the match discriminant.

Closes rust-lang/project-rfc-2229#59
r? ``@nikomatsakis``
Manishearth added a commit to Manishearth/rust that referenced this issue Aug 27, 2021
…atsakis

Handle match statements with non exhaustive variants in closures

This PR ensures that the behavior for match statements with non exhaustive variants is the same inside and outside closures.

If we have a non-exhaustive SingleVariant which is defined in a different crate, then we should handle the case the same way we would handle a MultiVariant: borrow the match discriminant.

Closes rust-lang/project-rfc-2229#59
r? ```@nikomatsakis```
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 27, 2021
…atsakis

Handle match statements with non exhaustive variants in closures

This PR ensures that the behavior for match statements with non exhaustive variants is the same inside and outside closures.

If we have a non-exhaustive SingleVariant which is defined in a different crate, then we should handle the case the same way we would handle a MultiVariant: borrow the match discriminant.

Closes rust-lang/project-rfc-2229#59
r? ````@nikomatsakis````
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 27, 2021
…atsakis

Handle match statements with non exhaustive variants in closures

This PR ensures that the behavior for match statements with non exhaustive variants is the same inside and outside closures.

If we have a non-exhaustive SingleVariant which is defined in a different crate, then we should handle the case the same way we would handle a MultiVariant: borrow the match discriminant.

Closes rust-lang/project-rfc-2229#59
r? `````@nikomatsakis`````
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 29, 2021
…sakis

Handle match statements with non exhaustive variants in closures

This PR ensures that the behavior for match statements with non exhaustive variants is the same inside and outside closures.

If we have a non-exhaustive SingleVariant which is defined in a different crate, then we should handle the case the same way we would handle a MultiVariant: borrow the match discriminant.

Closes rust-lang/project-rfc-2229#59
r? `@nikomatsakis`
@camelid
Copy link
Member

camelid commented Aug 30, 2021

Looks like this was supposed to be closed by rust-lang/rust#88280?

@roxelo
Copy link
Member Author

roxelo commented Aug 30, 2021

Yes, I am not sure why it wasn't closed

@roxelo
Copy link
Member Author

roxelo commented Aug 30, 2021

Closing the issue as rust-lang/rust#88280 was merged

@roxelo roxelo closed this as completed Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants