]> 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 9504c84b10ed73df040e4f7352f6de3f9618633c..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:15:22
+  --> $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