Files
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
270 B
Rust
Raw Permalink 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
#![allow(warnings)]
fn main() {}
enum E { A, B }
use E::*;
2025-03-29 17:24:03 +00:00
#[cfg(false)]
fn fun1(A | B: E) {} //~ ERROR function parameters require top-level or-patterns in parentheses