diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-5884.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-5884.rs b/src/test/ui/issues/issue-5884.rs new file mode 100644 index 000000000..2f64342a6 --- /dev/null +++ b/src/test/ui/issues/issue-5884.rs @@ -0,0 +1,20 @@ +// build-pass +#![allow(dead_code)] +// pretty-expanded FIXME #23616 + +#![feature(box_syntax)] + +pub struct Foo { + a: isize, +} + +struct Bar<'a> { + a: Box<Option<isize>>, + b: &'a Foo, +} + +fn check(a: Box<Foo>) { + let _ic = Bar{ b: &*a, a: box None }; +} + +pub fn main(){} |