diff options
Diffstat (limited to 'src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs')
-rw-r--r-- | src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs b/src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs deleted file mode 100644 index c2a59a105..000000000 --- a/src/test/ui/borrowck/move-in-static-initializer-issue-38520.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Regression test for #38520. Check that moves of `Foo` are not -// permitted as `Foo` is not copy (even in a static/const -// initializer). - -struct Foo(usize); - -const fn get(x: Foo) -> usize { - x.0 -} - -const X: Foo = Foo(22); -static Y: usize = get(*&X); //~ ERROR [E0507] -const Z: usize = get(*&X); //~ ERROR [E0507] - -fn main() { -} |