error[E0277]: the trait bound `(): Foo` is not satisfied --> $DIR/nested-tait-inference2.rs:13:13 | LL | fn foo() -> impl Foo { | ^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `()` LL | LL | () | -- return type was inferred to be `()` here | = help: the following other types implement trait `Foo`: <() as Foo<()>> <() as Foo> error: aborting due to previous error For more information about this error, try `rustc --explain E0277`.