summary refs log tree commit diff
path: root/src/test/ui/consts/const_let_refutable.stderr
blob: cdd696ee7fbff06b1d4581a4e49929e8d02791d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
error[E0005]: refutable pattern in function argument: `&[]` not covered
  --> $DIR/const_let_refutable.rs:3:16
   |
LL | const fn slice([a, b]: &[i32]) -> i32 {
   |                ^^^^^^ pattern `&[]` not covered

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`
  --> $DIR/const_let_refutable.rs:4:5
   |
LL |     a + b
   |     ^^^^^
   |
   = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
   = help: add #![feature(const_fn)] to the crate attributes to enable

warning[E0381]: use of possibly uninitialized variable: `a`
  --> $DIR/const_let_refutable.rs:4:5
   |
LL |     a + b
   |     ^ use of possibly uninitialized `a`
   |
   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
   = note: for more information, try `rustc --explain E0729`

warning[E0381]: use of possibly uninitialized variable: `b`
  --> $DIR/const_let_refutable.rs:4:9
   |
LL |     a + b
   |         ^ use of possibly uninitialized `b`
   |
   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
   = note: for more information, try `rustc --explain E0729`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0005, E0381, E0723.
For more information about an error, try `rustc --explain E0005`.