Skip to content

Instantly share code, notes, and snippets.

@carols10cents
Forked from anonymous/playground.rs
Created March 17, 2016 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carols10cents/6b716290639c58ac3406 to your computer and use it in GitHub Desktop.
Save carols10cents/6b716290639c58ac3406 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
// The error is that there's an unused generic G declared...
fn foo<G>() -> String {
String::from("hi")
}
fn main() {
println!("{}", foo());
// ^ but here is where the error message points to:
// error: unable to infer enough type information about `_`; type annotations or generic parameter binding required [E0282]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment