Skip to content
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

compilation fails to build with rust-1.48 #97

Open
WilliamTakeshi opened this issue Dec 23, 2020 · 2 comments
Open

compilation fails to build with rust-1.48 #97

WilliamTakeshi opened this issue Dec 23, 2020 · 2 comments

Comments

@WilliamTakeshi
Copy link

Hello, thanks for creating this project.

I am kinda new in Rust, but I am getting the error compiling the lib

error[E0713]: borrow may still be in use when destructor runs
   --> /home/william/.cargo/registry/src/github.com-1ecc6299db9ec823/url-1.5.1/src/form_urlencoded.rs:251:40
    |
249 | impl<'a> Target for ::UrlQuery<'a> {
    |      -- lifetime `'a` defined here
250 |     fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization }
251 |     fn finish(self) -> &'a mut ::Url { self.url }
    |                                        ^^^^^^^^ - here, drop of `self` needs exclusive access to `*self.url`, because the type `UrlQuery<'_>` implements the `Drop` trait
    |                                        |
    |                                        returning this value requires that `*self.url` is borrowed for `'a`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0713`.
error: could not compile `url`

To learn more, run the command again with --verbose.

Ubuntu 20.04
cargo 1.48.0 (65cbdd2dc 2020-10-14)
rustc 1.48.0 (7eac88abb 2020-11-16)

Reading a bit I think is caused by
rust-lang/rust#64221 (NLL warnings in the 2015 edition are now hard errors)

@WilliamTakeshi WilliamTakeshi changed the title compilation fails to build with rust-1.40 compilation fails to build with rust-1.48 Dec 23, 2020
@botiapa
Copy link

botiapa commented Jan 28, 2021

The issue is still present. Are there any workarounds?

@jdonszelmann
Copy link

still present (rust 1.55)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants