-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 12 pull requests #89608
Rollup of 12 pull requests #89608
Conversation
I intend these changes to be helpful to readers who are not yet familiar with the quirks of floating-point numbers. Additionally, I felt it was misleading to describe `Nan` as being the result of division by zero, since most divisions by zero (except for 0/0) produce `Infinite` floats, so I moved that remark to the `Infinite` variant with adjustment. The first sentence of the `Nan` documentation is copied from `f32`; I followed the example of the `f64` documentation by referring to `f32` for general concepts, rather than duplicating the text.
Co-authored-by: kennytm <kennytm@gmail.com>
Co-authored-by: kennytm <kennytm@gmail.com>
- Avoid multiple <h1>s on a page. - The <h#> tags should follow a semantic hierarchy. - Cap at h6 (no h7)
to solve rust-lang#87528 build.
Made the fields of VecDeque's IterMut private by creating a IterMut::new(...) function to create a new instance of IterMut and migrating usage to use IterMut::new(...).
Fixes rust-lang#67007 Currently, a 'borrowed data escapes' error does not mention the specific lifetime involved (except indirectly through a suggestion about adding a lifetime bound). We now explain the specific lifetime relationship that failed to hold, which improves otherwise vague error messages.
…ennytm Add functions to add unsigned and signed integers This PR adds methods to unsigned integers to add signed integers with good overflow semantics under `#![feature(mixed_integer_ops)]`. The added API is: ```rust // `uX` is `u8`, `u16`, `u32`, `u64`,`u128`, `usize` impl uX { pub const fn checked_add_signed(self, iX) -> Option<Self>; pub const fn overflowing_add_signed(self, iX) -> (Self, bool); pub const fn saturating_add_signed(self, iX) -> Self; pub const fn wrapping_add_signed(self, iX) -> Self; } impl iX { pub const fn checked_add_unsigned(self, uX) -> Option<Self>; pub const fn overflowing_add_unsigned(self, uX) -> (Self, bool); pub const fn saturating_add_unsigned(self, uX) -> Self; pub const fn wrapping_add_unsigned(self, uX) -> Self; pub const fn checked_sub_unsigned(self, uX) -> Option<Self>; pub const fn overflowing_sub_unsigned(self, uX) -> (Self, bool); pub const fn saturating_sub_unsigned(self, uX) -> Self; pub const fn wrapping_sub_unsigned(self, uX) -> Self; } ``` Maybe it would be interesting to also have `add_signed` that panics in debug and wraps in release ?
Expand documentation for `FpCategory`. I intend these changes to be helpful to readers who are not yet familiar with the quirks of floating-point numbers. Additionally, I felt it was misleading to describe `Nan` as being the result of division by zero, since most divisions by zero (except for 0/0) produce `Infinite` floats, so I moved that remark to the `Infinite` variant with adjustment. The first sentence of the `Nan` documentation is copied from `f32`; I followed the example of the `f64` documentation by referring to `f32` for general concepts, rather than duplicating the text. ---- I considered making similar changes to the documentation of the `is_*` methods of floats, but decided that that was a much larger and trickier problem; here, each of the variants' descriptions can be expected to be read in context of being mutually exclusive with the others.
…te, r=joshtriplett refactor: VecDeques Drain fields to private Made the fields of VecDeque's Drain private by creating a Drain::new(...) function to create a new instance of Drain and migrating usage to use Drain::new(...).
…ivate, r=joshtriplett refactor: make VecDeque's IterMut fields module-private, not just crate-private Made the fields of VecDeque's IterMut private by creating a IterMut::new(...) function to create a new instance of IterMut and migrating usage to use IterMut::new(...).
…davidtwco Note specific regions involved in 'borrowed data escapes' error Fixes rust-lang#67007 Currently, a 'borrowed data escapes' error does not mention the specific lifetime involved (except indirectly through a suggestion about adding a lifetime bound). We now explain the specific lifetime relationship that failed to hold, which improves otherwise vague error messages.
…laumeGomez librustdoc: Use correct heading levels. Closes rust-lang#89309 This fixes the `<h#>` header tags throughout the docs to reflect a semantic hierarchy. - I ran a script to manually check that we don't have any files with multiple `<h1>` tags. - Also checked that we never incorrectly nest e.g. a `<h2>` under an `<h3>`. - I also spot-checked a bunch of pages (`trait.Read`, `enum.Ordering`, `primitive.isize`, `trait.Iterator`).
Fix suggestion to borrow when casting from pointer to reference Fixes rust-lang#89497.
…d, r=dtolnay library std, libc dependency update to solve rust-lang#87528 build.
Add a test for generic_const_exprs Test that const_eval_resolve evaluates consts with unused inference vars in substs r? ``@lcnr``
fix: alloc-optimisation is only for rust llvm As discussed at the bottom of rust-lang#83485. On a separate note I'll take this chance ask, is it worth pulling in that patch (to recognise `__rust_dealloc`) into Debian's system LLVM? The main factors for us to consider would be (1) is the optimisation significant and (2) is there not any significant negative impact to non-rust packages that use LLVM.
@bors p=5 r+ rollup=never |
📌 Commit f31c805 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
@bors treeclosed- |
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@0eabf25. Direct link to PR: <rust-lang/rust#89608> 💔 miri on windows: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung). 💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung).
Finished benchmarking commit (0eabf25): comparison url. Summary: This change led to moderate relevant regressions 😿 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression |
A large number of Apart from that, biggest changes were to Seems hard to believe from the listed PR's that this isn't just noise, though (unless the overhead is coming from improvements to diagnostics?) |
@rustbot label: +perf-regression-triaged |
After discussing with other people in perf-triage team, I was advised that the changes to externs might be real regressions. (I haven't decided the degree of regression is worth looking into yet, but I want the metadata to at least reflect my current understanding of the performance implications of this PR.) @rustbot label: +perf-regression |
or rather @rustbot label: -perf-regression-triaged |
Successful merges:
FpCategory
. #88523 (Expand documentation forFpCategory
.)std::thread::available_conccurrency
tostd::thread::available_parallelism
#89324 (Renamestd::thread::available_conccurrency
tostd::thread::available_parallelism
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup