fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
838 B20 linesraw
1error[E0435]: attempt to use a non-constant value in a constant
2  --> $DIR/legacy-const-generics-bad.rs:7:35
3   |
4LL |     let a = 1;
5   |     ----- help: consider using `const` instead of `let`: `const a`
6LL |     legacy_const_generics::foo(0, a, 2);
7   |                                   ^ non-constant value
8
9error: generic parameters may not be used in const operations
10  --> $DIR/legacy-const-generics-bad.rs:12:35
11   |
12LL |     legacy_const_generics::foo(0, N + 1, 2);
13   |                                   ^ cannot perform const operation using `N`
14   |
15   = help: const parameters may only be used as standalone arguments, i.e. `N`
16   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
17
18error: aborting due to 2 previous errors
19
20For more information about this error, try `rustc --explain E0435`.