fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
862 B21 linesraw
1error[E0005]: refutable pattern in function argument: `&[]`, `&[_]` and `&[_, _, _, ..]` not covered
2  --> $DIR/const_let_refutable.rs:3:16
3   |
4LL | const fn slice(&[a, b]: &[i32]) -> i32 {
5   |                ^^^^^^^ patterns `&[]`, `&[_]` and `&[_, _, _, ..]` not covered
6   |
7   = note: the matched value is of type `&[i32]`
8
9error[E0723]: loops and conditional expressions are not stable in const fn
10  --> $DIR/const_let_refutable.rs:3:17
11   |
12LL | const fn slice(&[a, b]: &[i32]) -> i32 {
13   |                 ^^^^^^
14   |
15   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
16   = help: add `#![feature(const_fn)]` to the crate attributes to enable
17
18error: aborting due to 2 previous errors
19
20Some errors have detailed explanations: E0005, E0723.
21For more information about an error, try `rustc --explain E0005`.