Skip to content

[BUG] failed to build against rust 1.89.0 with 0.3.6 release #163

@chenrui333

Description

@chenrui333

Describe the bug
seeing some regression build failure with 0.3.6 release against rust 1.89.0

  error: hiding a lifetime that's elided elsewhere is confusing
     --> src/lib.rs:147:38
      |
  147 | fn args(tool: Tool, examples: Option<&str>) -> ArgMatches {
      |                                      ^^^^      ---------- the same lifetime is hidden here
      |                                      |
      |                                      the lifetime is elided here
      |
      = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
  note: the lint level is defined here
     --> src/lib.rs:1:9
      |
  1   | #![deny(warnings)]
      |         ^^^^^^^^
      = note: `#[deny(mismatched_lifetime_syntaxes)]` implied by `#[deny(warnings)]`
  help: use `'_` for type paths
      |
  147 | fn args(tool: Tool, examples: Option<&str>) -> ArgMatches<'_> {
      |                                                          ++++
  
  error: hiding a lifetime that's elided elsewhere is confusing
    --> src/postprocess.rs:10:24
     |
  10 | pub fn demangle(bytes: &[u8]) -> Cow<[u8]> {
     |                        ^^^^^     --------- the same lifetime is hidden here
     |                        |
     |                        the lifetime is elided here
     |
     = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
  help: use `'_` for type paths
     |
  10 | pub fn demangle(bytes: &[u8]) -> Cow<'_, [u8]> {
     |                                      +++
  
  error: hiding a lifetime that's elided elsewhere is confusing
    --> src/postprocess.rs:26:20
     |
  26 | pub fn size(bytes: &[u8]) -> Cow<[u8]> {
     |                    ^^^^^     --------- the same lifetime is hidden here
     |                    |
     |                    the lifetime is elided here
     |
     = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
  help: use `'_` for type paths
     |
  26 | pub fn size(bytes: &[u8]) -> Cow<'_, [u8]> {
     |                                  +++
  
  error: could not compile `cargo-binutils` (lib) due to 3 previous errors

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/17679784794/job/50251048292#step:4:168

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions