rust/tests/ui/impl-trait/in-trait/doesnt-satisfy.rs

14 lines
250 B
Rust
Raw Normal View History

2022-08-30 23:46:54 -05:00
#![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() {}