[Pkg-rust-maintainers] Bug#1139491: starship: FTBFS: error[E0665]: `#[derive(Default)]` on enum with no `#[default]`

Santiago Vila sanvila at debian.org
Tue Jun 9 10:48:09 BST 2026


Package: src:starship
Version: 1.22.1-9
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202606/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:starship, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with shell_completions
   dh_clean
 debian/rules binary
dh binary --with shell_completions
   dh_update_autotools_config
   dh_autoreconf
   debian/rules execute_before_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p .cargo
cp debian/cargo-config.toml .cargo/config.toml
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
cargo build --release --target x86_64-unknown-linux-gnu
warning: unused manifest key: disabled
     Locking 292 packages to latest compatible versions
      Adding rand v0.8.6 (available: v0.10.1)
      Adding schemars v0.8.22 (available: v1.2.1)
      Adding sha1 v0.10.6 (available: v0.11.0)
      Adding whoami v1.6.1 (available: v2.1.2)
   Compiling proc-macro2 v1.0.106
   Compiling quote v1.0.45
   Compiling unicode-ident v1.0.24
   Compiling libc v0.2.186
   Compiling syn v2.0.117
   Compiling cfg-if v1.0.4
   Compiling memchr v2.8.0
   Compiling crossbeam-utils v0.8.21
   Compiling aho-corasick v1.1.4
   Compiling regex-syntax v0.8.10
   Compiling fastrand v2.3.0
   Compiling once_cell v1.21.4
   Compiling thiserror v2.0.18
   Compiling regex-automata v0.4.13
   Compiling thiserror-impl v2.0.18
   Compiling bstr v1.12.1
   Compiling gix-trace v0.1.19
   Compiling bitflags v2.11.0
   Compiling tinyvec_macros v0.1.0
   Compiling smallvec v1.15.1
   Compiling tinyvec v1.10.0
   Compiling gix-validate v0.11.1
   Compiling parking_lot_core v0.9.12
   Compiling gix-path v0.12.0
   Compiling unicode-normalization v0.1.25
   Compiling log v0.4.29
   Compiling scopeguard v1.2.0
   Compiling lock_api v0.4.14
   Compiling gix-utils v0.3.2
   Compiling crc32fast v1.5.0
   Compiling parking_lot v0.12.5
   Compiling same-file v1.0.6
   Compiling walkdir v2.5.0
   Compiling prodash v28.0.0
   Compiling crossbeam-channel v0.5.15
   Compiling zlib-rs v0.6.2
   Compiling allocator-api2 v0.2.21
   Compiling byteorder v1.5.0
   Compiling heapless v0.8.0
   Compiling hash32 v0.3.1
   Compiling gix-error v0.2.3
   Compiling stable_deref_trait v1.2.0
   Compiling equivalent v1.0.1
   Compiling rustix v1.1.4
   Compiling foldhash v0.2.0
   Compiling hashbrown v0.16.1
   Compiling faster-hex v0.10.0
   Compiling gix-features v0.48.0
   Compiling linux-raw-sys v0.12.1
   Compiling gix-hash v0.25.0
error: Please set either the `sha1` or the `sha256` feature flag
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:32:1
   |
32 | compile_error!("Please set either the `sha1` or the `sha256` feature flag");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0665]: `#[derive(Default)]` on enum with no `#[default]`
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:93:10
    |
 93 |   #[derive(Default, PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
    |            ^^^^^^^
...
 96 | / pub enum Kind {
 97 | |     /// The SHA1 hash with 160 bits.
 98 | |     #[cfg_attr(feature = "sha1", default)]
 99 | |     #[cfg(feature = "sha1")]
...   |
104 | |     Sha256 = 2,
105 | | }
    | |_- this enum needs a unit variant marked with `#[default]`

error[E0308]: mismatched types
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:66:31
   |
