about summary refs log tree commit diff
path: root/src/test/ui/const-generics/early/const-param-from-outer-fn.rs
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2021-08-27 18:04:57 +0200
committerlcnr <rust@lcnr.de>2021-08-30 11:00:21 +0200
commit0c28e028b6f45f33447f24de7dd762b8599b7a4e (patch)
tree3a573ebc79c4aefed676f4a693ebb62d32ea4e7f /src/test/ui/const-generics/early/const-param-from-outer-fn.rs
parentc0e853f274c42665373b719a5bd7b3f95afe10c2 (diff)
downloadrust-0c28e028b6f45f33447f24de7dd762b8599b7a4e.tar.gz
rust-0c28e028b6f45f33447f24de7dd762b8599b7a4e.zip
`feature(const_generics)` -> `feature(const_param_types)`
Diffstat (limited to 'src/test/ui/const-generics/early/const-param-from-outer-fn.rs')
-rw-r--r--src/test/ui/const-generics/early/const-param-from-outer-fn.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/early/const-param-from-outer-fn.rs b/src/test/ui/const-generics/early/const-param-from-outer-fn.rs
new file mode 100644
index 00000000000..c3b418ee3f8
--- /dev/null
+++ b/src/test/ui/const-generics/early/const-param-from-outer-fn.rs
@@ -0,0 +1,7 @@
+fn foo<const X: u32>() {
+    fn bar() -> u32 {
+        X //~ ERROR can't use generic parameters from outer function
+    }
+}
+
+fn main() {}