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

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

17 lines
343 B
Rust
Raw Normal View History

// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next
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() {}