Repository: rust
Issue: rustdoc does not pass `-C link-arg` through to doctests
Labels: A-linkage,T-rustdoc,C-bug,A-doctests

I have a C bindings project, all the tests pass with LTO and without, but when I pass `-C linker-plugin-lto` the regular tests pass but the rustdoc tests fail to link:
It looks like the problem is related to the fact that `rustdoc` uses `ld` even though the regular build uses `lld` (because I pass `-C link-arg=-fuse-ld=lld`)

<details><summary>Output</summary>
<p>

```
   Compiling autocfg v0.1.7
   Compiling rand_core v0.4.2
   Compiling libc v0.2.71
   Compiling cc v1.0.54
   Compiling serde v1.0.111
   Compiling bitcoin_hashes v0.7.6
     Running `sccache rustc --crate-name autocfg /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/autocfg-0.1.7/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 -C metadata=ebbc26440037421b -C extra-filename=-ebbc26440037421b --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name rand_core /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="alloc"' --cfg 'feature="std"' -C metadata=d63394dde76fe5a0 -C extra-filename=-d63394dde76fe5a0 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name build_script_build /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.71/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=01329f6217b871bb -C extra-filename=-01329f6217b871bb --out-dir /home/elichai2/gits/rust-secp256k1/target/release/build/libc-01329f6217b871bb -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name build_script_build /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.111/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=414f185f572377de -C extra-filename=-414f185f572377de --out-dir /home/elichai2/gits/rust-secp256k1/target/release/build/serde-414f185f572377de -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name bitcoin_hashes /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/bitcoin_hashes-0.7.6/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=4594e1cc1fdd532c -C extra-filename=-4594e1cc1fdd532c --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name cc --edition=2018 /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.54/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 -C metadata=3a6e73f3476312e2 -C extra-filename=-3a6e73f3476312e2 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
     Running `sccache rustc --crate-name build_script_build /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_pcg-0.1.2/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 -C metadata=32bb49eac23555be -C extra-filename=-32bb49eac23555be --out-dir /home/elichai2/gits/rust-secp256k1/target/release/build/rand_pcg-32bb49eac23555be -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern autocfg=/home/elichai2/gits/rust-secp256k1/target/release/deps/libautocfg-ebbc26440037421b.rlib --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name build_script_build /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_chacha-0.1.1/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 -C metadata=0aa437617ef4c301 -C extra-filename=-0aa437617ef4c301 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/build/rand_chacha-0aa437617ef4c301 -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern autocfg=/home/elichai2/gits/rust-secp256k1/target/release/deps/libautocfg-ebbc26440037421b.rlib --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name build_script_build /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="rand_os"' --cfg 'feature="std"' --cfg 'feature="wasm-bindgen"' -C metadata=4202993d799cc268 -C extra-filename=-4202993d799cc268 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/build/rand-4202993d799cc268 -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern autocfg=/home/elichai2/gits/rust-secp256k1/target/release/deps/libautocfg-ebbc26440037421b.rlib --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
     Running `sccache rustc --crate-name rand_core /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.3.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 -C metadata=617eb678ca46cfed -C extra-filename=-617eb678ca46cfed --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name rand_jitter /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_jitter-0.1.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="std"' -C metadata=71a8fbe662a80390 -C extra-filename=-71a8fbe662a80390 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
   Compiling secp256k1-sys v0.1.2 (/home/elichai2/gits/rust-secp256k1/secp256k1-sys)
     Running `sccache rustc --crate-name build_script_build secp256k1-sys/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -Cembed-bitcode=no -C codegen-units=1 --cfg 'feature="std"' -C metadata=fe172eb2cb6bde7c -C extra-filename=-fe172eb2cb6bde7c --out-dir /home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-fe172eb2cb6bde7c -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern cc=/home/elichai2/gits/rust-secp256k1/target/release/deps/libcc-3a6e73f3476312e2.rlib -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
   Compiling rand_xorshift v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
     Running `sccache rustc --crate-name rand_xorshift /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_xorshift-0.1.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 -C metadata=d791620a54504390 -C extra-filename=-d791620a54504390 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-617eb678ca46cfed.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name rand_hc /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_hc-0.1.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 -C metadata=4bbe0777fae36e56 -C extra-filename=-4bbe0777fae36e56 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-617eb678ca46cfed.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name rand_isaac /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_isaac-0.1.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 -C metadata=22954716c220ed8f -C extra-filename=-22954716c220ed8f --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-617eb678ca46cfed.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `/home/elichai2/gits/rust-secp256k1/target/release/build/rand_chacha-0aa437617ef4c301/build-script-build`
     Running `/home/elichai2/gits/rust-secp256k1/target/release/build/rand_pcg-32bb49eac23555be/build-script-build`
     Running `/home/elichai2/gits/rust-secp256k1/target/release/build/rand-4202993d799cc268/build-script-build`
     Running `/home/elichai2/gits/rust-secp256k1/target/release/build/serde-414f185f572377de/build-script-build`
     Running `sccache rustc --crate-name serde /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.111/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=76cf2ccb45495a5d -C extra-filename=-76cf2ccb45495a5d --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto --cfg ops_bound --cfg core_reverse --cfg de_boxed_c_str --cfg de_boxed_path --cfg de_rc_dst --cfg core_duration --cfg integer128 --cfg range_inclusive --cfg num_nonzero --cfg core_try_from --cfg num_nonzero_signed --cfg std_atomic64 --cfg std_atomic`
     Running `sccache rustc --crate-name rand_pcg /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_pcg-0.1.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 -C metadata=5f9514104bfec1d9 -C extra-filename=-5f9514104bfec1d9 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto --cfg rustc_1_26`
     Running `sccache rustc --crate-name rand_chacha /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_chacha-0.1.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 -C metadata=c48312d15cb7894d -C extra-filename=-c48312d15cb7894d --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-617eb678ca46cfed.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto --cfg rustc_1_26`
     Running `/home/elichai2/gits/rust-secp256k1/target/release/build/libc-01329f6217b871bb/build-script-build`
     Running `sccache rustc --crate-name libc /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.71/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=c1478a574388c51d -C extra-filename=-c1478a574388c51d --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto --cfg freebsd11 --cfg libc_priv_mod_use --cfg libc_union --cfg libc_const_size_of --cfg libc_align --cfg libc_core_cvoid --cfg libc_packedN`
   Compiling rand_os v0.1.3
     Running `sccache rustc --crate-name rand_os /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_os-0.1.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="wasm-bindgen"' -C metadata=c259260bb28b2f93 -C extra-filename=-c259260bb28b2f93 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern libc=/home/elichai2/gits/rust-secp256k1/target/release/deps/liblibc-c1478a574388c51d.rmeta --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `sccache rustc --crate-name rand /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="rand_os"' --cfg 'feature="std"' --cfg 'feature="wasm-bindgen"' -C metadata=8a50de549b50598d -C extra-filename=-8a50de549b50598d --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern libc=/home/elichai2/gits/rust-secp256k1/target/release/deps/liblibc-c1478a574388c51d.rmeta --extern rand_chacha=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_chacha-c48312d15cb7894d.rmeta --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rmeta --extern rand_hc=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_hc-4bbe0777fae36e56.rmeta --extern rand_isaac=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_isaac-22954716c220ed8f.rmeta --extern rand_jitter=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_jitter-71a8fbe662a80390.rmeta --extern rand_os=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_os-c259260bb28b2f93.rmeta --extern rand_pcg=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_pcg-5f9514104bfec1d9.rmeta --extern rand_xorshift=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_xorshift-d791620a54504390.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto --cfg rustc_1_25 --cfg rustc_1_26 --cfg rustc_1_27`
   Compiling serde_test v1.0.111
     Running `sccache rustc --crate-name serde_test /home/elichai2/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_test-1.0.111/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 -C metadata=85e4ec23c6da3b3f -C extra-filename=-85e4ec23c6da3b3f --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern serde=/home/elichai2/gits/rust-secp256k1/target/release/deps/libserde-76cf2ccb45495a5d.rmeta --cap-lints allow -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto`
     Running `/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-fe172eb2cb6bde7c/build-script-build`
     Running `sccache rustc --crate-name secp256k1_sys secp256k1-sys/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="std"' -C metadata=ef6ef29e4364ca97 -C extra-filename=-ef6ef29e4364ca97 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto -L native=/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out -l static=secp256k1`
