1 // Test that the borrow checker considers `#[non_exhaustive]` when checking
2 // whether a match contains a discriminant read.
4 // aux-build:monovariants.rs
5 extern crate monovariants;
7 use monovariants::NonExhaustiveMonovariant;
10 let mut x = NonExhaustiveMonovariant::Variant(1);
13 //~^ ERROR cannot use `x` because it was mutably borrowed
14 NonExhaustiveMonovariant::Variant(_) => {},