rust/tests/ui/type-alias-impl-trait/incomplete-inference.rs

15 lines
185 B
Rust

#![feature(type_alias_impl_trait)]
type Foo = impl Sized;
fn bar() -> Foo {
None
//~^ ERROR: type annotations needed [E0282]
}
fn baz() -> Foo {
Some(())
}
fn main() {}