Possible to use cargo --timings on a project that uses gluon?

https://crates.io/crates/gluon compiles fine for me on Rust stable.

On cargo +nightly, I get a compile error of:

/.cargo/registry/src/github.com-1ecc6299db9ec823/gluon-0.18.1/src/query.rs:808:57
    |
808 | pub(crate) fn env(env: &(dyn Compilation + '_)) -> Env<&'_ CompilerDatabase> {
    |                        -----------------------          ^^ expected named lifetime parameter
    |
    = help: this function's return type contains a borrowed value, but the signature does not say which one of `env`'s 2 lifetimes it is borrowed from
help: consider introducing a named lifetime parameter
    |
808 | pub(crate) fn env<'a>(env: &'a (dyn Compilation + 'a)) -> Env<&'a CompilerDatabase> {
    |                  ++++       ++                    ~~           ~~

Is my only choice here to maintain a local fork of gluon, if I still want cargo --timings ?

seems like a regression. you might want to open an issue about it

1 Like

I agree — if you find something no longer compiles with nightly, report it. This helps the compiler authors catch bugs fast.

But also, you don't need nightly to use --timings. It was stabilized in 1.60.0.

2 Likes

In fact, it's a regression from stable to stable - I've filed an issue.

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.