diff options
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.rs | 7 |
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 000000000..c3b418ee3 --- /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() {} |