diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-consume-upcast-box.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-consume-upcast-box.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.rs b/src/test/ui/borrowck/borrowck-consume-upcast-box.rs deleted file mode 100644 index 6b32d185b..000000000 --- a/src/test/ui/borrowck/borrowck-consume-upcast-box.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Check that we report an error if an upcast box is moved twice. - -trait Foo { fn dummy(&self); } - -fn consume(_: Box<dyn Foo>) { -} - -fn foo(b: Box<dyn Foo + Send>) { - consume(b); - consume(b); //~ ERROR use of moved value -} - -fn main() { -} |