Dead code warnings in nightly and beta
Building with nightly produces a lot of warnings. This isn't great and it will become a significant problem when this version of Rust becomes stable.
See also #1383 (closed) which is slightly different.
-*- mode: compilation; default-directory: "~/Rustup/Arti/arti/" -*-
Compilation started at Mon Jun 17 18:50:35
nailing-cargo +nightly check --all-features --workspace --all-targets
nailing-cargo: out-of-tree, git, building in: `/home/ian/Rustup/Arti/Build/arti'
nailing-cargo: using really to run as user `rustcargo'
nailing-cargo: *WARNING* cwd is not in Cargo.nail thbough it has Cargo.toml!
nailing-cargo: nailed (0 manifests, 0 packages)
nailing-cargo: invoking: cargo +nightly check --locked --offline --all-features --workspace --all-targets
warning: struct `CreateFastServer` is never constructed
--> crates/tor-proto/src/crypto/handshake/fast.rs:74:19
|
74 | pub(crate) struct CreateFastServer;
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: struct `NtorServer` is never constructed
--> crates/tor-proto/src/crypto/handshake/ntor.rs:43:19
|
43 | pub(crate) struct NtorServer;
| ^^^^^^^^^^
warning: fields `pk` and `sk` are never read
--> crates/tor-proto/src/crypto/handshake/ntor.rs:78:5
|
76 | pub(crate) struct NtorSecretKey {
| ------------- fields in this struct
77 | /// Public key components; must match those held by the client.
78 | pk: NtorPublicKey,
| ^^
...
81 | sk: StaticSecret,
| ^^
warning: method `matches_pk` is never used
--> crates/tor-proto/src/crypto/handshake/ntor.rs:97:8
|
85 | impl NtorSecretKey {
| ------------------ method in this implementation
...
97 | fn matches_pk(&self, pk: &PublicKey) -> Choice {
| ^^^^^^^^^^
warning: function `server_handshake_ntor_v1` is never used
--> crates/tor-proto/src/crypto/handshake/ntor.rs:267:4
|
267 | fn server_handshake_ntor_v1<R, T>(
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: function `server_handshake_ntor_v1_no_keygen` is never used
--> crates/tor-proto/src/crypto/handshake/ntor.rs:287:4
|
287 | fn server_handshake_ntor_v1_no_keygen<T>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: `tor-proto` (lib) generated 6 warnings
warning: constant `REMOVE_CONSENSUS` is never used
--> crates/tor-dirmgr/src/storage/sqlite.rs:865:7
|
865 | const REMOVE_CONSENSUS: &str = "
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: constant `DELETE_BRIDGEDESC` is never used
--> crates/tor-dirmgr/src/storage/sqlite.rs:947:7
|
947 | const DELETE_BRIDGEDESC: &str = "DELETE FROM BridgeDescs WHERE bridge_line = ?;";
| ^^^^^^^^^^^^^^^^^
warning: `tor-dirmgr` (lib) generated 2 warnings
warning: associated constant `BUCKET_CAPACITY` is never used
--> crates/equix/src/bucket_array/hash.rs:24:11
|
19 | pub(crate) trait Shape<K: Key> {
| ----- associated constant in this trait
...
24 | const BUCKET_CAPACITY: usize;
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `equix` (lib) generated 1 warning
warning: constant `DELETE_BRIDGEDESC` is never used
--> crates/tor-dirmgr/src/storage/sqlite.rs:947:7
|
947 | const DELETE_BRIDGEDESC: &str = "DELETE FROM BridgeDescs WHERE bridge_line = ?;";
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `tor-dirmgr` (lib test) generated 1 warning
warning: `equix` (lib test) generated 1 warning (1 duplicate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.07s
nailing-cargo: unnailed. status 0.
Compilation finished at Mon Jun 17 18:50:37
Edited by Ian Jackson