warning: unnecessary parentheses around assigned value
  --> secp256k1-sys/src/lib.rs:49:48
   |
49 | pub const SECP256K1_SER_UNCOMPRESSED: c_uint = (1 << 1);
   |                                                ^^^^^^^^ help: remove these parentheses
   |
   = note: `#[warn(unused_parens)]` on by default

warning: 1 warning emitted

   Compiling secp256k1 v0.17.2 (/home/elichai2/gits/rust-secp256k1)
     Running `sccache rustc --crate-name secp256k1 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=5440a97805818300 -C extra-filename=-5440a97805818300 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern secp256k1_sys=/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1_sys-ef6ef29e4364ca97.rmeta -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto -L native=/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out`
     Running `sccache rustc --crate-name secp256k1 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --emit=dep-info,link -C opt-level=3 -Cembed-bitcode=no --test --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=b69f606b3fbfdd22 -C extra-filename=-b69f606b3fbfdd22 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern bitcoin_hashes=/home/elichai2/gits/rust-secp256k1/target/release/deps/libbitcoin_hashes-4594e1cc1fdd532c.rlib --extern rand=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand-8a50de549b50598d.rlib --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rlib --extern secp256k1_sys=/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1_sys-ef6ef29e4364ca97.rlib --extern serde_test=/home/elichai2/gits/rust-secp256k1/target/release/deps/libserde_test-85e4ec23c6da3b3f.rlib -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto -L native=/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out`
     Running `sccache rustc --crate-name sign_verify examples/sign_verify.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C codegen-units=1 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=feb35bb2a631ce00 -C extra-filename=-feb35bb2a631ce00 --out-dir /home/elichai2/gits/rust-secp256k1/target/release/examples -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps --extern bitcoin_hashes=/home/elichai2/gits/rust-secp256k1/target/release/deps/libbitcoin_hashes-4594e1cc1fdd532c.rlib --extern rand=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand-8a50de549b50598d.rlib --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rlib --extern secp256k1=/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib --extern secp256k1_sys=/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1_sys-ef6ef29e4364ca97.rlib --extern serde_test=/home/elichai2/gits/rust-secp256k1/target/release/deps/libserde_test-85e4ec23c6da3b3f.rlib -C link-arg=-fuse-ld=lld -C target-cpu=native -C linker-plugin-lto -L native=/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out`
warning: unused import: `Error`
   --> src/ecdh.rs:170:9
    |
170 |     use Error;
    |         ^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

warning: 1 warning emitted

    Finished release [optimized] target(s) in 5.31s
     Running `/home/elichai2/gits/rust-secp256k1/target/release/deps/secp256k1-b69f606b3fbfdd22`

running 32 tests
test ecdh::tests::test_c_callback ... ok
test key::test::invalid_secret_key ... ok
test key::test::pubkey_equal ... ok
test key::test::pubkey_combine ... ok
test key::test::pubkey_from_slice ... ok
test key::test::skey_from_slice ... ok
test key::test::test_pubkey_from_bad_slice ... ok
test key::test::test_seckey_from_bad_slice ... ok
test tests::signature_display ... ok
test ecdh::tests::ecdh_with_hash_callback ... ok
test ecdh::tests::ecdh_with_hash ... ok
test ecdh::tests::ecdh ... ok
test tests::signature_lax_der ... ok
test tests::test_bad_slice ... ok
test key::test::test_display_output ... ok
test key::test::test_pubkey_serialize ... ok
test key::test::keypair_slice_round_trip ... ok
test key::test::test_out_of_range ... ok
test key::test::test_addition ... ok
test tests::sign_and_verify_fail ... ok
test key::test::test_multiplication ... ok
test tests::test_low_s ... ok
test key::test::test_debug_output ... ok
test tests::sign_and_verify_extreme ... ok
test tests::test_panic_raw_ctx ... ok
test tests::capabilities ... ok
test tests::test_manual_create_destroy ... ok
test tests::test_raw_ctx ... ok
test tests::test_preallocation ... ok
test tests::signature_serialize_roundtrip ... ok
test tests::sign_and_verify ... ok
test key::test::pubkey_hash ... ok

test result: ok. 32 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests secp256k1
     Running `rustdoc --crate-type lib --test /home/elichai2/gits/rust-secp256k1/src/lib.rs --crate-name secp256k1 -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps -L dependency=/home/elichai2/gits/rust-secp256k1/target/release/deps -L native=/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out --cfg 'feature="default"' --cfg 'feature="std"' --extern bitcoin_hashes=/home/elichai2/gits/rust-secp256k1/target/release/deps/libbitcoin_hashes-4594e1cc1fdd532c.rlib --extern rand=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand-8a50de549b50598d.rlib --extern rand_core=/home/elichai2/gits/rust-secp256k1/target/release/deps/librand_core-d63394dde76fe5a0.rlib --extern secp256k1=/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib --extern secp256k1_sys=/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1_sys-ef6ef29e4364ca97.rlib --extern serde_test=/home/elichai2/gits/rust-secp256k1/target/release/deps/libserde_test-85e4ec23c6da3b3f.rlib`

