summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-never_type.rs
blob: be8c27dbb1b02d63c8720d45aa356986a3545bab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test that ! errors when used in illegal positions with feature(never_type) disabled

trait Foo {
    type Wub;
}

type Ma = (u32, !, i32); //~ ERROR type is experimental
type Meeshka = Vec<!>; //~ ERROR type is experimental
type Mow = &'static fn(!) -> !; //~ ERROR type is experimental
type Skwoz = &'static mut !; //~ ERROR type is experimental

impl Foo for Meeshka {
    type Wub = !; //~ ERROR type is experimental
}

fn main() {
}