summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs
blob: 0b8157fe33dd74281d5086f8b836c3ca738eee5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(type_alias_impl_trait)]

fn main() {}

// two definitions with different types
type Foo = impl std::fmt::Debug;

fn foo() -> Foo {
    ""
}

fn bar() -> Foo { //~ ERROR: concrete type differs from previous defining opaque type use
    panic!()
}

fn boo() -> Foo {
    loop {}
}