Closed
Description
Hey!
I have a project which uses git2 (0.13
) and recently I had this issue in my CI workflow while building it: (via cargo check
)
...
Checking git2 v0.13.19
Running `rustc --crate-name git2 --edition=2018 /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/git2-0.13.19/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C panic=abort -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="https"' --cfg 'feature="openssl-probe"' --cfg 'feature="openssl-sys"' --cfg 'feature="ssh"' --cfg 'feature="ssh_key_from_memory"' -C metadata=738ae98b72a2f1ea -C extra-filename=-738ae98b72a2f1ea --out-dir /home/runner/work/gitolith/gitolith/target/debug/deps -L dependency=/home/runner/work/gitolith/gitolith/target/debug/deps --extern bitflags=/home/runner/work/gitolith/gitolith/target/debug/deps/libbitflags-d09adf185da94a52.rmeta --extern libc=/home/runner/work/gitolith/gitolith/target/debug/deps/liblibc-cb6c2a2fc9574711.rmeta --extern libgit2_sys=/home/runner/work/gitolith/gitolith/target/debug/deps/liblibgit2_sys-73ee392da051bb68.rmeta --extern log=/home/runner/work/gitolith/gitolith/target/debug/deps/liblog-ea081dad86be6aee.rmeta --extern openssl_probe=/home/runner/work/gitolith/gitolith/target/debug/deps/libopenssl_probe-837d81d477903de1.rmeta --extern openssl_sys=/home/runner/work/gitolith/gitolith/target/debug/deps/libopenssl_sys-49705c72ddb316e7.rmeta --extern url=/home/runner/work/gitolith/gitolith/target/debug/deps/liburl-8a80395b37ea4bca.rmeta --cap-lints allow -L native=/home/runner/work/gitolith/gitolith/target/debug/build/libgit2-sys-a3348784c0da8455/out/build -L native=/home/runner/work/gitolith/gitolith/target/debug/build/libssh2-sys-bce6b02c73950953/out/build`
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
Error: --> /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:74:15
|
74 | match (self, other) {
| ^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 73:26...
--> /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:73:26
|
73 | fn eq(&self, other: &AttrValue<'_>) -> bool {
| ^^^^^^^^^^^^^
note: ...so that the types are compatible
--> /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:74:15
|
74 | match (self, other) {
| ^^^^^^^^^^^^^
= note: expected `(&AttrValue<'_>, &AttrValue<'_>)`
found `(&AttrValue<'_>, &AttrValue<'_>)`
note: but, the lifetime must be valid for the lifetime `'_` as defined on the impl at 72:30...
--> /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:72:30
|
72 | impl PartialEq for AttrValue<'_> {
| ^^
note: ...so that the types are compatible
--> /home/runner/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/git2-0.13.19/src/attr.rs:79:16
|
79 | | (Self::Bytes(bytes), AttrValue::String(string)) => string.as_bytes() == *bytes,
| ^^^^^^^^^^^^^^^^^^
= note: expected `AttrValue<'_>`
found `AttrValue<'_>`
error: aborting due to previous error
Error: aborting due to previous error
For more information about this error, try `rustc --explain E0495`.
error: could not compile `git2`
Error: could not compile `git2`
...
(raw logs)
My workflow is the following:
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check:
name: Check
runs-on: ubuntu-18.04
steps:
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Checkout
uses: actions/checkout@master
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --locked --verbose
What might be the issue here? Is it directly related to git2
or maybe this is caused by another dependency (conflict)? Or maybe because of the nightly
toolchain?
Activity
extrawurst commentedon May 24, 2021
yup git2-rs currently fails on
nightly
, see #712edit: no problems on stable
alexcrichton commentedon May 24, 2021
Fixed in #712