]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/non-constant-expr-for-arr-len.stderr
Auto merge of #80790 - JohnTitor:rollup-js1noez, r=JohnTitor
[rust.git] / src / test / ui / non-constant-expr-for-arr-len.stderr
index b947cb7e19c207af2998592f0d86187e20dda19c..01da6bcf49aaa815e5f5c49efa0c989ace49997e 100644 (file)
@@ -1,6 +1,8 @@
 error[E0435]: attempt to use a non-constant value in a constant
   --> $DIR/non-constant-expr-for-arr-len.rs:5:22
    |
+LL |     fn bar(n: usize) {
+   |            - help: consider using `const` instead of `let`
 LL |         let _x = [0; n];
    |                      ^ non-constant value