mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
32 lines
554 B
Rust
32 lines
554 B
Rust
|
#![allow(dead_code)]
|
||
|
#![deny(unused_parens)]
|
||
|
|
||
|
enum State {
|
||
|
Waiting { start_at: u64 }
|
||
|
}
|
||
|
struct Foo {}
|
||
|
|
||
|
fn main() {
|
||
|
let e = &mut State::Waiting { start_at: 0u64 };
|
||
|
match (&mut State::Waiting { start_at: 0u64 }) {
|
||
|
_ => {}
|
||
|
}
|
||
|
|
||
|
match (e) {
|
||
|
//~^ ERROR unnecessary parentheses around `match` scrutinee expression
|
||
|
_ => {}
|
||
|
}
|
||
|
|
||
|
match &(State::Waiting { start_at: 0u64 }) {
|
||
|
_ => {}
|
||
|
}
|
||
|
|
||
|
match (State::Waiting { start_at: 0u64 }) {
|
||
|
_ => {}
|
||
|
}
|
||
|
|
||
|
match (&&Foo {}) {
|
||
|
_ => {}
|
||
|
}
|
||
|
}
|