os-rust/src/test/ui/or-patterns/fn-param-wrap-parens.rs

15 lines
284 B
Rust
Raw Normal View History

2019-08-25 05:45:51 +02:00
// Test the suggestion to wrap an or-pattern as a function parameter in parens.
// run-rustfix
#![feature(or_patterns)]
#![allow(warnings)]
fn main() {}
enum E { A, B }
use E::*;
#[cfg(FALSE)]
fn fun1(A | B: E) {} //~ ERROR an or-pattern parameter must be wrapped in parentheses