blob: 38233a944cfacf353f56fabfe09fea214ff3f877 [file] [log] [blame]
error[E0658]: or-pattern is not allowed in a `const fn`
--> $DIR/feature-gate-const-fn.rs:3:15
|
LL | const fn foo((Ok(a) | Err(a)): Result<i32, i32>) {
| ^^^^^^^^^^^^^^
|
= note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0658]: or-pattern is not allowed in a `const fn`
--> $DIR/feature-gate-const-fn.rs:6:9
|
LL | let Ok(y) | Err(y) = x;
| ^^^^^^^^^^^^^^
|
= note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0658]: or-pattern is not allowed in a `const`
--> $DIR/feature-gate-const-fn.rs:12:9
|
LL | let Ok(y) | Err(y) = x;
| ^^^^^^^^^^^^^^
|
= note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0658]: or-pattern is not allowed in a `static`
--> $DIR/feature-gate-const-fn.rs:18:9
|
LL | let Ok(y) | Err(y) = x;
| ^^^^^^^^^^^^^^
|
= note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0658]: or-pattern is not allowed in a `static mut`
--> $DIR/feature-gate-const-fn.rs:24:9
|
LL | let Ok(y) | Err(y) = x;
| ^^^^^^^^^^^^^^
|
= note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0658]: or-pattern is not allowed in a `const`
--> $DIR/feature-gate-const-fn.rs:31:13
|
LL | let Ok(y) | Err(y) = x;
| ^^^^^^^^^^^^^^
|
= note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0019]: constant contains unimplemented expression type
--> $DIR/feature-gate-const-fn.rs:31:25
|
LL | let Ok(y) | Err(y) = x;
| ^
error[E0019]: constant contains unimplemented expression type
--> $DIR/feature-gate-const-fn.rs:31:16
|
LL | let Ok(y) | Err(y) = x;
| ^
error: aborting due to 8 previous errors
Some errors have detailed explanations: E0019, E0658.
For more information about an error, try `rustc --explain E0019`.