]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const_let_refutable.rs
Remove leftover AwaitOrigin
[rust.git] / src / test / ui / consts / const_let_refutable.rs
1 fn main() {}
2
3 const fn slice([a, b]: &[i32]) -> i32 { //~ ERROR refutable pattern in function argument
4     a + b //~ ERROR can only call other `const fn` within a `const fn`
5     //~^ WARN use of possibly uninitialized variable: `a`
6     //~| WARN this error has been downgraded to a warning for backwards compatibility
7     //~| WARN this represents potential undefined behavior in your code and this warning will
8     //~| WARN use of possibly uninitialized variable: `b`
9     //~| WARN this error has been downgraded to a warning for backwards compatibility
10     //~| WARN this represents potential undefined behavior in your code and this warning will
11 }