Closed
Description
The following should compile because (): Default
:
#![feature(conservative_impl_trait)]
fn test() -> impl Default {}
However, it fails with:
error[E0282]: unable to infer enough type information about `_`
--> tmp.rs:2:14
|
2 | fn test() -> impl Default {}
| ^^^^^^^^^^^^ cannot infer type for `_`
|
= note: type annotations or generic parameter binding required
(Obviously, nobody will ever run into this in practice...)