From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- .../rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 tests/ui/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs (limited to 'tests/ui/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs') diff --git a/tests/ui/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs b/tests/ui/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs deleted file mode 100644 index 2ad92b794..000000000 --- a/tests/ui/rfc-2008-non-exhaustive/borrowck-non-exhaustive.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Test that the borrow checker considers `#[non_exhaustive]` when checking -// whether a match contains a discriminant read. - -// aux-build:monovariants.rs -extern crate monovariants; - -use monovariants::NonExhaustiveMonovariant; - -fn main() { - let mut x = NonExhaustiveMonovariant::Variant(1); - let y = &mut x; - match x { - //~^ ERROR cannot use `x` because it was mutably borrowed - NonExhaustiveMonovariant::Variant(_) => {}, - _ => {}, - } - drop(y); -} -- cgit v1.2.3