]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const_let_refutable.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / consts / const_let_refutable.stderr
CommitLineData
60c5eb7d 1error[E0005]: refutable pattern in function argument: `&[]`, `&[_]` and `&[_, _, _, ..]` not covered
0731742a
XL
2 --> $DIR/const_let_refutable.rs:3:16
3 |
532ac7d7 4LL | const fn slice([a, b]: &[i32]) -> i32 {
60c5eb7d 5 | ^^^^^^ patterns `&[]`, `&[_]` and `&[_, _, _, ..]` not covered
0731742a 6
dc9dc135 7error[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`
48663c56
XL
8 --> $DIR/const_let_refutable.rs:4:5
9 |
10LL | a + b
11 | ^^^^^
12 |
13 = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
416331ca 14 = help: add `#![feature(const_fn)]` to the crate attributes to enable
48663c56 15
e1599b0c 16error[E0381]: use of possibly-uninitialized variable: `a`
48663c56
XL
17 --> $DIR/const_let_refutable.rs:4:5
18 |
19LL | a + b
e1599b0c 20 | ^ use of possibly-uninitialized `a`
48663c56 21
e1599b0c 22error[E0381]: use of possibly-uninitialized variable: `b`
48663c56
XL
23 --> $DIR/const_let_refutable.rs:4:9
24 |
25LL | a + b
e1599b0c 26 | ^ use of possibly-uninitialized `b`
48663c56 27
416331ca 28error: aborting due to 4 previous errors
0731742a 29
48663c56
XL
30Some errors have detailed explanations: E0005, E0381, E0723.
31For more information about an error, try `rustc --explain E0005`.