Closed calebsander closed 2 weeks ago
r? @kennytm
(rust-highfive has picked a reviewer for you, use r? to override)
Hey! It looks like you've submitted a new PR for the library teams!
If this PR contains changes to any rust-lang/rust
public library APIs then please comment with @rustbot label +T-libs-api -T-libs
to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.
Examples of T-libs-api
changes:
@rustbot label +T-libs-api -T-libs
I believe this does require an ACP (insta-stable new implementation of stable trait on stable type). Please create one if you haven't already. Link it here and then label this PR as S-waiting-on-ACP.
@rustbot label -S-waiting-on-review +S-waiting-on-author
@rustbot label +S-waiting-on-review -S-waiting-on-author
@rust-lang/libs-api: @rfcbot fcp merge
+ impl FromIterator<char> for Box<str>
+ impl FromIterator<&char> for Box<str>
+ impl FromIterator<&str> for Box<str>
+ impl FromIterator<String> for Box<str>
+ impl<A: Allocator> FromIterator<Box<str, A>> for Box<str>
+ impl FromIterator<Cow<'_, str>> for Box<str>
- impl FromIterator<Box<str>> for String
+ impl<A: Allocator> FromIterator<Box<str, A>> for String
- impl Extend<Box<str>> for String
+ impl<A: Allocator> Extend<Box<str, A>> for String
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed.
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
:bell: This is now entering its final comment period, as per the review above. :bell:
The final comment period, with a disposition to merge, as per the review above, is now complete.
As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.
This will be merged soon.
@bors r+
@bors ping
@bors ping
:sleepy: I'm awake I'm awake
@bors r+
:pushpin: Commit 55ba9e72a5929f6e795dc8e2b2215bf6fc176933 has been approved by dtolnay
It is now in the queue for this repository.
The job mingw-check
failed! Check out the build log: (web) (plain)
@bors r-
https://github.com/time-rs/time/blob/v0.3.34/time/src/format_description/parse/mod.rs#L83-L86
pub fn parse_owned(...) -> Result<OwnedFormatItem, InvalidFormatDescription> {
...
let format_items: impl Iterator<Item = Result<Item<'_>, Error>> = /*...*/;
let items = format_items
.map(|res| res.map(Into::into))
.collect::<Result<Box<_>, _>>()?;
Ok(items.into())
}
error[E0282]: type annotations needed for `Box<_>`
--> time-0.3.34/src/format_description/parse/mod.rs:83:9
83 | let items = format_items
| ^^^^^
...
86 | Ok(items.into())
| ---- type must be known at this point
|
help: consider giving `items` an explicit type, where the placeholders `_` are specified
|
83 | let items: Box<_> = format_items
Previously, it inferred impl<T> From<T> for T
for the first Into conversion (it's redundant; you can comment the line containing the two maps, and it still compiles), and impl From<Box<[Item<'_>]>> for OwnedFormatItem
for the second Into conversion.
I tested that the addition of just a single impl FromIterator<char> for Box<str>
is enough to make it fail as above.
Yeah, I guess things tend to break if they aren't tested for 2 years :)
Thanks for looking into the failure, @dtolnay! What do you recommend as next steps here? Looks like you've already gotten a fix merged to time
: https://github.com/time-rs/time/pull/671. Should I update the version rustc
is depending on?
This is blocked on a time
release for now, then maybe a crater run.
The time
fix got published in 0.3.35. @calebsander, could you please open a separate PR that just updates the version of time
in this repo's Cargo.lock? cargo +nightly update time
. That should fix the failure from https://github.com/rust-lang/rust/pull/99969#issuecomment-2000296785
According to rg 'name = "time"' -A1
there is also an old time
in src/tools/rust-analyzer/Cargo.lock. I believe we need a PR to https://github.com/rust-lang/rust-analyzer, and then that will get synced back here in a PR that looks like https://github.com/rust-lang/rust/pull/124202.
Thanks for the heads up, @dtolnay! I posted #124736 to upgrade the version of the time
dependency.
As far as I can tell, the version of time
used by rust-analyzer
doesn't need an update because it doesn't have any optional features enabled:
time = { version = "0.3", default-features = false }
The time::format_description
module (where the compilation error occurred) is conditionally compiled only if the formatting
or parsing
features are requested:
#[cfg(any(feature = "formatting", feature = "parsing"))]
pub mod format_description;
@bors r+ rollup=iffy
:pushpin: Commit c92c22826015168581f82e8b0f870a8cef9209b9 has been approved by dtolnay
It is now in the queue for this repository.
:hourglass: Testing commit c92c22826015168581f82e8b0f870a8cef9209b9 with merge ce8c2dcd0306dc11e1f54d5aebb6ed30691bd01b...
The job aarch64-gnu
failed! Check out the build log: (web) (plain)
:broken_heart: Test failed - checks-actions
Can't tell what failed.
@bors retry
:hourglass: Testing commit c92c22826015168581f82e8b0f870a8cef9209b9 with merge bfa3635df920454cdf03f6d268dfaac769375df3...
:sunny: Test successful - checks-actions Approved by: dtolnay Pushing bfa3635df920454cdf03f6d268dfaac769375df3 to master...
Finished benchmarking commit (bfa3635df920454cdf03f6d268dfaac769375df3): comparison URL.
@rustbot label: -perf-regression
This benchmark run did not return any relevant results for this metric.
This benchmark run did not return any relevant results for this metric.
This benchmark run did not return any relevant results for this metric.
Bootstrap: 667.801s -> 671.223s (0.51%) Artifact size: 316.10 MiB -> 316.05 MiB (-0.01%)
Box<[T]>
implementsFromIterator<T>
usingVec<T>
+into_boxed_slice()
. Add analogousFromIterator
implementations forBox<str>
matching the current implementations forString
. Remove theGlobal
allocator requirement forFromIterator<Box<str>>
too.ACP: https://github.com/rust-lang/libs-team/issues/196