diff options
Diffstat (limited to 'tests/ui/box/unit/unique-object-move.rs')
-rw-r--r-- | tests/ui/box/unit/unique-object-move.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/box/unit/unique-object-move.rs b/tests/ui/box/unit/unique-object-move.rs new file mode 100644 index 000000000..bb35a9b2d --- /dev/null +++ b/tests/ui/box/unit/unique-object-move.rs @@ -0,0 +1,18 @@ +// run-pass +#![allow(dead_code)] +// Issue #5192 + +// pretty-expanded FIXME #23616 + +pub trait EventLoop { fn foo(&self) {} } + +pub struct UvEventLoop { + uvio: isize +} + +impl EventLoop for UvEventLoop { } + +pub fn main() { + let loop_: Box<dyn EventLoop> = Box::new(UvEventLoop { uvio: 0 }) as Box<dyn EventLoop>; + let _loop2_ = loop_; +} |