diff options
Diffstat (limited to 'src/test/ui/borrowck/move-in-pattern-mut.rs')
-rw-r--r-- | src/test/ui/borrowck/move-in-pattern-mut.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/test/ui/borrowck/move-in-pattern-mut.rs b/src/test/ui/borrowck/move-in-pattern-mut.rs deleted file mode 100644 index b5c275bf2..000000000 --- a/src/test/ui/borrowck/move-in-pattern-mut.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Issue #63988 -#[derive(Debug)] -struct S; -fn foo(_: Option<S>) {} - -enum E { - V { - s: S, - } -} -fn bar(_: E) {} - -fn main() { - let s = Some(S); - if let Some(mut x) = s { - x = S; - } - foo(s); //~ ERROR use of partially moved value: `s` - let mut e = E::V { s: S }; - let E::V { s: mut x } = e; - x = S; - bar(e); //~ ERROR use of partially moved value: `e` -} |