-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifetime issue in new unbuffered logic #329
Comments
So I created a branch in which I added the lifetimes that should be added to the API in order to be correct. And it breaks borrowck atm, so I'm trying to fix them. Someone with more knowledge of the project might be have an easier time to figure it out, though. Here are the lifetimes: stevenroose@fb7a3dd |
I'm thinking this might be a problem in Rust's |
So I'm starting to also convert the |
I have been trying out the new alpha version and I think I stumbled upon a kinda-bug. Somehow something that should be possible is not, I think because of the way lifetimes are indicated in some methods. I'm trying to find a fix, but to reproduce the issue, I have the following snippet.
In the snippet, I'm trying to use a
&'x [u8]
and trying to deserialize into a struct that holds aCow<'x, str>
with the content of a tag. Somehow this snippet gives a lifetime error. I think the main culprit is the combination ofdo_unescape
that equates the lifetime of the slicetogether with calling into
do_escape
as follows which actually overwrites the'a
lifetime with a new local lifetime:do_unescape(&*self.value, custom_entities).map_err(Error::EscapeError)
Here is the snippet:
The text was updated successfully, but these errors were encountered: