Skip to content

Instantly share code, notes, and snippets.

@mitsuhiko
Created March 28, 2017 20:26
Show Gist options
  • Save mitsuhiko/f49e279d92ad9d55b425d192988ad6b5 to your computer and use it in GitHub Desktop.
Save mitsuhiko/f49e279d92ad9d55b425d192988ad6b5 to your computer and use it in GitHub Desktop.
error[E0308]: mismatched types
--> src/lib.rs:564:32
|
564 | self.attributes.remove(&name.as_qname())
| ^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected type `&QName<'static>`
found type `&QName<'a>`
note: the lifetime 'a as defined on the body at 563:84...
--> src/lib.rs:563:85
|
563 | pub fn remove_attr<'a, Q: AsQName<'a>>(&'a mut self, name: Q) -> Option<String> {
| _____________________________________________________________________________________^ starting here...
564 | | self.attributes.remove(&name.as_qname())
565 | | }
| |_____^ ...ending here
= note: ...does not necessarily outlive the static lifetime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment