fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
2.6 KiB70 linesraw
1error[E0658]: or-pattern is not allowed in a `const fn`
2  --> $DIR/feature-gate-const-fn.rs:3:15
3   |
4LL | const fn foo((Ok(a) | Err(a)): Result<i32, i32>) {
5   |               ^^^^^^^^^^^^^^
6   |
7   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
8   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
9
10error[E0658]: or-pattern is not allowed in a `const fn`
11  --> $DIR/feature-gate-const-fn.rs:6:9
12   |
13LL |     let Ok(y) | Err(y) = x;
14   |         ^^^^^^^^^^^^^^
15   |
16   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
17   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
18
19error[E0658]: or-pattern is not allowed in a `const`
20  --> $DIR/feature-gate-const-fn.rs:12:9
21   |
22LL |     let Ok(y) | Err(y) = x;
23   |         ^^^^^^^^^^^^^^
24   |
25   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
26   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
27
28error[E0658]: or-pattern is not allowed in a `static`
29  --> $DIR/feature-gate-const-fn.rs:18:9
30   |
31LL |     let Ok(y) | Err(y) = x;
32   |         ^^^^^^^^^^^^^^
33   |
34   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
35   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
36
37error[E0658]: or-pattern is not allowed in a `static mut`
38  --> $DIR/feature-gate-const-fn.rs:24:9
39   |
40LL |     let Ok(y) | Err(y) = x;
41   |         ^^^^^^^^^^^^^^
42   |
43   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
44   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
45
46error[E0658]: or-pattern is not allowed in a `const`
47  --> $DIR/feature-gate-const-fn.rs:31:13
48   |
49LL |         let Ok(y) | Err(y) = x;
50   |             ^^^^^^^^^^^^^^
51   |
52   = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
53   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
54
55error[E0019]: constant contains unimplemented expression type
56  --> $DIR/feature-gate-const-fn.rs:31:25
57   |
58LL |         let Ok(y) | Err(y) = x;
59   |                         ^
60
61error[E0019]: constant contains unimplemented expression type
62  --> $DIR/feature-gate-const-fn.rs:31:16
63   |
64LL |         let Ok(y) | Err(y) = x;
65   |                ^
66
67error: aborting due to 8 previous errors
68
69Some errors have detailed explanations: E0019, E0658.
70For more information about an error, try `rustc --explain E0019`.