Repository navigation
Rustc pull update - #2296
Open
workflows-stdarch[bot] wants to merge 23 commits into
Open
Rustc pull update#2296workflows-stdarch[bot] wants to merge 23 commits into
workflows-stdarch[bot] wants to merge 23 commits into
Conversation
…=oli-obk reflection: erase bound regions in function_ptr() Fixes: rust-lang/rust#153176 skip_binder() only removes for<'a, ...> bound region declarations, so regions without declarations were left behind. On nightly, the problem issue mentioned occurs. ICE `Not enough bound vars: '^0 not found in []` on local (with debug assertions) when calling `trait_info_of` Fixed this issue by using `instantiate_bound_regions_with_erased` to erase bound regions on function_ptr() not to leave regions without declarations. r? @oli-obk (since you are the compiler champion of reflection & comptime, and I saw you asked the reviewee to leave a FIXME that I removed on this PR: rust-lang/rust#152173 (comment))
Share more debuginfo for inlined functions We currently share debuginfo for inlined callees within a function. This PR expands that sharing from "within a function" to "within a CGU". This reduces the size of, and time to compile, debug builds. r? @wesleywiser
…ngregions, r=nnethercote perf: remove cache in `DeepResolverIgnoringRegions`
…nethercote perf: remove cache in `TypeRelating`
…, r=nnethercote perf: remove cache in `BoundVarReplacer`
Fix nightly regression: Add check for improper instantiation in method suggestion Fix rust-lang/rust#166275.
…n unaligned load or write The clippy lint has an exception when the cast does increase the alignment, but is immediately followed by an unaligned read or write.
…rtdev stdarch subtree update Subtree update of `stdarch` to d713e3a. Created using https://github.com/rust-lang/josh-sync. r? @ghost
…bank Show fn spans for `lint::c_buffer_length` A follow-up for rust-lang/rust#162565 (comment) r? estebank
Use `InterpResult` instead of `InterpErrorKind` For performance, as `InterpResult` is smaller
…der, r=bjorn3 remove `CodegenUnitNameBuilder`
std: Enable flock-based file locking on DragonFly BSD DragonFly BSD supports `flock(2)` and provides the same file locking semantics as the other BSDs already supported by the Unix implementation. Currently, `File::lock`, `File::lock_shared`, `File::try_lock`, `File::try_lock_shared`, and `File::unlock` return an unsupported error on DragonFly BSD. Enable the existing `flock(2)` implementation on DragonFly BSD and update the corresponding file locking tests to remove the `should_panic` expectation. This also allows Cargo to use its build directory locking mechanism on DragonFly BSD. **Testing** Tested natively on `x86_64-unknown-dragonfly` with Rust 1.98.1 and 1.100.0 using a locally rebuilt standard library. - All five existing file locking tests passed when run in a standalone test harness. - Cross-process shared and exclusive locking passed. - Interoperability with Python's `fcntl.flock()` passed. The unpatched standard library returned `ErrorKind::Unsupported` on both versions.
…-condition-diagnostic, r=fmease Recover shorthand struct literals in if conditions Fixes rust-lang/rust#147877
explicitly disable vector-packed-decimal feature in s390x naked funct… This test verifies that target features enabled on a naked function do not affect subsequent naked assembly blocks. It expects the `vlrlr` instruction in function `b` to fail because `vector-packed-decimal` is not enabled for that function. However, this assumption does not hold when the target specification enables the feature by default. Some Fedora, CentOS, and RHEL target specifications use `z14` or `z15` as the `base.cpu` in `s390x-unknown-linux-gnu.json`, and both CPUs enable `vector-packed-decimal` by default. As a result, the test can fail for reasons unrelated to the behavior it is intended to verify. This PR explicitly disables the target feature in the compiler flags, ensuring the test behaves consistently regardless of the target specification's base CPU.
Fix Location::strictly_dominates Fixes rust-lang/rust#166722 by removing `Dominators::strictly_dominates` altogether.
Replace FIXMEs suggesting removal of `box` with a NOTE Remove FIXMEs that mentioned the removal of `box` keyword for starting expressions. The `box` keyword is still reserved for potential future use even though it is no longer supported.
…roots, r=fmease Skip bodyless intrinsics as mono item roots With `-Clink-dead-code`, every non-generic function becomes a mono item root, including intrinsics without a fallback body. Those have no MIR, so collecting them ICEs.
[tiny] Avoid ICE in suggestion Fix rust-lang/rust#166661. Follow up to rust-lang/rust#166338.
…uillaumeGomez Clean up WrongNamespace handling in intra-doc link resolution Fixes rust-lang/rust#77150. This moves the wrong-namespace fallback out of `resolve_with_disambiguator` and into `resolution_failure`, so detection and rendering of `WrongNamespace` live in one place. The FIXME left by rust-lang/rust#76955 is removed. Diagnostics are unchanged. The existing intra-doc UI tests cover the disambiguator mismatch cases.
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#166944 (stdarch subtree update) - rust-lang/rust#166689 (Show fn spans for `lint::c_buffer_length`) - rust-lang/rust#166983 (Use `InterpResult` instead of `InterpErrorKind`) - rust-lang/rust#167003 (remove `CodegenUnitNameBuilder`) - rust-lang/rust#167016 (std: Enable flock-based file locking on DragonFly BSD) - rust-lang/rust#162295 (Recover shorthand struct literals in if conditions) - rust-lang/rust#166597 (explicitly disable vector-packed-decimal feature in s390x naked funct…) - rust-lang/rust#166762 (Fix Location::strictly_dominates) - rust-lang/rust#166824 (Replace FIXMEs suggesting removal of `box` with a NOTE) - rust-lang/rust#166958 (Skip bodyless intrinsics as mono item roots) - rust-lang/rust#166960 ([tiny] Avoid ICE in suggestion) - rust-lang/rust#167005 (Clean up WrongNamespace handling in intra-doc link resolution)
stabilize `-Znext-solver=globally` The next-generation trait solver is the product of 4 years of active work by multiple people and is based on what we've learned from working on Chalk for years before then. It is the largest single change to Rust since version 1.0. It has has a significant impact on the behavior of the type system in edge-cases, its performance, and our mental model of it. However, its main benefits will come down the road as we stabilize features and improvements which are only possible thanks to it. The most immediate impact will likely be the stabilization of [TAIT/RTN](https://goals.rust-lang.org/2026/rtn.html), which was blocked on our rework of opaque types. This report does not go into the history of the solver and also does not properly appreciate all the people involved. Getting to this point would not have been possible by myself and I want to spend the time to properly document all the effort that went into it as part of an announcement blog post before this reaches stable. Even so, I want to already thank @compiler-errors and @adwinwhite here. They have both done incredibly good work on the new trait solver and without their contributions this stabilization would probably not have been possible at all. See rust-lang/goals#113 for an overview of all the work that went into the trait solver since late 2024. Also see the [blog post announcing it on nightly](https://blog.rust-lang.org/2026/08/21/enabling-next-solver-on-nightly). The Rust tracking issue is rust-lang/rust#107374. ## Technical overview Given the size of this stabilization, the actual technical documentation and overview is in the [Trait System Refactor Initiative repository](https://github.com/rust-lang/trait-system-refactor-initiative/blob/main/notes/stabilization-report/meta.md). If you have any questions, please reach out on [zulip](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/casual.20chat.20and.20support/with/628633853). We will continuously update this overview as we move forward. ## How will this stabilization work Stabilizing the new trait solver is an incredibly large change which also has a huge impact on diagnostics. This makes updating the UI test suite quite challenging. I've spent the last few weeks going through all tests which change their result. See https://hackmd.io/ydc_nIbHQqG-ctMDapXYTg for an overview the impact on non-UI test suites. See lcnr/rust#12 for the remaining changes when running our UI test suite with the new solver. There are a lot of diagnostics regressions here and also far too many changes to review in a single PR. We currently enable the new solver on nightly by default while explicitly disabling the next-solver in all test suites affected by it. **Stabilizing the new solver will cause us to also use it on `beta` and then `stable` starting in version 1.102. The last beta cutoff was November 6th. We will initially keep forcefully using the old solver in our test suites.** Then, over the next weeks, we incrementally update all test suites to use the new solver. Doing this incrementally allows us to actually review and address the changes and make sure that diagnostics issues are caught and addressed. We will also finish triaging all crater regressions and open PRs or at least open issues for all affected crates we are aware of. After the next beta-cutoff, and once we've updated all test suites to no longer rely on `-Znext-solver=coherence`, we will remove the old solver. **This means we are only able to delay the stabilization by at most one release if necessary.** Reverting the stabilization at all has a high cost. It exposes the fact that the old trait solver has not been tested on nightly since we've enabled the new one in August. ## My personal thoughts here I would have really liked the new trait solver to be perfect pre-stabilization. It's clear that waiting until literally all issues have been fixed is not tenable. I have been thinking a lot about whether delaying it by one more release would be better. Right now there are still some hangs, performance is on average worse, there are quite a few poor diagnostics and minor remaining bugs. Spending 6 more weeks to improve the new solver would make all of this less of an issue, given the amount of active work currently going on. After some private discussions I think stabilizing as is is desirable due to the following reasons: - we're blocking a bunch of work on the new trait solver being stable, either because we're not testing the old solver right now, or because the change is hard to implement with the old solver - having two trait solvers in the compiler results in an incredible amount of complexity, is confusing to other contributors, and negatively impacts performance - the current state of the new solver being enabled on nightly while not being stable is confusing and causes issues, it results in both implementions not getting the test coverage they should ideally have - having the new solver means we do a lot of changes without Types Team FCPs which should really be FCP'd by the wider team. The new trait solver is too large to appropriately review all its changes. Once the new solver is stable, we can incrementally improve it going forward. - keeping the old solver enabled by default results in new crates depending on intentionally broken behavior, e.g. `tera-2.0.0` was recently published while depending on rust-lang/trait-system-refactor-initiative#168. The unintended breakage from stabilizing the new solver is less impactful than the unintended incorrect behavior of the old solver - breaking less than 500 crates on crater, with nearly all of this being intended breakage of a few root crates, is definitely fine. Even considering the performance issues which are hard to uncover via crater, this still feels very acceptable to me --- This change is blocked on - rust-lang/rust#163928 - rust-lang/rust#164055 r? types <sub>*nyaaaa :3*</sub>
This updates the rust-version file to 9141d6fc9b7e1c74002f9329833d2cf985c49dfa.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Previous upstream ref: rust-lang/rust@fde8dfd New upstream ref: rust-lang/rust@9141d6f Filtered ref: 1dddd1f Upstream diff: rust-lang/rust@fde8dfd...9141d6f This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
|
Thanks for the pull request, and welcome! The Rust Project has assigned @Amanieu (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Why was this reviewer chosen?The reviewer was selected based on:
|
This branch has not been deployed
This file contains hidden or 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
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.
Latest update from rustc.