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

Unable to compile with rust 1.47 #27

Open
harto opened this issue Nov 20, 2020 · 0 comments
Open

Unable to compile with rust 1.47 #27

harto opened this issue Nov 20, 2020 · 0 comments

Comments

@harto
Copy link
Contributor

harto commented Nov 20, 2020

I encountered this error compiling the program on macOS:

$ cargo build --release
   [lots of output omitted]

   Compiling syntex_syntax v0.39.0
error[E0713]: borrow may still be in use when destructor runs
   --> /Users/stuart/.cargo/registry/src/github.com-1ecc6299db9ec823/url-1.7.0/src/form_urlencoded.rs:261:40
    |
259 | impl<'a> Target for ::UrlQuery<'a> {
    |      -- lifetime `'a` defined here
260 |     fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization }
261 |     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.
warning: build failed, waiting for other jobs to finish...
error[E0502]: cannot borrow `cx.parse_sess.span_diagnostic` as immutable because it is also borrowed as mutable
   --> /Users/stuart/.cargo/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.39.0/src/ext/expand.rs:659:25
    |
649 |         let mut expander = MacroExpander::new(&mut cx);
    |                                               ------- mutable borrow occurs here
...
659 |         let err_count = cx.parse_sess.span_diagnostic.err_count();
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ immutable borrow occurs here
660 |         let mut ret = expander.fold_crate(c);
    |                       -------- mutable borrow later used here

error: aborting due to previous error

For more information about this error, try `rustc --explain E0502`.
error: build failed

I installed rust via Homebrew:

$ rustc -V
rustc 1.47.0

I don't know much about the rust ecosystem, but I was able to compile and run this program at some point in the past 😅

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

1 participant