]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-never_type.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / feature-gates / feature-gate-never_type.rs
1 // Test that ! errors when used in illegal positions with feature(never_type) disabled
2
3 trait Foo {
4     type Wub;
5 }
6
7 type Ma = (u32, !, i32); //~ ERROR type is experimental
8 type Meeshka = Vec<!>; //~ ERROR type is experimental
9 type Mow = &'static fn(!) -> !; //~ ERROR type is experimental
10 type Skwoz = &'static mut !; //~ ERROR type is experimental
11
12 impl Foo for Meeshka {
13     type Wub = !; //~ ERROR type is experimental
14 }
15
16 fn main() {
17 }