Skip to content

regression: type annotations needed for Box<_> #127343

Closed as not planned
9999years/git-gr
#66

Description

@Mark-Simulacrum

Mostly reverse-dependencies of the time crate (before time-rs/time@5b0c627, released in 0.3.35). My sense is there's probably nothing to do here, but lots of crates have older version of time in Cargo.lock. Nominating for libs-api to approve the wide spectrum of regressions. (Caused by #99969).

[INFO] [stdout] error[E0282]: type annotations needed for `Box<_>`
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.20/src/format_description/parse/mod.rs:83:9
[INFO] [stdout]    |
[INFO] [stdout] 83 |     let items = format_items
[INFO] [stdout]    |         ^^^^^
[INFO] [stdout] ...
[INFO] [stdout] 86 |     Ok(items.into())
[INFO] [stdout]    |              ---- type must be known at this point
[INFO] [stdout]    |
[INFO] [stdout] help: consider giving `items` an explicit type, where the placeholders `_` are specified
[INFO] [stdout]    |
[INFO] [stdout] 83 |     let items: Box<_> = format_items
[INFO] [stdout]    |              ++++++++
[INFO] [stdout] 
[INFO] [stdout] 

Activity

  1. added this to the 1.80.0 milestone on Jul 4, 2024
  2. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 4, 2024
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 4, 2024
  4. dtolnay commented on Jul 9, 2024

    @dtolnay
    Member

    We discussed this regression in today's @rust-lang/libs-api team meeting, and agree there's nothing to change on Rust's end. Those repos that have an old version of time in a lockfile will need to update that.

    I would love if someone were interested in cataloguing all the "type annotations needed" type inference breakages resulting from the addition of a trait impl through the history of the standard library, and think about building static analysis that could forewarn about code that is at risk of becoming ambiguous (e.g. a += b.as_ref()). It may be something that widely used crates want to enforce in CI.

  5. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Jul 10, 2024
  6. cyqsimon commented on Jul 26, 2024

    @cyqsimon
    Contributor

    Backward compatibility is difficult =(

  7. 195 remaining items

  8. added a commit that references this issue on Oct 31, 2024
  9. added a commit that references this issue on Dec 4, 2024
  10. added 3 commits that reference this issue on Jan 9, 2025
  11. added a commit that references this issue on Feb 19, 2025
  12. added a commit that references this issue on Jun 4, 2025
  13. added a commit that references this issue on Aug 16, 2026
    01b1482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-api[DEPRECATED; DO NOT USE]regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions