-
-
Save carols10cents/6b716290639c58ac3406 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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