rust/compiler/rustc_typeck
bors 2f662b1403 Auto merge of #88280 - sexxi-goose:non-exhaustive, r=nikomatsakis
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 https://github.com/rust-lang/project-rfc-2229/issues/59
r? `@nikomatsakis`
2021-08-29 20:27:14 +00:00
..
src Auto merge of #88280 - sexxi-goose:non-exhaustive, r=nikomatsakis 2021-08-29 20:27:14 +00:00
Cargo.toml rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.