rust/tests/ui/impl-trait/in-trait/doesnt-satisfy.rs
2023-01-11 09:32:08 +00:00

14 lines
250 B
Rust

#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]
trait Foo {
fn bar() -> impl std::fmt::Display;
}
impl Foo for () {
fn bar() -> () {}
//~^ ERROR `()` doesn't implement `std::fmt::Display`
}
fn main() {}