Skip to content

Instantly share code, notes, and snippets.

@GuillaumeGomez
Last active December 1, 2016 04:07
Show Gist options
  • Save GuillaumeGomez/097fec3b6ac4257419fdf100115535f8 to your computer and use it in GitHub Desktop.
Save GuillaumeGomez/097fec3b6ac4257419fdf100115535f8 to your computer and use it in GitHub Desktop.
./x86_64-apple-darwin/stage1/bin/rustc t.rs
-> &'static str
-> str
error[E0308]: mismatched types
--> t.rs:4:9
|
4 | foo("a");
| ^^^ expected struct `std::string::String`, found reference
|
= note: expected type `std::string::String`
= note: found type `&'static str`
error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment