Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (36 sloc) 577 Bytes
// build-pass (FIXME(62277): could be check-pass?)
#![feature(type_alias_impl_trait)]
fn main() {}
// two definitions with different types
type Foo = impl std::fmt::Debug;
fn foo() -> Foo {
""
}
fn bar(arg: bool) -> Foo {
if arg {
panic!()
} else {
"bar"
}
}
fn boo(arg: bool) -> Foo {
if arg {
loop {}
} else {
"boo"
}
}
fn bar2(arg: bool) -> Foo {
if arg {
"bar2"
} else {
panic!()
}
}
fn boo2(arg: bool) -> Foo {
if arg {
"boo2"
} else {
loop {}
}
}
You can’t perform that action at this time.