-
Notifications
You must be signed in to change notification settings - Fork 346
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
Rustup #3901
Merged
Merged
Rustup #3901
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coverage: Clarify some parts of coverage counter creation This is a series of semi-related changes that are trying to make the `counters` module easier to read, understand, and modify. For example, the existing code happens to avoid ever using the count for a `TerminatorKind::Yield` node as the count for its sole out-edge (since doing so would be incorrect), but doesn't do so explicitly, so seemingly-innocent changes can result in baffling test failures. This PR also takes the opportunity to simplify some debug-logging code that was making its surrounding code disproportionately hard to read. There should be no changes to the resulting coverage instrumentation/mappings, as demonstrated by the absence of changes to the coverage test suite.
Rollup of 4 pull requests Successful merges: - #130380 (coverage: Clarify some parts of coverage counter creation) - #130427 (run_make_support: rectify symlink handling) - #130447 (rustc_llvm: update for llvm/llvm-project@2ae968a0d9fb61606b020e898d88…) - #130448 (fix: Remove duplicate `LazyLock` example.) r? `@ghost` `@rustbot` modify labels: rollup
`RepeatN`: use MaybeUninit Closes #130140. Closes #130141. Use `MaybeUninit` instead of `ManuallyDrop` for soundness.
Remove semi-nondeterminism of `DefPathHash` ordering from inliner Déjà vu or something because I kinda thought I had put this PR up before. I recall a discussion somewhere where I think it was `@saethlin` mentioning that this check was no longer needed since we have "proper" cycle detection. Putting that up as a PR now. This may slighlty negatively affect inlining, since the cycle breaking here means that we still inlined some cycles when the def path hashes were ordered in certain ways, this leads to really bad nondeterminism that makes minimizing ICEs and putting up inliner bugfixes difficult. r? `@cjgillot` or `@saethlin` or someone else idk
Relate receiver invariantly in method probe for `Mode::Path` Effectively reverts part of #126128 Fixes #126227 This PR changes method probing to use equality for fully path-based method lookup, and subtyping for receiver `.` method lookup. r? lcnr
Add new_cyclic_in for Rc and Arc Currently, new_cyclic_in does not exist for Rc and Arc. This is an oversight according to rust-lang/wg-allocators#132. This PR adds new_cyclic_in for Rc and Arc. The implementation is almost the exact same as new_cyclic with some small differences to make it allocator-specific. new_cyclic's implementation has been replaced with a call to `new_cyclic_in(data_fn, Global)`. Remaining questions: * ~~Is requiring Allocator to be Clone OK? According to rust-lang/wg-allocators#88, Allocators should be cheap to clone. I'm just hesitant to add unnecessary constraints, though I don't see an obvious workaround for this function since many called functions in new_cyclic_in expect an owned Allocator. I see Allocator.by_ref() as an option, but that doesn't work on when creating Weak { ptr: init_ptr, alloc: alloc.clone() }, because the type of Weak then becomes Weak<T, &A> which is incompatible.~~ Fixed, thank you `@zakarumych!` This PR no longer requires the allocator to be Clone. * Currently, new_cyclic_in's documentation is almost entirely copy-pasted from new_cyclic, with minor tweaks to make it more accurate (e.g. Rc<T> -> Rc<T, A>). The example section is removed to mitigate redundancy and instead redirects to cyclic_in. Is this appropriate? * ~~The comments in new_cyclic_in (and much of the implementation) are also copy-pasted from new_cyclic. Would it be better to make a helper method new_cyclic_in_internal that both functions call, with either Global or the custom allocator? I'm not sure if that's even possible, since the internal method would have to return Arc<T, Global> and I don't know if it's possible to "downcast" that to an Arc<T>. Maybe transmute would work here?~~ Done, thanks `@zakarumych` * Arc::new_cyclic is #[inline], but Rc::new_cyclic is not. Which is preferred? * nit: does it matter where in the impl block new_cyclic_in is defined?
…huss Update Trusty target maintainers Remove Stephen Crane from the list of Trusty target maintainers and add Andrei Homescu (`@ahomescu)` and Chris Wailes.
Miri subtree update r? `@ghost`
Revert #129749 to fix segfault in LLVM This reverts commit 8c7a7e346be4cdf13e77ab4acbfb5ade819a4e60, reversing changes made to a00bd75b6c5c96d0a35afa2dc07ce3155112d278. Reported in rust-lang/rust#129749 (comment). `@nikic's` theory is that the LLVM API changed in a way that makes it impossible to use concurrently from multiple threads (llvm/llvm-project#106427 (comment)). I pinged `@krasimirgg` who was fine with reverting. r? `@rust-lang/wg-llvm`
Rollup of 5 pull requests Successful merges: - #129477 (Fix fluent diagnostics) - #129674 (Add new_cyclic_in for Rc and Arc) - #130452 (Update Trusty target maintainers) - #130467 (Miri subtree update) - #130477 (Revert #129749 to fix segfault in LLVM) r? `@ghost` `@rustbot` modify labels: rollup
tests: allow trunc/select instructions to be missing On LLVM 20, these instructions already get eliminated, which at least partially satisfies a TODO. I'm not talented enough at using FileCheck to try and constrain this further, but if we really want to we could copy an LLVM 20 specific version of this test that would restore it to being CHECK-NEXT: insertvalue ... `@rustbot` label: +llvm-main r? `@DianQK`
Take more advantage of the `isize::MAX` limit in `Layout` Things like `padding_needed_for` are current implemented being super careful to handle things like `Layout::size` potentially being `usize::MAX`. But now that #95295 has happened, that's no longer a concern. It's possible to add two `Layout::size`s together without risking overflow now. So take advantage of that to remove a bunch of checked math that's not actually needed. For example, the round-up-and-add-next-size in `extend` doesn't need any overflow checks at all, just the final check for compatibility with the alignment. (And while I was doing that I made it all unstably const, because there's nothing in `Layout` that's fundamentally runtime-only.)
Pass `fmt::Arguments` by reference to `PanicInfo` and `PanicMessage` Resolves #129330 For some reason after #115974 and #126732 optimizations applied to panic handler became worse and compiler stopped removing panic locations if they are not used in the panic message. This PR fixes that and maybe we can merge it into beta before rust 1.81 is released. Note: optimization only works with `lto = "fat"`. r? libs-api
Support `char::encode_utf8` in const scenarios. This PR implements [`rust-lang/rfcs#3696`](rust-lang/rfcs#3696). This assumes [`const_slice_from_raw_parts_mut`](rust-lang/rust#67456).
Generate scraped examples buttons in JS Follow-up of rust-lang/rust#129796. To reduce the page size when there are scraped examples, we can generate their buttons in JS since they require JS to work in any case. There should be no changes in display or in functionality. You can test it [here](https://rustdoc.crud.net/imperio/gen-scraped-buttons/doc/scrape_examples/fn.test.html). cc `@willcrichton` r? `@notriddle`
Get rid of niche selection's dependence on fields's order Fixes #125630. Use the optimal niche selection decided in `univariant()` rather than picking niche field manually. r? `@the8472`
…eyouxu `rustc_codegen_llvm` cleanups Some improvements I found while reading through this crate's code. r? `@michaelwoerister`
Disallow hidden references to mutable static Closes #123060 Tracking: - rust-lang/rust#123758
Remove macOS 10.10 dynamic linker bug workaround Rust's current minimum macOS version is 10.12, so the hack can be removed. This PR also updates the `remove_dir_all` docs to reflect that all supported macOS versions are protected against TOCTOU race conditions (the fallback implementation was already removed in #127683). try-job: dist-x86_64-apple try-job: dist-aarch64-apple try-job: dist-apple-various try-job: aarch64-apple try-job: x86_64-apple-1
Begin experimental support for pin reborrowing This commit adds basic support for reborrowing `Pin` types in argument position. At the moment it only supports reborrowing `Pin<&mut T>` as `Pin<&mut T>` by inserting a call to `Pin::as_mut()`, and only in argument position (not as the receiver in a method call). This PR makes the following example compile: ```rust #![feature(pin_ergonomics)] fn foo(_: Pin<&mut Foo>) { } fn bar(mut x: Pin<&mut Foo>) { foo(x); foo(x); } ``` Previously, you would have had to write `bar` as: ```rust fn bar(mut x: Pin<&mut Foo>) { foo(x.as_mut()); foo(x); } ``` Tracking: - #130494 r? `@compiler-errors`
Address diagnostics regression for `const_char_encode_utf8`. Relevant tracking issue: #130512 This PR regains full diagnostics for non-const calls to `char::encode_utf8`.
…otriddle Fix scraped examples height Fixes [#130562](rust-lang/rust#130562). You can test it [here](https://rustdoc.crud.net/imperio/scraped-examples-height/doc/scrape_examples/fn.test_many.html). I also used this opportunity to reduce the padding on line numbers: | before | after | | - | - | | ![Screenshot from 2024-09-20 16-20-40](https://github.com/user-attachments/assets/9434704c-afe0-4ec3-a1dc-6f3c16d03b3b) | ![Screenshot from 2024-09-20 16-20-13](https://github.com/user-attachments/assets/f3bd01bf-760a-4acd-ba34-8e7db083245a) | r? `@notriddle`
Add `Vec::as_non_null` Implements the ACP: rust-lang/libs-team#440 The documentation is mostly copied from the existing `Vec::as_mut_ptr` method. I am adding this method to the already-existing `box_vec_non_null` feature tracked at rust-lang/rust#130364.
Rollup of 7 pull requests Successful merges: - #128209 (Remove macOS 10.10 dynamic linker bug workaround) - #130526 (Begin experimental support for pin reborrowing) - #130611 (Address diagnostics regression for `const_char_encode_utf8`.) - #130614 (Add arm64e-apple-tvos target) - #130617 (bail if there are too many non-region infer vars in the query response) - #130619 (Fix scraped examples height) - #130624 (Add `Vec::as_non_null`) r? `@ghost` `@rustbot` modify labels: rollup
Update cargo 16 commits in a9a418d1a22f29e7dfd034e3b93f15657e608a29..eaee77dc1584be45949b75e4c4c9a841605e3a4b 2024-09-15 19:13:12 +0000 to 2024-09-19 21:10:23 +0000 - fix(complete): Harden `--target` completions (rust-lang/cargo#14564) - Cleanup duplicated check-cfg lint logic (rust-lang/cargo#14567) - Revert "remove reference to incomplete crates.io feature from docs" (rust-lang/cargo#14562) - feat: Add custom completer for `cargo help <TAB>` (rust-lang/cargo#14557) - docs(unstable): Expand on completion documentation (rust-lang/cargo#14563) - feat: Add custom completer for `cargo build --example=<TAB>` (rust-lang/cargo#14531) - remove reference to incomplete crates.io feature from docs (rust-lang/cargo#14561) - fix(complete): Fix problems on my machine (rust-lang/cargo#14558) - feat: Add custom completer for completing benchmark names (rust-lang/cargo#14532) - refactor(info): Use the `shell.note` to print the note (rust-lang/cargo#14554) - feat: Add custom completer for completing test names (rust-lang/cargo#14548) - Suggest `cargo info` command in the `cargo search` result (rust-lang/cargo#14537) - feat: Add custom completer for completing target triple (rust-lang/cargo#14535) - feat: Add custom completer for `cargo -Z <TAB>` (rust-lang/cargo#14536) - feat: Add custom completer for completing installed binaries (rust-lang/cargo#14534) - feat: Add custom completer for completing bin names (rust-lang/cargo#14533) r? ghost
@bors r+ |
☀️ Test successful - checks-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This has a larger large "fmt" diff, probably there was a bug rustfmt update. For some reason the automatic
./miri fmt
on CI failed so this PR had to be created by hand -- it is unclear to me why this occurred.