Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mark-Simulacrum opened this issue Jul 4, 2024 · 25 comments · Fixed by 9999years/git-gr#66
Open

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

Mark-Simulacrum opened this issue Jul 4, 2024 · 25 comments · Fixed by 9999years/git-gr#66
Labels
regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

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] 
@Mark-Simulacrum Mark-Simulacrum added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. I-libs-api-nominated Nominated for discussion during a libs-api team meeting. labels Jul 4, 2024
@Mark-Simulacrum Mark-Simulacrum added this to the 1.80.0 milestone Jul 4, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 4, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 4, 2024
@dtolnay
Copy link
Member

dtolnay commented Jul 9, 2024

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.

@dtolnay dtolnay closed this as completed Jul 9, 2024
@apiraino apiraino removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. I-libs-api-nominated Nominated for discussion during a libs-api team meeting. labels Jul 10, 2024
bowlofeggs added a commit to bowlofeggs/bottom that referenced this issue Jul 26, 2024
Time 0.3.27 fails to build with Rust 1.80.0, released today[0]. This
updates time to 0.3.36, which successfully builds with Rust 1.80.0.

[0] rust-lang/rust#127343

Fixes ClementTsang#1500

Signed-off-by: Randy Barlow <[email protected]>
bowlofeggs added a commit to bowlofeggs/gentoo that referenced this issue Jul 26, 2024
The version of time that bottom 0.9.6 uses does not build with Rust
1.80.0[0][1]. This bumps time to 0.3.36 to address the issue.

[0] ClementTsang/bottom#1500
[1] rust-lang/rust#127343

Signed-off-by: Randy Barlow <[email protected]>
bowlofeggs added a commit to bowlofeggs/gentoo that referenced this issue Jul 26, 2024
The version of time that bottom 0.9.6 uses does not build with Rust
1.80.0[0][1]. This bumps time to 0.3.36 to address the issue.

[0] ClementTsang/bottom#1500
[1] rust-lang/rust#127343

Signed-off-by: Randy Barlow <[email protected]>
@cyqsimon
Copy link
Contributor

Backward compatibility is difficult =(

@ayushgupta0610
Copy link

So what exactly is the solution to resolve this?
image

@BurntSushi
Copy link
Member

@ayushgupta0610 Answer is here: #127343 (comment)

andrewhsu pushed a commit to redpanda-data/redpanda that referenced this issue Sep 24, 2024
Rust `1.80.0` broke backwards compatibility with older versions of the
`time` crate: rust-lang/rust#127343

Users with an updated compiler will be unable to build `rp-storage-tool`
with the previous dependency versions.

Update `Cargo.lock` with updated dependencies generated from
`cargo build --release` and Rust compiler version
`rustc 1.80.1 (3f5fd8dd4 2024-08-06)`.

(cherry picked from commit c58e277)
andrewhsu pushed a commit to redpanda-data/redpanda that referenced this issue Sep 24, 2024
Rust `1.80.0` broke backwards compatibility with older versions of the
`time` crate: rust-lang/rust#127343

Users with an updated compiler will be unable to build `rp-storage-tool`
with the previous dependency versions.

Update `Cargo.lock` with updated dependencies generated from
`cargo build --release` and Rust compiler version
`rustc 1.80.1 (3f5fd8dd4 2024-08-06)`.

(cherry picked from commit c58e277)
andrewhsu pushed a commit to redpanda-data/redpanda that referenced this issue Sep 24, 2024
Rust `1.80.0` broke backwards compatibility with older versions of the
`time` crate: rust-lang/rust#127343

Users with an updated compiler will be unable to build `rp-storage-tool`
with the previous dependency versions.

Update `Cargo.lock` with updated dependencies generated from
`cargo build --release` and Rust compiler version
`rustc 1.80.1 (3f5fd8dd4 2024-08-06)`.

(cherry picked from commit c58e277)
andrewhsu pushed a commit to redpanda-data/redpanda that referenced this issue Sep 25, 2024
Rust `1.80.0` broke backwards compatibility with older versions of the
`time` crate: rust-lang/rust#127343

Users with an updated compiler will be unable to build `rp-storage-tool`
with the previous dependency versions.

Update `Cargo.lock` with updated dependencies generated from
`cargo build --release` and Rust compiler version
`rustc 1.80.1 (3f5fd8dd4 2024-08-06)`.

(cherry picked from commit c58e277)
andrewhsu pushed a commit to redpanda-data/redpanda that referenced this issue Sep 25, 2024
Rust `1.80.0` broke backwards compatibility with older versions of the
`time` crate: rust-lang/rust#127343

Users with an updated compiler will be unable to build `rp-storage-tool`
with the previous dependency versions.

Update `Cargo.lock` with updated dependencies generated from
`cargo build --release` and Rust compiler version
`rustc 1.80.1 (3f5fd8dd4 2024-08-06)`.

(cherry picked from commit c58e277)
andrewhsu pushed a commit to redpanda-data/redpanda that referenced this issue Sep 25, 2024
Rust `1.80.0` broke backwards compatibility with older versions of the
`time` crate: rust-lang/rust#127343

Users with an updated compiler will be unable to build `rp-storage-tool`
with the previous dependency versions.

Update `Cargo.lock` with updated dependencies generated from
`cargo build --release` and Rust compiler version
`rustc 1.80.1 (3f5fd8dd4 2024-08-06)`.

(cherry picked from commit c58e277)
andrewhsu pushed a commit to redpanda-data/redpanda that referenced this issue Sep 25, 2024
Rust `1.80.0` broke backwards compatibility with older versions of the
`time` crate: rust-lang/rust#127343

Users with an updated compiler will be unable to build `rp-storage-tool`
with the previous dependency versions.

Update `Cargo.lock` with updated dependencies generated from
`cargo build --release` and Rust compiler version
`rustc 1.80.1 (3f5fd8dd4 2024-08-06)`.

(cherry picked from commit c58e277)
Aloxaf pushed a commit to Aloxaf/silicon that referenced this issue Sep 26, 2024
[Rust 1.80.0 broke `time-rs` <0.3.35][1]. We have it locked to v0.3.34
which is affected.

Running `cargo update time` fixes this issue.

[1]: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Sep 26, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Sep 28, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Sep 28, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Sep 30, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Sep 30, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Sep 30, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Oct 1, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
reckenrode pushed a commit to reckenrode/nixpkgs that referenced this issue Oct 2, 2024
Required to build with Rust 1.80.

Link: rust-lang/rust#127343
@Mark-Simulacrum Mark-Simulacrum added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Oct 11, 2024
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 11, 2024
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.