summaryrefslogtreecommitdiffstats
path: root/src/test/ui/noexporttypeexe.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/noexporttypeexe.rs')
-rw-r--r--src/test/ui/noexporttypeexe.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/noexporttypeexe.rs b/src/test/ui/noexporttypeexe.rs
new file mode 100644
index 000000000..964ac9a30
--- /dev/null
+++ b/src/test/ui/noexporttypeexe.rs
@@ -0,0 +1,15 @@
+// aux-build:noexporttypelib.rs
+
+extern crate noexporttypelib;
+
+fn main() {
+ // Here, the type returned by foo() is not exported.
+ // This used to cause internal errors when serializing
+ // because the def_id associated with the type was
+ // not convertible to a path.
+ let x: isize = noexporttypelib::foo();
+ //~^ ERROR mismatched types
+ //~| expected type `isize`
+ //~| found enum `Option<isize>`
+ //~| expected `isize`, found enum `Option`
+}