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