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

Delete identity conversion in format_description::parse_owned #671

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

dtolnay
Copy link
Contributor

@dtolnay dtolnay commented Mar 16, 2024

We have format_items: impl Iterator<Item = Result<Item<'_>, Error>> and items: Box<[Item<'_>]>.

The Into::into on the deleted line is resolving to impl<T> From<T> for T with T=Item which is not load-bearing.

The into on the line after this is impl From<Box<[Item<'_>]>> for OwnedFormatItem.

@jhpratt
Copy link
Member

jhpratt commented Mar 16, 2024

Not sure how I missed this when it was committed. Presumably I used it for debugging at some point. In any situation, thanks!

@jhpratt jhpratt enabled auto-merge (squash) March 16, 2024 03:42
@jhpratt jhpratt added the C-cleanup Category: cleanup of existing code label Mar 16, 2024
@jhpratt jhpratt merged commit 5b0c627 into time-rs:main Mar 16, 2024
19 of 20 checks passed
@dtolnay dtolnay deleted the intointo branch March 16, 2024 19:50
calebsander added a commit to calebsander/rust that referenced this pull request May 5, 2024
This ensures the version of time used in rustc includes this change:
time-rs/time#671.
This fix is a necessary prerequisite for rust-lang#99969,
which adds FromIterator implementations for Box<str>.
Previously, time had an Into::into that resolved to the identity impl
followed by a collect::<Result<Box<_>, _>>().
With the new FromIterator implementations for Box<str>,
the Into::into resolution is ambiguous and time fails to compile.
The fix removes the identity Into::into conversion,
allowing time to compile with the new FromIterator implementations.
This version of time also matches what cargo recently switched to
in rust-lang/cargo#13834.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 5, 2024
…r=dtolnay

compiler: upgrade time from 0.3.34 to 0.3.36

This ensures the version of `time` used in `rustc` includes this change: time-rs/time#671.
This fix is a necessary prerequisite for rust-lang#99969, which adds `FromIterator` implementations for `Box<str>`. Previously, `time` had an `Into::into` that resolved to the identity impl followed by a `collect::<Result<Box<_>, _>>()`. With the new FromIterator implementations for Box<str>, the Into::into resolution is ambiguous and time fails to compile. Thanks to `@dtolnay` for the analysis in rust-lang#99969 (comment).
The `time` fix removes the identity `Into::into` conversion, allowing `time` to compile with the new `FromIterator` implementations. This version of `time` also matches what `cargo` recently switched to in rust-lang/cargo#13834.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 5, 2024
Rollup merge of rust-lang#124736 - calebsander:feature/upgrade-time, r=dtolnay

compiler: upgrade time from 0.3.34 to 0.3.36

This ensures the version of `time` used in `rustc` includes this change: time-rs/time#671.
This fix is a necessary prerequisite for rust-lang#99969, which adds `FromIterator` implementations for `Box<str>`. Previously, `time` had an `Into::into` that resolved to the identity impl followed by a `collect::<Result<Box<_>, _>>()`. With the new FromIterator implementations for Box<str>, the Into::into resolution is ambiguous and time fails to compile. Thanks to `@dtolnay` for the analysis in rust-lang#99969 (comment).
The `time` fix removes the identity `Into::into` conversion, allowing `time` to compile with the new `FromIterator` implementations. This version of `time` also matches what `cargo` recently switched to in rust-lang/cargo#13834.
m1sk9 added a commit to m1sk9/babyrite that referenced this pull request Aug 3, 2024
hhoffstaette added a commit to hhoffstaette/portage that referenced this pull request Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: cleanup of existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants