Skip to content

Instantly share code, notes, and snippets.

@trashbyte
Created March 14, 2017 03:29
Show Gist options
  • Save trashbyte/61dd6fc23dc323e1b89f1100c1f603b6 to your computer and use it in GitHub Desktop.
Save trashbyte/61dd6fc23dc323e1b89f1100c1f603b6 to your computer and use it in GitHub Desktop.
rust???
enum IResult<I = u32, E = u32> {
Done(I),
Error(E)
}
fn main() {
IResult::Done(0);
}
rustc busted.rs
error[E0282]: unable to infer enough type information about `E`
--> busted.rs:7:2
|
7 | IResult::Done(0);
| ^^^^^^^^^^^^^ cannot infer type for `E`
|
= note: type annotations or generic parameter binding required
error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment