Skip to content

Instantly share code, notes, and snippets.

@zmike
Created October 22, 2014 00:07
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 zmike/1d6d825e9855e45089bb to your computer and use it in GitHub Desktop.
Save zmike/1d6d825e9855e45089bb to your computer and use it in GitHub Desktop.
servo build error
string_map.rs:43:33: 43:45 error: mismatched types: expected `&str`, found `&&str` (expected str, found &-ptr)
string_map.rs:43 (*v).insert(&(k.clone()), csv);
^~~~~~~~~~~~
string_map.rs:58:34: 58:40 error: cannot infer an appropriate lifetime for automatic coercion due to conflicting requirements
string_map.rs:58 match str::from_utf8(result) {
^~~~~~
string_map.rs:60:38: 60:39 note: first, the lifetime cannot outlive the expression at 60:37...
string_map.rs:60 match (*v).find(&k) {
^
string_map.rs:60:38: 60:39 note: ...so type `&str` of expression is valid during the expression
string_map.rs:60 match (*v).find(&k) {
^
string_map.rs:58:34: 58:40 note: but, the lifetime must be valid for the expression at 58:33...
string_map.rs:58 match str::from_utf8(result) {
^~~~~~
string_map.rs:58:34: 58:40 note: ...so that auto-reference is valid at the time of borrow
string_map.rs:58 match str::from_utf8(result) {
^~~~~~
error: aborting due to 2 previous errors
Could not compile `embedding`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment