-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
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...)
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.