Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Doesn't compile in latest nightly toolchain #88

Closed
axyiee opened this issue Jun 25, 2022 · 3 comments
Closed

Doesn't compile in latest nightly toolchain #88

axyiee opened this issue Jun 25, 2022 · 3 comments

Comments

@axyiee
Copy link

axyiee commented Jun 25, 2022

I think it doesn't compile in latest nightly because the petgraph dependency of query-core uses a outdated version which is incompatible.

error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:143:47
    |
143 |         self.graph_fmt(self.graph, f, |n, cb| cb(n), |e, cb| cb(e))
    |                                        -  --  ^^^^^ argument requires that `'1` must outlive `'2`
    |                                        |  |
    |                                        |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                                        has type `&'1 <G as visit::Data>::NodeWeight`

error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:143:62
    |
143 |         self.graph_fmt(self.graph, f, |n, cb| cb(n), |e, cb| cb(e))
    |                                                       -  --  ^^^^^ argument requires that `'1` must outlive `'2`
    |                                                       |  |
    |                                                       |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                                                       has type `&'1 <G as visit::Data>::EdgeWeight`

error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:154:32
    |
154 |                        |n, cb| cb(&DebugFmt(n)),
    |                         -  --  ^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
    |                         |  |
    |                         |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                         has type `&'1 <G as visit::Data>::NodeWeight`

error[E0716]: temporary value dropped while borrowed
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:154:36
    |
154 |                        |n, cb| cb(&DebugFmt(n)),
    |                            --  ----^^^^^^^^^^^-
    |                            |   |   |          |
    |                            |   |   |          temporary value is freed at the end of this statement
    |                            |   |   creates a temporary which is freed while still in use
    |                            |   argument requires that borrow lasts for `'2`
    |                            has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`

error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:155:32
    |
155 |                        |e, cb| cb(&DebugFmt(e)))
    |                         -  --  ^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
    |                         |  |
    |                         |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                         has type `&'1 <G as visit::Data>::EdgeWeight`

error[E0716]: temporary value dropped while borrowed
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:155:36
    |
155 |                        |e, cb| cb(&DebugFmt(e)))
    |                            --  ----^^^^^^^^^^^-
    |                            |   |   |          |
    |                            |   |   |          temporary value is freed at the end of this statement
    |                            |   |   creates a temporary which is freed while still in use
    |                            |   argument requires that borrow lasts for `'2`
    |                            has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`

For more information about this error, try `rustc --explain E0716`.
error: could not compile `petgraph` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
void :: Hexalite/Minecraft/java-edition ‹dev/next*› % nvim Cargo.toml                                                                                                                                  101 ↵
void :: Hexalite/Minecraft/java-edition ‹dev/next*› % cargo check                                                                                                                                           
    Updating git repository `https://github.com/petgraph/petgraph`
    Checking petgraph v0.4.13
    Checking combine v3.8.1
    Checking mio v0.7.14
    Checking futures-channel v0.3.21
    Checking ring v0.16.20
    Checking futures-lite v1.12.0
error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:143:47
    |
143 |         self.graph_fmt(self.graph, f, |n, cb| cb(n), |e, cb| cb(e))
    |                                        -  --  ^^^^^ argument requires that `'1` must outlive `'2`
    |                                        |  |
    |                                        |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                                        has type `&'1 <G as visit::Data>::NodeWeight`

error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:143:62
    |
143 |         self.graph_fmt(self.graph, f, |n, cb| cb(n), |e, cb| cb(e))
    |                                                       -  --  ^^^^^ argument requires that `'1` must outlive `'2`
    |                                                       |  |
    |                                                       |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                                                       has type `&'1 <G as visit::Data>::EdgeWeight`

error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:154:32
    |
154 |                        |n, cb| cb(&DebugFmt(n)),
    |                         -  --  ^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
    |                         |  |
    |                         |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                         has type `&'1 <G as visit::Data>::NodeWeight`

error[E0716]: temporary value dropped while borrowed
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:154:36
    |
154 |                        |n, cb| cb(&DebugFmt(n)),
    |                            --  ----^^^^^^^^^^^-
    |                            |   |   |          |
    |                            |   |   |          temporary value is freed at the end of this statement
    |                            |   |   creates a temporary which is freed while still in use
    |                            |   argument requires that borrow lasts for `'2`
    |                            has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`

error: lifetime may not live long enough
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:155:32
    |
155 |                        |e, cb| cb(&DebugFmt(e)))
    |                         -  --  ^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
    |                         |  |
    |                         |  has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`
    |                         has type `&'1 <G as visit::Data>::EdgeWeight`

error[E0716]: temporary value dropped while borrowed
   --> /home/exst/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/petgraph-0.4.13/src/dot.rs:155:36
    |
155 |                        |e, cb| cb(&DebugFmt(e)))
    |                            --  ----^^^^^^^^^^^-
    |                            |   |   |          |
    |                            |   |   |          temporary value is freed at the end of this statement
    |                            |   |   creates a temporary which is freed while still in use
    |                            |   argument requires that borrow lasts for `'2`
    |                            has type `&mut dyn FnMut(&'2 (dyn std::fmt::Display + '2)) -> Result<(), std::fmt::Error>`

For more information about this error, try `rustc --explain E0716`.
error: could not compile `petgraph` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
@axyiee
Copy link
Author

axyiee commented Jul 2, 2022

It seems to be caused by rust-lang/rust#98616, regressing to nightly-2022-06-22 for now resolves this problem.

@Brendonovich
Copy link
Owner

I'm not really interested in providing nightly support, though it probably wouldn't hurt to run CI on nightly too. Seeing that it's because of a regression is helpful though, since after that is sorted out then I'd imagine it will still work.

@Brendonovich
Copy link
Owner

Looks like this is no longer the case with v4.2.0 of the Prisma engines

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

No branches or pull requests

2 participants