diff options
Diffstat (limited to 'tests/ui/or-patterns/fn-param-wrap-parens.rs')
-rw-r--r-- | tests/ui/or-patterns/fn-param-wrap-parens.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/or-patterns/fn-param-wrap-parens.rs b/tests/ui/or-patterns/fn-param-wrap-parens.rs new file mode 100644 index 000000000..8e703d274 --- /dev/null +++ b/tests/ui/or-patterns/fn-param-wrap-parens.rs @@ -0,0 +1,13 @@ +// 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 |