66 |     pub const fn longest() -> Self {
   |                  -------      ^^^^ expected `Kind`, found `()`
   |                  |
   |                  implicitly returns `()` as its body has no tail or `return` expression

error[E0308]: mismatched types
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:53:32
   |
53 |     pub const fn shortest() -> Self {
   |                  --------      ^^^^ expected `Kind`, found `()`
   |                  |
   |                  implicitly returns `()` as its body has no tail or `return` expression

error[E0308]: mismatched types
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:180:27
    |
180 |     pub const fn all() -> &'static [Self] {
    |                  ---      ^^^^^^^^^^^^^^^ expected `&[Kind]`, found `()`
    |                  |
    |                  implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected reference `&'static [Kind]`
               found unit type `()`

error[E0004]: non-exhaustive patterns: type `&mut hasher::_impl::Hasher` is non-empty
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/hasher.rs:52:19
   |
52 |             match self {
   |                   ^^^^
   |
note: `hasher::_impl::Hasher` defined here
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/hasher.rs:20:14
   |
20 |     pub enum Hasher {
   |              ^^^^^^
   = note: the matched value is of type `&mut hasher::_impl::Hasher`
   = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
   |
52 ~             match self {
53 +                 _ => todo!(),
54 +             }
   |

error[E0004]: non-exhaustive patterns: type `&ObjectId` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:117:15
    |
117 |         match self {
    |               ^^^^
    |
note: `ObjectId` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:19:10
    |
 19 | pub enum ObjectId {
    |          ^^^^^^^^
    = note: the matched value is of type `&ObjectId`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
117 ~         match self {
118 +             _ => todo!(),
119 +         }
    |

error[E0004]: non-exhaustive patterns: type `&ObjectId` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:127:15
    |
127 |         match self {
    |               ^^^^
    |
note: `ObjectId` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:19:10
    |
 19 | pub enum ObjectId {
    |          ^^^^^^^^
    = note: the matched value is of type `&ObjectId`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
127 ~         match self {
128 +             _ => todo!(),
129 +         }
    |

error[E0004]: non-exhaustive patterns: type `&mut ObjectId` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:137:15
    |
137 |         match self {
    |               ^^^^
    |
note: `ObjectId` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:19:10
    |
 19 | pub enum ObjectId {
    |          ^^^^^^^^
    = note: the matched value is of type `&mut ObjectId`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
137 ~         match self {
138 +             _ => todo!(),
139 +         }
    |

error[E0004]: non-exhaustive patterns: type `&ObjectId` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:183:15
    |
183 |         match self {
    |               ^^^^
    |
note: `ObjectId` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:19:10
    |
 19 | pub enum ObjectId {
    |          ^^^^^^^^
    = note: the matched value is of type `&ObjectId`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
183 ~         match self {
184 +             _ => todo!(),
185 +         }
    |

error[E0004]: non-exhaustive patterns: type `&ObjectId` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:275:15
    |
275 |         match self {
    |               ^^^^
    |
note: `ObjectId` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/object_id.rs:19:10
    |
 19 | pub enum ObjectId {
    |          ^^^^^^^^
    = note: the matched value is of type `&ObjectId`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
275 ~         match self {
276 +             _ => todo!(),
277 +         }
    |

error[E0004]: non-exhaustive patterns: type `&Kind` is non-empty
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:41:15
   |
41 |         match self {
   |               ^^^^
   |
note: `Kind` defined here
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:96:10
   |
96 | pub enum Kind {
   |          ^^^^
   = note: the matched value is of type `&Kind`
   = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
   |
41 ~         match self {
42 +             _ => todo!(),
43 +         }
   |

error[E0004]: non-exhaustive patterns: type `&Kind` is non-empty
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:92:15
   |
92 |         match self {
   |               ^^^^
   |
note: `Kind` defined here
  --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:96:10
   |
96 | pub enum Kind {
   |          ^^^^
   = note: the matched value is of type `&Kind`
   = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
   |
92 ~         match self {
93 +             _ => todo!(),
94 +         }
   |

error[E0004]: non-exhaustive patterns: type `&Kind` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:103:15
    |
103 |         match self {
    |               ^^^^
    |
note: `Kind` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:96:10
    |
 96 | pub enum Kind {
    |          ^^^^
    = note: the matched value is of type `&Kind`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
103 ~         match self {
104 +             _ => todo!(),
105 +         }
    |

error[E0004]: non-exhaustive patterns: type `&Kind` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:147:15
    |
147 |         match self {
    |               ^^^^
    |
note: `Kind` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:96:10
    |
 96 | pub enum Kind {
    |          ^^^^
    = note: the matched value is of type `&Kind`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
147 ~         match self {
148 +             _ => todo!(),
149 +         }
    |

error[E0004]: non-exhaustive patterns: type `&Kind` is non-empty
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/kind.rs:158:15
    |
158 |         match self {
    |               ^^^^
    |
note: `Kind` defined here
   --> /usr/share/cargo/registry/gix-hash-0.25.0/src/lib.rs:96:10
    |
 96 | pub enum Kind {
    |          ^^^^
    = note: the matched value is of type `&Kind`
    = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
    |
158 ~         match self {
159 +             _ => todo!(),
160 +         }
    |

Some errors have detailed explanations: E0004, E0308, E0665.
For more information about an error, try `rustc --explain E0004`.
error: could not compile `gix-hash` (lib) due to 16 previous errors
warning: build failed, waiting for other jobs to finish...
make[1]: *** [debian/rules:15: override_dh_auto_build] Error 101
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:8: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------



More information about the Pkg-rust-maintainers mailing list