summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-5884.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-5884.rs')
-rw-r--r--tests/ui/issues/issue-5884.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-5884.rs b/tests/ui/issues/issue-5884.rs
new file mode 100644
index 000000000..991c52321
--- /dev/null
+++ b/tests/ui/issues/issue-5884.rs
@@ -0,0 +1,18 @@
+// build-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+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::new(None) };
+}
+
+pub fn main(){}