summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-29668.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-29668.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-29668.rs b/src/test/ui/issues/issue-29668.rs
new file mode 100644
index 000000000..3d6c27bcd
--- /dev/null
+++ b/src/test/ui/issues/issue-29668.rs
@@ -0,0 +1,16 @@
+// run-pass
+// Functions can return unnameable types
+
+mod m1 {
+ mod m2 {
+ #[derive(Debug)]
+ pub struct A;
+ }
+ use self::m2::A;
+ pub fn x() -> A { A }
+}
+
+fn main() {
+ let x = m1::x();
+ println!("{:?}", x);
+}