]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-from-outer-fn.rs
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / const-param-from-outer-fn.rs
1 // revisions: full min
2
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 fn foo<const X: u32>() {
8     fn bar() -> u32 {
9         X //~ ERROR can't use generic parameters from outer function
10     }
11 }
12
13 fn main() {}