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

cargo install --locked mdbook-admonish fails #41

Closed
max-sixty opened this issue Oct 22, 2022 · 3 comments
Closed

cargo install --locked mdbook-admonish fails #41

max-sixty opened this issue Oct 22, 2022 · 3 comments

Comments

@max-sixty
Copy link

I'm not sure how it could fail given that it used to succeed — I thought the role of --locked was to prevent this. But it generates this for me on a 1.64 compiler:

error[E0597]: `local_ctx` does not live long enough
   --> /Users/maximilian/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-0.4.18/src/renderer/html_handlebars/helpers/navigation.rs:154:25
    |
154 |             t.render(r, &local_ctx, &mut local_rc, out)
    |                         ^^^^^^^^^^ borrowed value does not live long enough
155 |         })?;
    |         -
    |         |
    |         `local_ctx` dropped here while still borrowed
    |         borrow might be used here, when `local_rc` is dropped and runs the destructor for type `handlebars::RenderContext<'_, '_>`
    |
    = note: values in a scope are dropped in the opposite order they are defined

For more information about this error, try `rustc --explain E0597`.
error: could not compile `mdbook` due to previous error
warning: build failed, waiting for other jobs to finish...
    Building [=======================> ] 240/243: toml_edit
error: failed to compile `mdbook-admonish v1.7.0`, intermediate artifacts can be found at `/var/folders/q2/jxfwc8mn3gvf0cs0mqk83thm0000gn/T/cargo-installm1zcJW`

(There's a warning about using a yanked dependency, but again, I thought it could still use it)

Running cargo install --path . --locked on main works — would it be possible if we could release a new version? And FYI the original command works without --locked.

@tommilligan
Copy link
Owner

Sure, sounds like maybe an old dependency failing after NLL was stabilised? Not too sure of the specific cause, but happy to put a new release out.

@tommilligan
Copy link
Owner

Released v1.8.0, please let me know if this resolves your issue or if there is still an issue

@max-sixty
Copy link
Author

That explains it — I guess some code was relying on the old borrow checker. Thanks!

Great, that works; appreciate the fast response, and thanks for the excellent library!

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

2 participants