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) { | ^^^^^^^^^^^^^^ | = note: see issue #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 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 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 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 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 for more information = help: add `#![feature(const_if_match)]` to the crate attributes to enable error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0658`.