fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
748 B21 linesraw
1error[E0401]: can't use generic parameters from outer function
2  --> $DIR/const-param-from-outer-fn.rs:6:9
3   |
4LL | fn foo<const X: u32>() {
5   |              - const parameter from outer function
6LL |     fn bar() -> u32 {
7   |        --- try adding a local generic parameter in this method instead
8LL |         X
9   |         ^ use of generic parameter from outer function
10
11warning: the feature `const_generics` is incomplete and may cause the compiler to crash
12  --> $DIR/const-param-from-outer-fn.rs:1:12
13   |
14LL | #![feature(const_generics)]
15   |            ^^^^^^^^^^^^^^
16   |
17   = note: `#[warn(incomplete_features)]` on by default
18
19error: aborting due to previous error
20
21For more information about this error, try `rustc --explain E0401`.