| Age | Commit message (Collapse) | Author | Lines |
|
const_trait in conjunction with specialization was
deemed not ready for usage in this scenario. So
instead a two-stage trait specialization approach
is used. This approach is likely worse for
compile-times. Future work that enables
const_trait can revert back to the previous
version as outlined in the comment marked
FIXME(effects).
|
|
|
|
|
|
|
|
|
|
Fix wrong `assert_unsafe_precondition` message for `core::ptr::copy`
A small fix in the `assert_unsafe_precondition` message for `core::ptr::copy` as described by https://github.com/rust-lang/rust/issues/126400 .
fixes #126400
|
|
Fix wording in {checked_}next_power_of_two
Small documentation update
|
|
Uplift `structural_traits.rs` into the new trait solver
Self-explanatory. I will leave some comments inline regarding design decisions.
|
|
|
|
|
|
add tracking issue for is_none_or
This was forgotten in https://github.com/rust-lang/rust/pull/126328.
Cc https://github.com/rust-lang/rust/issues/126383
|
|
Simplify `try_*`'s signature on `Iterator`
Inspired by https://github.com/rust-lang/rust/pull/126249#issuecomment-2161859295.
r? `@scottmcm`
(Seems there's no need to explicitly use `<Self as Iterator>::Item`? I only find this occurrence across the whole file.)
|
|
|
|
|
|
Add Option::is_none_or
ACP: https://github.com/rust-lang/libs-team/issues/212
|
|
|
|
Bump stage0 to 1.80.0
r? `@Mark-Simulacrum`
|
|
|
|
Follow up to splitting core's PanicInfo and std's PanicInfo
|
|
Simplify provider api to improve llvm ir
This PR seeks to resolve the last concern in https://github.com/rust-lang/rust/issues/99301#issuecomment-1699427740
We resolve the issue by moving the type_id to be stored in the `Request` itself rather than being accessed through the `Erased` trait, letting the compiler infer that the value of the type id will not change between lookups.
### LLVM Codegen
**Before**
```
; <provider_test::MyError as core::error::Error>::provide
; Function Attrs: nonlazybind uwtable
define void `@"_ZN61_$LT$provider_test..MyError$u20$as$u20$core..error..Error$GT$7provide17hd9c9de412063aa73E"(ptr` noalias nocapture noundef nonnull readonly align 1 %self, ptr noundef nonnull align 1 %request.0, ptr noalias nocapture noundef readonly align 8 dereferenceable(32) %request.1) unnamed_addr #0 personality ptr `@rust_eh_personality` {
start:
%0 = getelementptr inbounds i8, ptr %request.1, i64 24
%self.1.val.i = load ptr, ptr %0, align 8
%1 = tail call { i64, i64 } %self.1.val.i(ptr noundef nonnull align 1 %request.0), !noalias !15
%2 = extractvalue { i64, i64 } %1, 0
%3 = extractvalue { i64, i64 } %1, 1
%_18.i.i = icmp ne i64 %2, 1101338453689927725
%_2.i.i = icmp ne i64 %3, 472224167662714873
%or.cond.i.not.i = select i1 %_18.i.i, i1 true, i1 %_2.i.i
br i1 %or.cond.i.not.i, label %_ZN4core5error7Request7provide17h8f8125d2543333e0E.exit, label %bb2.i
```
**After**
```
; <provider_test::MyError as provider_test::Error>::provide
; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite) uwtable
define void `@"_ZN63_$LT$provider_test..MyError$u20$as$u20$provider_test..Error$GT$7provide17h5bbf091795a6d359E"(ptr` noalias nocapture noundef nonnull readonly align 1 %self, ptr nocapture noundef nonnull align 8 %request.0, ptr noalias nocapture noundef readonly align 8 dereferenceable(24) %request.1) unnamed_addr #2 personality ptr `@rust_eh_personality` {
start:
%_19.i = load i64, ptr %request.0, align 8, !noalias !3, !noundef !3
switch i64 %_19.i, label %_ZN13provider_test7Request7provide17heb3ee140962e3b2fE.exit [
i64 7665305208997882008, label %bb12.i
i64 7050211241160863540, label %bb12.i3
i64 9112786072622981063, label %bb12.i11
]
```
|
|
|
|
|
|
|
|
|
|
Rollup of 16 pull requests
Successful merges:
- #123374 (DOC: Add FFI example for slice::from_raw_parts())
- #124514 (Recommend to never display zero disambiguators when demangling v0 symbols)
- #125978 (Cleanup: HIR ty lowering: Consolidate the places that do assoc item probing & access checking)
- #125980 (Nvptx remove direct passmode)
- #126187 (For E0277 suggest adding `Result` return type for function when using QuestionMark `?` in the body.)
- #126210 (docs(core): make more const_ptr doctests assert instead of printing)
- #126249 (Simplify `[T; N]::try_map` signature)
- #126256 (Add {{target}} substitution to compiletest)
- #126263 (Make issue-122805.rs big endian compatible)
- #126281 (set_env: State the conclusion upfront)
- #126286 (Make `storage-live.rs` robust against rustc internal changes.)
- #126287 (Update a cranelift patch file for formatting changes.)
- #126301 (Use `tidy` to sort crate attributes for all compiler crates.)
- #126305 (Make PathBuf less Ok with adding UTF-16 then `into_string`)
- #126310 (Migrate run make prefer rlib)
- #126314 (fix RELEASES: we do not support upcasting to auto traits)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Simplify `[T; N]::try_map` signature
People keep making fun of this signature for being so gnarly.
Associated type bounds admit a much simpler scribbling.
r? ````@scottmcm````
|
|
docs(core): make more const_ptr doctests assert instead of printing
improves on #124669
|
|
DOC: Add FFI example for slice::from_raw_parts()
For some discussion, see https://users.rust-lang.org/t/missing-guidance-on-converting-ffi-ptr-length-to-slice/106048
See also #120608.
|
|
This reverts commit 1e4bde1cb9736ad4b8d3b95fbfe1533015c1d165, reversing
changes made to 4ee97fc3dbcddc9d69701e346a1be9e0b66855a7.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It no longer needs to be public.
|
|
|
|
|
|
|
|
|
|
|
|
People keep making fun of this signature for being so gnarly.
Associated type bounds lend it a much simpler scribbling.
ChangeOutputType can also come along for the ride.
|
|
|
|
Fix `NonZero` doctest inconsistencies
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
`NonZero`'s doctests contain both `?` and `.unwrap()` with no obvious reason for the difference, so this changes all of them to `?`. Also removes an explicit `std::num::NonZero`.
|
|
Clarify that they always have the same alignment as u8/i8, (unlike other atomic types).
Clarify in from_ptr that alignment is never an issue because of this.
|
|
Clarify that alignment is never an issue, since `align_of::<AtomicBool>() == 1`.
|
|
fixes #124669
|