blob: a66c4464417789403bbd679395632203c83b36c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Make sure we consider `!` to be a union read.
#![feature(never_type, never_patterns)]
//~^ WARN the feature `never_patterns` is incomplete
union U {
a: !,
b: usize,
}
fn foo<T>(u: U) -> ! {
let U { a: ! } = u;
//~^ ERROR access to union field is unsafe
}
fn main() {}
|