summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-5997-enum.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-5997-enum.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-5997-enum.rs b/src/test/ui/issues/issue-5997-enum.rs
new file mode 100644
index 000000000..3ff4e036c
--- /dev/null
+++ b/src/test/ui/issues/issue-5997-enum.rs
@@ -0,0 +1,10 @@
+fn f<Z>() -> bool {
+ enum E { V(Z) }
+ //~^ ERROR can't use generic parameters from outer function
+ true
+}
+
+fn main() {
+ let b = f::<isize>();
+ assert!(b);
+}