-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 #95835
Rollup of 8 pull requests #95835
Conversation
…casts. ALL OF THEM
… test it * split `fuzzy_provenance_casts` into a ptr2int and a int2ptr lint * feature gate both lints * update documentation to be more realistic short term * add tests for these lints
Relevant commit messages from squashed history in order: Add initial version of ThinBox update test to actually capture failure swap to middle ptr impl based on matthieu-m's design Fix stack overflow in debug impl The previous version would take a `&ThinBox<T>` and deref it once, which resulted in a no-op and the same type, which it would then print causing an endless recursion. I've switched to calling `deref` by name to let method resolution handle deref the correct number of times. I've also updated the Drop impl for good measure since it seemed like it could be falling prey to the same bug, and I'll be adding some tests to verify that the drop is happening correctly. add test to verify drop is behaving add doc examples and remove unnecessary Pointee bounds ThinBox: use NonNull ThinBox: tests for size Apply suggestions from code review Co-authored-by: Alphyr <[email protected]> use handle_alloc_error and fix drop signature update niche and size tests add cfg for allocating APIs check null before calculating offset add test for zst and trial usage prevent optimizer induced ub in drop and cleanup metadata gathering account for arbitrary size and alignment metadata Thank you nika and thomcc! Update library/alloc/src/boxed/thin.rs Co-authored-by: Josh Triplett <[email protected]> Update library/alloc/src/boxed/thin.rs Co-authored-by: Josh Triplett <[email protected]>
They were introduced by the final commit in rust-lang#95159 and gave a performance win. But since the introduction of `MatcherLoc` they are no longer needed. This commit reverts that change, making the code a bit simpler.
Add new ThinBox type for 1 stack pointer wide heap allocated trait objects **Zulip Thread**: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/ThinBox Based on https://github.com/matthieu-m/rfc2580/blob/b58d1d3cba0d4b5e859d3617ea2d0943aaa31329/examples/thin.rs Tracking Issue: rust-lang#92791 Usage Trial: https://github.com/yaahc/pgx/pull/1/files ## TODO - [x] make sure to test with #[repr(align(1024))] structs etc
…k-Simulacrum assert_uninit_valid: ensure we detect at least arrays of uninhabited types We can't easily extend this check to *all* arrays (Cc rust-lang#87041), but it turns out the existing check already catches arrays of uninhabited types. So let's make sure it stays that way by adding them to the test.
…chaelwoerister Strict provenance lints See rust-lang#95488. This PR introduces two unstable (allow by default) lints to which lint on int2ptr and ptr2int casts, as the former is not possible in the strict provenance model and the latter can be written nicer using the `.addr()` API. Based on an initial version of the lint by ```@Gankra``` in rust-lang#95199.
Don't report numeric inference ambiguity when we have previous errors Fixes rust-lang#95648
[macro_metavar_expr] Add tests to ensure the feature requirement These tests should have been added in the initial implementation they were unintentionally forgotten cc rust-lang#83527 r? ````@petrochenkov````
reword panic vs result section to remove recoverable vs unrecoverable framing Based on feedback from the Error Handling FAQ: rust-lang/project-error-handling#50 (comment) r? ````@dtolnay````
…=petrochenkov Remove explicit delimiter token trees from `Delimited`. They were introduced by the final commit in rust-lang#95159 and gave a performance win. But since the introduction of `MatcherLoc` they are no longer needed. This commit reverts that change, making the code a bit simpler. r? `@petrochenkov`
…th-backline, r=notriddle rustdoc: Fix empty doc comment with backline ICE Fixes rust-lang#95800. r? ```@notriddle```
@bors r+ rollup=never p=5 |
📌 Commit 8f4680e has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (4bb685e): comparison url. Summary:
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 Footnotes |
Successful merges:
Delimited
. #95797 (Remove explicit delimiter token trees fromDelimited
.)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup