]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const_let_refutable.stderr
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const_let_refutable.stderr
1 error[E0005]: refutable pattern in function argument: `&[]`, `&[_]` and `&[_, _, _]` not covered
2   --> $DIR/const_let_refutable.rs:3:16
3    |
4 LL | const fn slice([a, b]: &[i32]) -> i32 {
5    |                ^^^^^^ patterns `&[]`, `&[_]` and `&[_, _, _]` not covered
6
7 error[E0723]: can only call other `const fn` within a `const fn`, but `const <&i32 as std::ops::Add>::add` is not stable as `const fn`
8   --> $DIR/const_let_refutable.rs:4:5
9    |
10 LL |     a + b
11    |     ^^^^^
12    |
13    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
14    = help: add `#![feature(const_fn)]` to the crate attributes to enable
15
16 error[E0381]: use of possibly-uninitialized variable: `a`
17   --> $DIR/const_let_refutable.rs:4:5
18    |
19 LL |     a + b
20    |     ^ use of possibly-uninitialized `a`
21
22 error[E0381]: use of possibly-uninitialized variable: `b`
23   --> $DIR/const_let_refutable.rs:4:9
24    |
25 LL |     a + b
26    |         ^ use of possibly-uninitialized `b`
27
28 error: aborting due to 4 previous errors
29
30 Some errors have detailed explanations: E0005, E0381, E0723.
31 For more information about an error, try `rustc --explain E0005`.