error[E0308]: mismatched types --> $DIR/specialization-default-projection.rs:21:5 | LL | fn generic() -> ::Assoc { | ----------------- expected `::Assoc` because of return type ... LL | () | ^^ expected associated type, found () | = note: expected associated type `::Assoc` found unit type `()` = note: consider constraining the associated type `::Assoc` to `()` or calling a method that returns `::Assoc` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error[E0308]: mismatched types --> $DIR/specialization-default-projection.rs:28:5 | LL | fn monomorphic() -> () { | -- expected `()` because of return type ... LL | generic::<()>() | ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | | expected (), found associated type | = note: expected unit type `()` found associated type `<() as Foo>::Assoc` = note: consider constraining the associated type `<() as Foo>::Assoc` to `()` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`.