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

Rollup of 8 pull requests #83308

Merged
merged 22 commits into from
Mar 20, 2021
Merged

Rollup of 8 pull requests #83308

merged 22 commits into from
Mar 20, 2021

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

WaffleLapkin and others added 22 commits February 27, 2021 01:46
This commit adds `as_str` methods to `SplitWhitespace` and `SplitAsciiWhitespace`
str iterators. The methods return the remainder, similar to `as_str` methods on
`Chars` and other split iterators.

This commit also makes fields of some iterators `pub(crate)`.
`Vec` can hold up to `usize::MAX` ZST items, but `VecDeque` has a lower
limit to keep its raw capacity as a power of two, so we should check
that in `From<Vec<T>> for VecDeque<T>`. We can also simplify the
capacity check for the remaining non-ZST case.

Before this fix, the new test would fail on the length:

```
thread 'collections::vec_deque::tests::test_from_vec_zst_overflow' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `9223372036854775808`', library/alloc/src/collections/vec_deque/tests.rs:474:5
note: panic did not contain expected string
      panic message: `"assertion failed: `(left == right)`\n  left: `0`,\n right: `9223372036854775808`"`,
 expected substring: `"capacity overflow"`
```

That was a result of `len()` using a mask `& (size - 1)` with the
improper length. Now we do get a "capacity overflow" panic as soon as
that `VecDeque::from(vec)` is attempted.
This includes the description of the default `std` behavior and mentions
the `panic::set_hook()` function.
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
This is a continuation of rust-lang/llvm-project#96
to continue to make progress on updating Rust's support for SIMD
intrinsics on WebAssembly to the latest version of the specification.
…ed, r=Nemo157

Only build help popup when it's really needed

When working on rust-lang#79985, I realized that the help popup was built even when it wasn't needed. This PR only makes the help popup to be built when required.

r? `@jyn514`
…r, r=m-ou-se

Add `as_str` method for split whitespace str iterators

This PR adds `as_str` methods to `SplitWhitespace` and `SplitAsciiWhitespace`
str iterators. The methods return the remainder, similar to `as_str` methods on
`Chars` and other split iterators. This PR is a continuation of rust-lang#75265, which added `as_str` for all other str split iterators.

The feature gate for new methods is `#![feature(str_split_whitespace_as_str)]`.

`SplitWhitespace` and `SplitAsciiWhitespace` use iterators under the hood, so to implement `as_str` it's required to either
1. Make fields of some iterators `pub(crate)`
2. Add getter methods (like `into_inner`, `inner`, `inner_mut`...) to some (all) iterators
3. Completely rewrite `SplitWhitespace` and `SplitAsciiWhitespace`

This PR uses the 1. approach since it's easier to implement and requires fewer changes (and no changes to the public API). If you think that's not the right way, please, tell me.

r? `@m-ou-se`
Fix overflowing length in Vec<ZST> to VecDeque

`Vec` can hold up to `usize::MAX` ZST items, but `VecDeque` has a lower
limit to keep its raw capacity as a power of two, so we should check
that in `From<Vec<T>> for VecDeque<T>`. We can also simplify the
capacity check for the remaining non-ZST case.

Before this fix, the new test would fail on the length:

```
thread 'collections::vec_deque::tests::test_from_vec_zst_overflow' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `9223372036854775808`', library/alloc/src/collections/vec_deque/tests.rs:474:5
note: panic did not contain expected string
      panic message: `"assertion failed: `(left == right)`\n  left: `0`,\n right: `9223372036854775808`"`,
 expected substring: `"capacity overflow"`
```

That was a result of `len()` using a mask `& (size - 1)` with the
improper length. Now we do get a "capacity overflow" panic as soon as
that `VecDeque::from(vec)` is attempted.

Fixes rust-lang#80167.
…u-se,joshtriplett

Include output stream in `panic!()` documentation

Fixes rust-lang#83252.
Revert the second deprecation of collections::Bound

Per the review at rust-lang#82122 (comment) and the decision at https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/unavoidable.20breakage.20when.20deprecating.20an.20enum.3F , revert this small portion of rust-lang#82122 for the time being. This doesn't affect the other components of that patch, i.e. `intrinsics::drop_in_place` is still deprecated-for-real, and uses of `collections::Bound` remain removed from the repo.
…und, r=oli-obk

Mark early otherwise optimization unsound

r? `@oli-obk`
cc `@tmiasko`

Related to rust-lang#78496 and rust-lang#82905

Should I also bump this one to level 3 or 4 or given that is unsound it doesn't matter?.
Probably need to adjust some tests.
…viper

Update LLVM to bring in SIMD updates for WebAssembly

This is a continuation of rust-lang/llvm-project#96
to continue to make progress on updating Rust's support for SIMD
intrinsics on WebAssembly to the latest version of the specification.
…lay_to_tomorrow, r=petrochenkov

Do not ICE on ty::Error as an error must already have been reported

fixes rust-lang#83253
@rustbot rustbot added the rollup A PR which is a rollup label Mar 19, 2021
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 19, 2021

📌 Commit 51a29cb has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 19, 2021
@bors
Copy link
Contributor

bors commented Mar 19, 2021

⌛ Testing commit 51a29cb with merge 6bfbf0c...

@bors
Copy link
Contributor

bors commented Mar 20, 2021

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 6bfbf0c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 20, 2021
@bors bors merged commit 6bfbf0c into rust-lang:master Mar 20, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.