Skip to content

Instantly share code, notes, and snippets.

Created March 17, 2016 00:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/d5f56f2d1b921f1a4cb0 to your computer and use it in GitHub Desktop.
Save anonymous/d5f56f2d1b921f1a4cb0 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