#1151655 rust-numbat-cli: FTBFS: error[E0308]: mismatched types

#1151655#5
Date:
2026-10-22 17:03:21 UTC
From:
To:
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/202610/

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:rust-numbat-cli, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<NumbatError>`, found `NumbatError`
    |
    = note: expected struct `Box<NumbatError>`
                 found enum `NumbatError`

error[E0308]: mismatched types
   --> src/main.rs:525:17
    |
474 |         match result {
    |               ------ this expression has type `Result<(Vec<Statement<'_>>, InterpreterResult), Box<NumbatError>>`
...
525 |             Err(NumbatError::RuntimeError(e)) => {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<NumbatError>`, found `NumbatError`
    |
    = note: expected struct `Box<NumbatError>`
                 found enum `NumbatError`

error[E0061]: this method takes 5 arguments but 4 arguments were supplied
   --> src/main.rs:496:56
    |
496 |                   let result_markup = interpreter_result.to_markup(
    |  ________________________________________________________^^^^^^^^^-
497 | |                     statements.last(),
498 | |                     ®istry,
499 | |                     interactive || pretty_print,
500 | |                     interactive || pretty_print,
501 | |                 );
    | |_________________- argument #5 of type `&FormatOptions` is missing
    |
note: method defined here
   --> /usr/share/cargo/registry/numbat-1.24.0/src/interpreter/mod.rs:101:12
    |
101 |     pub fn to_markup(
    |            ^^^^^^^^^
help: provide the argument
    |
496 |                 let result_markup = interpreter_result.to_markup(
...
500 |                     interactive || pretty_print,
501 ~                     /* &FormatOptions */,
502 ~                 );
    |

error[E0277]: the trait bound `numbat::RuntimeError: ErrorDiagnostic` is not satisfied
   --> src/main.rs:526:39
    |
526 |                 self.print_diagnostic(e);
    |                      ---------------- ^ the trait `ErrorDiagnostic` is not implemented for `numbat::RuntimeError`
    |                      |
    |                      required by a bound introduced by this call
    |
    = help: the following other types implement trait `ErrorDiagnostic`:
              ResolverDiagnostic<'_, CommandError>
              ResolverDiagnostic<'_, numbat::RuntimeError>
              numbat::NameResolutionError
              numbat::ParseError
              numbat::TypeCheckError
              numbat::resolver::ResolverError
note: required by a bound in `Cli::print_diagnostic`
   --> src/main.rs:532:48
    |
532 |     fn print_diagnostic(&mut self, error: impl ErrorDiagnostic) {
    |                                                ^^^^^^^^^^^^^^^ required by this bound in `Cli::print_diagnostic`

error[E0061]: this method takes 2 arguments but 1 argument was supplied
   --> src/main.rs:533:38
    |
533 |         self.context.lock().unwrap().print_diagnostic(error)
    |                                      ^^^^^^^^^^^^^^^^------- argument #2 of type `bool` is missing
    |
note: method defined here
   --> /usr/share/cargo/registry/numbat-1.24.0/src/lib.rs:838:12
    |
838 |     pub fn print_diagnostic(&self, error: impl ErrorDiagnostic, colorize: bool) {
    |            ^^^^^^^^^^^^^^^^
help: provide the argument
    |
533 |         self.context.lock().unwrap().print_diagnostic(error, /* bool */)
    |                                                            ++++++++++++

error[E0716]: temporary value dropped while borrowed
   --> src/completer.rs:126:26
    |
126 |           let candidates = self
    |  __________________________^
127 | |             .context
128 | |             .lock()
129 | |             .unwrap()
    | |_____________________^ creates a temporary value which is freed while still in use
130 |               .get_completions_for(word_part, add_paren);
    |                                                         - temporary value is freed at the end of this statement
...
134 |               candidates
    |               ---------- borrow later used here
    |
note: this call may capture more lifetimes than intended, because Rust 2024 has adjusted the `impl Trait` lifetime capture rules
   --> src/completer.rs:126:26
    |
126 |           let candidates = self
    |  __________________________^
127 | |             .context
128 | |             .lock()
129 | |             .unwrap()
130 | |             .get_completions_for(word_part, add_paren);
    | |______________________________________________________^
help: if you can modify this crate, add a precise capturing bound to avoid overcapturing: `+ use<>`
   --> /usr/share/cargo/registry/numbat-1.24.0/src/lib.rs:268:10
    |
268 |     ) -> impl Iterator<Item = String> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider using a `let` binding to create a longer lived value
    |
126 ~         let binding = self
127 +             .context
128 +             .lock()
129 +             .unwrap();
130 ~         let candidates = binding
    |

error[E0521]: borrowed data escapes outside of method
  --> src/highlighter.rs:43:37
   |
34 |     fn highlight_candidate<'c>(
   |                            -- lifetime `'c` defined here
35 |         &self,
36 |         candidate: &'c str,
   |         --------- `candidate` is a reference that is only valid in the method body
...
43 |             Cow::Owned(ansi_format(&markup::identifier(candidate), false))
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |                                     |
   |                                     `candidate` escapes the method body here
   |                                     argument requires that `'c` must outlive `'static`

Some errors have detailed explanations: E0053, E0061, E0277, E0308, E0432, E0521, E0624, E0716.
For more information about an error, try `rustc --explain E0053`.
error: could not compile `numbat-cli` (bin "numbat") due to 17 previous errors

Caused by:
  process didn't exit successfully: `CARGO=/usr/bin/cargo CA [too-long-redacted] e2aa596e9/out` (exit status: 1)
dh_auto_test: error: /usr/share/cargo/bin/cargo build returned exit code 101
make: *** [debian/rules:3: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1151655#10
Date:
2026-10-22 19:21:25 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
rust-numbat-cli, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1151655@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Peter Michael Green <plugwash@debian.org> (supplier of updated rust-numbat-cli package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 22 Oct 2026 19:07:09 +0000
Source: rust-numbat-cli
Architecture: source
Version: 1.24.0-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Changed-By: Peter Michael Green <plugwash@debian.org>
Closes: 1117217 1151655
Changes:
 rust-numbat-cli (1.24.0-1) unstable; urgency=medium
 .
   * Team upload.
   * Package numbat-cli 1.24.0 from crates.io using debcargo 2.8.4 (Closes: #1151655, #1117217)
 .
   [ Maytham Alsudany ]
   * Package numbat-cli 1.18.0 from crates.io using debcargo 2.7.8
   * Stop patching chrono-tz dependency, upstream no longer depends on chrono-tz.
   * Stop patching colored, dirs and terminal-size dependencies, what upstream
     wants now matches what Debian has.
   * Update itertools and rustyline dependency patching to reflect new upstream
     and current situation in Debian.
Checksums-Sha1:
 491708dfcd1b7ee71507f860b0fb1bd9f6f24db7 2838 rust-numbat-cli_1.24.0-1.dsc
 7e36dfca34b48d2361c4244bfd88807f35328032 29992 rust-numbat-cli_1.24.0.orig.tar.gz
 ea0a149e7a258b051fb1254777a16cb65fe6ac05 3428 rust-numbat-cli_1.24.0-1.debian.tar.xz
 6a8e2677189d3dacc824017236ca98b3d5547c5e 8892 rust-numbat-cli_1.24.0-1_source.buildinfo
Checksums-Sha256:
 39ce23a66ed39001ad197896f9872592cd1d7252173c03b10993ff83d2cdcf5f 2838 rust-numbat-cli_1.24.0-1.dsc
 6edeb5447fff057a7a5ae348ab8e2d8017b4e17039f76da54b497456baa5488d 29992 rust-numbat-cli_1.24.0.orig.tar.gz
 b2d7efd12c3f1d9bf3b8e0b7772716a0f24b03cd876b2ed16d12767b488c4935 3428 rust-numbat-cli_1.24.0-1.debian.tar.xz
 d810ab0389debead1a1794949c89cfab4cc444333a8380df5db8757858e8e78f 8892 rust-numbat-cli_1.24.0-1_source.buildinfo
Files:
 cd3644458a1404dfbd548f12873f20bd 2838 math optional rust-numbat-cli_1.24.0-1.dsc
 2536f14a3cfd68e4c71d8f3e4372a303 29992 math optional rust-numbat-cli_1.24.0.orig.tar.gz
 e466b929c681d5134a2d66c78de17156 3428 math optional rust-numbat-cli_1.24.0-1.debian.tar.xz
 81c75a66701486e214d4f2cc28272efe 8892 math optional rust-numbat-cli_1.24.0-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCAAyFiEEU0DQATYMplbjSX63DEjqKnqP/XsFAmraXwoUHHBsdWd3YXNo
QGRlYmlhbi5vcmcACgkQDEjqKnqP/XspAg/+K6I8IO6WCc7kkxiA8d0F/2itKxlS
fKteFyWQrIrwqwR8vtnDpDKuc3oznuChRkbXo4EqcXe/DzKHprdbN8i51GOKFB+q
c1iIzeb5yNZ5dthxtfW43LhneLxFvQvaAwMWIebRu1519Ydldi5d3N83hCNFHwLW
DjKMf5T/niWco4YTnSF7klh4eR4iM7Nbd29uYo4Ndx4pBrfFvSmTUyvSHAZAYg1y
fru8LcqBgPAcyA6PAlB5WEdOkF8rgeWnF4wtIuYS2KAmMdY/sJCjJKWNF+O3v/2+
TCUr/RUkTP5djUcwyzmijX3LA1lphCwLKdjrOo3mqB3F/gWc3daTyzc9hjWif0g5
CWsSg/ZwlnGD6NdYIrCKegXp1VkRev7Wc31wM+ohn5lxa2mm+mT5+EBw9Z7UuyJI
rUhF7beFjK6PEUD1AqP4hDMmMYrM1iff2qMQu8DRODEfhCsac33qnc7PRHwvDgTc
mXXaXCuXd1in/fc85labWGAop2hDlXp4cZrpKEyUMrrCnMCglzDUbjBLzDA4jQmn
JCuMhUAcbJDpVKWnZCWz17kfWJMCzqf2F1IGKT7PSwH9EJFu4RSp/MZO5XNsOg9E
EL8seuUZI9kr2WrzPNK60jwKTS5lCrjmxkvUiUFYce4d149tLsgdxk/NY9uJyXyc
Tl+vTCYhJxVQDcY=
=LLsR
-----END PGP SIGNATURE-----