running 5 tests
test src/ecdh.rs - ecdh::SharedSecret::new_with_hash (line 124) ... FAILED
test src/lib.rs -  (line 85) ... FAILED
test src/lib.rs -  (line 67) ... FAILED
test src/lib.rs - Secp256k1<C>::verify (line 728) ... ok
test src/lib.rs -  (line 39) ... ok

failures:

---- src/ecdh.rs - ecdh::SharedSecret::new_with_hash (line 124) stdout ----
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/rustdoctestytBGQB/rust_out.rust_out.7rcbfp3g-cgu.0.rcgu.o" "-o" "/tmp/rustdoctestytBGQB/rust_out" "/tmp/rustdoctestytBGQB/rust_out.33dyzt1ekirinwy8.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/deps" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/deps" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out" "-L" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib" "/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1_sys-ef6ef29e4364ca97.rlib" "-Wl,--start-group" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-8bb11f807a7b6b4c.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-ca8087507780d964.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-259c92b387c1c166.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-16e0a2fbbb8e14b3.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-8a1651b8e23d2aaf.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-23bdd98b0574083e.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-855a92055ec33e2e.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-24c70dd44fbacdfb.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b326273841bae587.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-ac3c1f0e16507051.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-a5729542b65954aa.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-09bd1119ab1cad7d.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9a787681bfbeaf61.rlib" "-Wl,--end-group" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-5a0398ee67f74664.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
  = note: /usr/bin/ld: /home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib: error adding symbols: file format not recognized
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

Couldn't compile the test.
---- src/lib.rs -  (line 85) stdout ----
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/rustdoctestRjIIE9/rust_out.rust_out.7rcbfp3g-cgu.0.rcgu.o" "-o" "/tmp/rustdoctestRjIIE9/rust_out" "/tmp/rustdoctestRjIIE9/rust_out.33dyzt1ekirinwy8.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/deps" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/deps" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out" "-L" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib" "/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1_sys-ef6ef29e4364ca97.rlib" "-Wl,--start-group" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-8bb11f807a7b6b4c.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-ca8087507780d964.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-259c92b387c1c166.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-16e0a2fbbb8e14b3.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-8a1651b8e23d2aaf.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-23bdd98b0574083e.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-855a92055ec33e2e.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-24c70dd44fbacdfb.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b326273841bae587.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-ac3c1f0e16507051.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-a5729542b65954aa.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-09bd1119ab1cad7d.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9a787681bfbeaf61.rlib" "-Wl,--end-group" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-5a0398ee67f74664.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
  = note: /usr/bin/ld: /home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib: error adding symbols: file format not recognized
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

Couldn't compile the test.
---- src/lib.rs -  (line 67) stdout ----
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/rustdoctestl6Z0OR/rust_out.rust_out.7rcbfp3g-cgu.0.rcgu.o" "-o" "/tmp/rustdoctestl6Z0OR/rust_out" "/tmp/rustdoctestl6Z0OR/rust_out.33dyzt1ekirinwy8.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/deps" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/deps" "-L" "/home/elichai2/gits/rust-secp256k1/target/release/build/secp256k1-sys-49af82f8a635a828/out" "-L" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib" "/home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1_sys-ef6ef29e4364ca97.rlib" "-Wl,--start-group" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-8bb11f807a7b6b4c.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-ca8087507780d964.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-259c92b387c1c166.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-16e0a2fbbb8e14b3.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-8a1651b8e23d2aaf.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-23bdd98b0574083e.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-855a92055ec33e2e.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-24c70dd44fbacdfb.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b326273841bae587.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-ac3c1f0e16507051.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-a5729542b65954aa.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-09bd1119ab1cad7d.rlib" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9a787681bfbeaf61.rlib" "-Wl,--end-group" "/home/elichai2/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-5a0398ee67f74664.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
  = note: /usr/bin/ld: /home/elichai2/gits/rust-secp256k1/target/release/deps/libsecp256k1-5440a97805818300.rlib: error adding symbols: file format not recognized
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

Couldn't compile the test.

failures:
    src/ecdh.rs - ecdh::SharedSecret::new_with_hash (line 124)
    src/lib.rs -  (line 67)
    src/lib.rs -  (line 85)

test result: FAILED. 2 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--doc'
```

</p>
</details>