rust/tests/ui/rfcs/rfc-0000-never_patterns/ICE-119271-never-arm-attr-in-guard.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
371 B
Rust
Raw Normal View History

2023-12-24 15:49:07 -06:00
fn main() {}
fn attr_in_guard() {
match None::<u32> {
Some(!) //~ ERROR `!` patterns are experimental
//~^ ERROR: mismatched types
2023-12-24 15:49:07 -06:00
if #[deny(unused_mut)] //~ ERROR attributes on expressions are experimental
false //~ ERROR a guard on a never pattern will never be run
}
match false {} //~ ERROR: `bool` is non-empty
2023-12-24 15:49:07 -06:00
}