about summary refs log tree commit diff
path: root/tests/ui/or-patterns/fn-param-wrap-parens.fixed
blob: 608f826390da63bdff0bcd3e0b3b15c8c1ce79b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 function parameters require top-level or-patterns in parentheses