-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 8 pull requests #102627
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rollup of 8 pull requests #102627
Conversation
The `from_str` implementation from the example had an `unwrap` that would make it panic on invalid input strings. Instead of panicking, it nows returns an error to better reflect the intented behavior of the `FromStr` trait.
E0045: Use a stable non-C ABI instead E0092: Use an atomic intrinsic that actually exists E0161: Don't use box_syntax E0579: Format ranges in the rustfmt style E0622: Use the rustfmt style E0743: Remove feature gate as it's not needed
…e-trait-bounds, r=GuillaumeGomez rustdoc: re-sugar more cross-crate trait bounds Previously, we would only ever re-sugar cross-crate predicates like `Type: Trait, <Type as Trait>::Name == Rhs` to `Type: Trait<Name = Rhs>` if the `Type` was a generic parameter like `Self` or `T`. With this PR, `Type` can be any type. Most notably, this means that we now re-sugar predicates involving associated types (where `Type` is of the form `Self::Name`) which are then picked up by the pre-existing logic that re-sugars them into bounds. As a result of that, the associated type `IntoIter` of `std`'s `IntoIterator` trait (re-exported from `core`) is no longer rendered as: ```rust type IntoIter: Iterator where <Self::IntoIter as Iterator>::Item == Self::Item; ``` but as one would expect: `type IntoIter: Iterator<Item = Self::Item>;`. Cross-crate closure bounds like `F: Fn(i32) -> bool` are now also rendered properly (previously, the return type (`Self::Output`) would not be rendered and we would show the underlying equality predicate). Fixes rust-lang#77763. Fixes rust-lang#84579. Fixes rust-lang#102142. `@rustbot` label T-rustdoc A-cross-crate-reexports r? rustdoc
…triplett Improve `FromStr` example The `from_str` implementation from the example had an `unwrap` that would make it panic on invalid input strings. Instead of panicking, it nows returns an error to better reflect the intented behavior of the `FromStr` trait.
…vidtwco Avoid ICE in printing RPITIT type Fixes rust-lang#102571
…m_ptr_range, r=joshtriplett Improve documentation of `slice::{from_ptr_range, from_ptr_range_mut}` Document panic conditions (`T` is a ZST) and sync docs of shared/unique version. cc `@wx-csy`
…iler-errors Fix ICE rust-lang#101739 Fixes a part of rust-lang#101739 This cannot cover the following case. It causes `too many args provided` error and obligation does not have references error. I want your advice to solve the following cases as well in this pull request or a follow-up. ```rust #![crate_type = "lib"] #![feature(transmutability)] #![allow(dead_code, incomplete_features, non_camel_case_types)] mod assert { use std::mem::BikeshedIntrinsicFrom; pub fn is_transmutable< Src, Dst, Context, const ASSUME_ALIGNMENT: bool, const ASSUME_LIFETIMES: bool, const ASSUME_VALIDITY: bool, const ASSUME_VISIBILITY: bool, >() where Dst: BikeshedIntrinsicFrom< Src, Context, ASSUME_ALIGNMENT, ASSUME_LIFETIMES, ASSUME_VALIDITY, ASSUME_VISIBILITY, >, {} } fn via_const() { struct Context; #[repr(C)] struct Src; #[repr(C)] struct Dst; const FALSE: bool = false; assert::is_transmutable::<Src, Dst, Context, FALSE, FALSE, FALSE, FALSE>(); } ```
…es, r=compiler-errors Cleanup some error code explanations E0045: Use a stable non-C ABI instead E0092: Use an atomic intrinsic that actually exists E0161: Don't use box_syntax E0579: Format ranges in the rustfmt style E0622: Use the rustfmt style E0743: Remove feature gate as it's not needed
…compiler-errors `HirId` for `deferred_transmute_checks` directly interacting with spans is annoying ✨
… r=notriddle Migrate `.stab` elements style to CSS variables Part of rust-lang#98460. There should be no UI changes. r? `@notriddle`
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 33d351972a In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (0922559): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Successful merges:
FromStr
example #102569 (ImproveFromStr
example)slice::{from_ptr_range, from_ptr_range_mut}
#102607 (Improve documentation ofslice::{from_ptr_range, from_ptr_range_mut}
)Const
must be an ADT #101739)HirId
fordeferred_transmute_checks
#102617 (HirId
fordeferred_transmute_checks
).stab
elements style to CSS variables #102620 (Migrate.stab
elements style to CSS variables)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup