rust/tests/ui/impl-trait/in-trait/deep-match.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
286 B
Rust
Raw Normal View History

#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]
struct Wrapper<T>(T);
trait Foo {
fn bar() -> Wrapper<impl Sized>;
}
impl Foo for () {
fn bar() -> i32 { 0 }
//~^ ERROR method `bar` has an incompatible return type for trait
}
fn main() {}