rust/tests/ui/or-patterns/fn-param-wrap-parens.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
242 B
Rust
Raw Normal View History

2019-08-24 22:45:51 -05:00
// Test the suggestion to wrap an or-pattern as a function parameter in parens.
// run-rustfix
#![allow(warnings)]
fn main() {}
enum E { A, B }
use E::*;
#[cfg(FALSE)]
fn fun1(A | B: E) {} //~ ERROR top-level or-patterns are not allowed