-
Notifications
You must be signed in to change notification settings - Fork 556
Rustc pull update #2582
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
Merged
Merged
Rustc pull update #2582
Conversation
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
Remove chunk size from each chunk in `ChunkedBitSet`. Almost all chunks in a `ChunkedBitSet` have the same constant `CHUNK_SIZE`, except the last in a bitset which takes the remainder `domain_size % CHUNK_SIZE`. r? `@ghost` for perf
Dial down detail of B-tree description fixes #134088, though it is a shame to lose some of this wonderful detail. r? `@workingjubilee` EDIT: newest versions keep old detail, but move it down a bit.
Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts Fixes rust-lang/rust#141806 When we have an impossible where clause like `dyn Trait<u8>: Sized`, this may make a dyn-to-dyn cast like `dyn Trait<()> -> dyn trait<u8>` to successfully type check as if it were a wide-to-thin ptr cast (discarding metadata): https://github.com/rust-lang/rust/blob/16ad385579cebb6f7d53367c552661b6b51a4a02/compiler/rustc_hir_typeck/src/cast.rs#L862-L865 In borrowck, we are expecting that the only meaningful dyn-to-dyn cast to be a metadata-preserving wide-to-wide ptr cast, which requires that the principals of the dyn pointers are equal. Borrowck additionally assumes that these principals have already been proven equal *modulo regions*, and we thus ICE since `Trait<u8>` and `Trait<()>` do not unify: https://github.com/rust-lang/rust/blob/16ad385579cebb6f7d53367c552661b6b51a4a02/compiler/rustc_borrowck/src/type_check/mod.rs#L1481-L1524 This PR fixes this ICE by checking whether the RHS of the cast is considered to be Sized in the environment of the MIR typeck, and if so then skipping over this dyn->dyn principal compatibility check. r? `@lcnr` perhaps?
...arget, r=jdonszelmann Fix attribute target checking for macro calls Fixes rust-lang/rust#145779 r? `@jdonszelmann`
bootstrap.py: Improve CPU detection on NetBSD ...and add some adaptation of detection for some arm variants.
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype This should be nicer and more type-safe than the old typedef for `c_int`/`i32`. Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
raw-dylib-elf: set correct `DT_VERDEFNUM` Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to a03c1ef. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
Rollup of 10 pull requests Successful merges: - rust-lang/rust#135761 (Dial down detail of B-tree description) - rust-lang/rust#145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts) - rust-lang/rust#145788 (Fix attribute target checking for macro calls) - rust-lang/rust#145794 (bootstrap.py: Improve CPU detection on NetBSD) - rust-lang/rust#145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype) - rust-lang/rust#145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`) - rust-lang/rust#145828 (Update `bitflags` to 2.9.3.) - rust-lang/rust#145830 (Remove the lifetime from `ExpTokenPair`/`SeqSep`.) - rust-lang/rust#145836 (Remove outdated bug comments) - rust-lang/rust#145842 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Enforce in bootstrap that dist and install must have stage at least 1 This is a continuation of my efforts to fix staging in bootstrap after the stage0 redesign. This PR gets rid of all `compiler_for` usages in the `dist` steps 🎉 The only remaining usages are in the `test` steps, which are my next goal, and which will be the final boss.. both because they are quite tricky, and because most of the the rest of the steps have been already fixed. The changes are relatively straightforward, `x dist` defaults to stage 2, so in that case we want to use a stage 1 build compiler for everything (except stdlib, but we usually use it even there because of uplifting). What I didn't fix yet are the docs steps, because they are *very* implicit right now, and fixing them deserves its own PR. The first commit reverts the tests that I accidentally removed in rust-lang/rust#145340 🤦♂️ I did it in this PR to avoid further git conflicts.. Best reviewed commit-by-commit. r? `@jieyouxu` try-job: dist-i686-linux try-job: dist-armhf-linux try-job: dist-x86_64-linux try-job: dist-x86_64-msvc try-job: dist-apple-various try-job: dist-x86_64-apple try-job: x86_64-msvc-2
Support non-defining uses in HIR typeck This changes the impl of `NormalizesTo` for opaque types to be structural during HIR typeck. The previous impl equated region variables of the opaque type key with existing entries which can result in spurious leak check errors and also results in mismatches with MIR borrowck, theoretically causing ICE. The approach is very similar to rust-lang/rust#145244 in MIR typeck: - we collect all uses of opaque types during HIR typeck - before writeback, we search for *defining uses* - the opaque type key has fully universal generic args modulo regions - the hidden type has no infer vars - we use these defining uses to compute the concrete type for the opaque and map it to the definition site - we use this concrete type to check the type of all uses of opaques during HIR typeck. This also constrains infer vars in non-defining uses Fixes rust-lang/trait-system-refactor-initiative#135, fixes rust-lang/trait-system-refactor-initiative#49. r? `@BoxyUwU`
Slightly optimize reading of source files Discussed on Zulip (https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/rustc.20uses.20silly.20amount.20of.20syscalls.20for.20file.20IO/with/536015625. Do not open/close each source file twice when reading it. We still stat it twice though.
Access less HIR attributes from typeck Typeck relies on attributes to modify its own behaviour. This is a problem, as this means that `typeck(some function)` may depend on the span and doc-comments of many other functions. This PR attempts to reduce such accesses to attributes. This yields to a sizeable perf improvement: rust-lang/rust#144841 (comment) Fixes rust-lang/rust#124352
Region inference: Use outlives-static constraints in constraint search Revise the extra `r: 'static` constraints added upon universe issues to add an explanation, and use that explanation during constraint blame search. This greatly simplifies the region inference logic, which now does not need to reverse-engineer the event that caused a region to outlive `'static`. This cosmetically changes the output of two UI tests. I blessed them i separate commits with separate motivations, but that can of course be squashed as desired. We probably want that. The PR was extracted out of rust-lang/rust#130227 and consists of one-third of its functional payload. r? lcnr
rustdoc: a few micro-optimizations targeted at build_impl Unsure if these will be anything substantial, but the first one at least should git rid of quite a few branches, second one unsure if it's worth it. r? `@GuillaumeGomez`
...mpiler-errors When determining if a trait has no entries for the purposes of omitting vptrs from subtrait vtables, consider its transitive supertraits' entries, instead of just its own entries. When determining if a non-first supertrait vptr can be omitted from a subtrait vtable, check if the supertrait or any of its (transitive) supertraits have methods, instead of only checking if the supertrait itself has methods. This fixes the soundness issue where a vptr would be omitted for a supertrait with no methods but that itself had a supertrait with methods, while still optimizing the case where the supertrait is "truly" empty (it has no own vtable entries, and none of its (transitive) supertraits have any own vtable entries). Fixes <rust-lang/rust#145752> ----- Old description: ~~Treat all non-auto traits as non-empty (possibly having methods) for purposes of determining if we need to emit a vptr for a non-direct supertrait (and for new "sibling" entries after a direct or non-direct supertrait).~~ This fixes (I believe) the soundness issue, ~~but regresses vtable sizes and possibly upcasting perf in some cases when using trait hierarchies with empty non-auto traits (see `tests/ui/traits/vtable/multiple-markers.stderr`) since we use vptrs in some cases where we could re-use the vtable.~~ Fixes <rust-lang/rust#145752> Re-opens (not anymore) <rust-lang/rust#114942> Should not affect <rust-lang/rust#131813> (i.e. the soundness issue is still fixed, ~~though the relevant vtables in the `trait Evil` example will be larger now~~) cc implementation history <rust-lang/rust#131864> <rust-lang/rust#113856> ----- ~~It should be possible to check if a trait has any methods from itself *or* supertraits (instead of just from itself), but to fix the immediate soundness issue, just assume any non-auto trait could have methods. A more optimistic check can be implemented later (or if someone does it soon it could just supercede this PR 😄).~~ Done in latest push `@rustbot` label A-dyn-trait F-trait_upcasting
Switch next solver to use a specific associated type for trait def id The compiler just puts `DefId` in there, but rust-analyzer uses different types for each kind of item. See [the Zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/Implmentating.20New.20Trait.20Solver/near/534329794). In short, it will be a tremendous help to r-a to use specific associated types, while for the solver and the compiler it's a small change. So I ported `TraitId`, as a proof of concept and it's also likely the most impactful. r? types
Partial-stabilize the basics from `bigint_helper_methods` Direct link to p-FCP comment: rust-lang/rust#144494 (comment) After libs-api discussion, this is now the following methods: - [`uN::carrying_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_add): uN + uN + bool -> (uN, bool) - [`uN::borrowing_sub`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.borrowing_sub): uN + uN + bool -> (uN, bool) - [`uN::carrying_mul`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_mul): uN * uN + uN -> (uN, uN) - [`uN::carrying_mul_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_mul_add): uN * uN + uN + uN -> (uN, uN) Specifically, these are the ones that are specifically about working with `uN` as a "digit" (or "limb") where the output, despite being larger than can fit in a single digit, wants to be phrased in terms of those *digits*, not in terms of a wider type. (This leaves open the possibility of things like `widening_mul: u32 * u32 -> u64` for places where one wants to only think in terms of the *number*s, rather than as carries between multiple digits. Though of course discussions about how best to phrase such a thing are best for the tracking issue, not for this PR.) --- **Original PR description**: A [conversation on IRLO](https://internals.rust-lang.org/t/methods-for-splitting-integers-into-their-halves/23210/7?u=scottmcm) the other day pushed me to write this up 🙂 This PR proposes a partial stabilization of `bigint_helper_methods` (rust-lang/rust#85532), focusing on a basic set that hopefully can be non-controversial. Specifically: - [`uN::carrying_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_add): uN + uN + bool -> (uN, bool) - [`uN::widening_mul`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.widening_mul): uN * uN -> (uN, uN) - [`uN::carrying_mul_add`](https://doc.rust-lang.org/nightly/std/primitive.u64.html#method.carrying_mul_add): uN * uN + uN + uN -> (uN, uN) Why these? - We should let people write Rust without needing to be backend experts to know what the magic incantation is to do this. Even `carrying_add`, which doesn't seem that complicated, actually broke in 1.82 (see rust-lang/rust#133674) so we should just offer something fit-for-purpose rather than making people keep up with whatever the secret sauce is today. We also get to do things that users cannot, like have the LLVM version emit operations on `i256` in the implementation of `u128::carrying_mul_add` (https://rust.godbolt.org/z/cjG7eKcxd). - Unsigned only because the behaviour is much clearer than when signed is involved, as everything is just unsigned (vs questions like whether `iN * iN` should give `(uN, iN)`) and carries can only happen in one direction (vs questions about whether the carry from `-128_u8 + -128_u8` should be considered `-1`). - `carrying_add` is the core [full adder](https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder) primitive for implementing addition. - `carrying_mul_add` is the core primitive for [grade school](https://en.wikipedia.org/wiki/Multiplication_algorithm#Long_multiplication) multiplication (see the example in its docs for why both carries are needed). - `widening_mul` even though it's not strictly needed (its implementation is just `carrying_mul_add(a, b, 0, 0)` right now) as the simplest way for users to get to [cranelift's `umulhi`](https://docs.rs/cranelift/latest/cranelift/prelude/trait.InstBuilder.html#method.umulhi), RISC-V's `MULHU`, Arm's `UMULL`, etc. (For example, I added an ISLE pattern bytecodealliance/wasmtime@d12e423#diff-2041f67049d5ac3d8f62ea91d3cb45cdb8608d5f5cdab988731ae2addf90ef01 so Cranelift can notice what's happening from the fallback, even if the intrinsics aren't overridden specifically. And on x86 this is one of the simplest possible non-trivial functions <https://rust.godbolt.org/z/4oadWKTc1> because `MUL` puts the results in exactly the registers that the scalar pair result happens to want.) (I did not const-stabilize them in this PR because [the fallbacks](https://github.com/rust-lang/rust/blob/master/library/core/src/intrinsics/fallback.rs) are using `#[const_trait]` plus there's two [new intrinsic](https://doc.rust-lang.org/nightly/std/intrinsics/fn.disjoint_bitor.html)s involved, so I didn't want to *also* open those cans of worms here. Given that both intrinsics *have* fallbacks, and thus don't do anything that can't already be expressed in existing Rust, const-stabilizing these should be straight-forward once the underlying machinery is allowed on stable. But that doesn't need to keep these from being usable at runtime in the mean time.)
Hard-code `char::is_control` Split off from rust-lang/rust#145219 According to https://www.unicode.org/policies/stability_policy.html#Property_Value, the set of codepoints in `Cc` will never change. So we can hard-code the patterns to match against instead of using a table. This doesn't change the generated assembly, since the lookup table is small enough that[ LLVM is able to inline the whole search](https://godbolt.org/z/bG8dM37YG). But this does reduce the chance of regressions if LLVM's heuristics change in the future, and means less generated Rust code checked in to `unicode-data.rs`.
Detect missing `if let` or `let-else` During `let` binding parse error and encountering a block, detect if there is a likely missing `if` or `else`: ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{` --> $DIR/missing-if-let-or-let-else.rs:14:25 | LL | let Some(x) = foo() { | ^ expected one of `.`, `;`, `?`, `else`, or an operator | help: you might have meant to use `if let` | LL | if let Some(x) = foo() { | ++ help: alternatively, you might have meant to use `let else` | LL | let Some(x) = foo() else { | ++++ ``` Fix rust-lang/rust#107806.
pub async fn impl is monomorphized when func itself is monomorphized Implentation coroutine (`func::{closure#0}`) is monomorphized, when func itself is monomorphized. Currently, when `pub async fn foo(..)` is exported from lib and used in several dependent crates, only 'header' function is monomorphized in the defining crate. 'header' function, returning coroutine object, is monomorphized, but the coroutine's poll function (which actually implements all the logic for the function) is not. In such situation, `func::{closure#0}` will be monomorphized in every dependency. This PR adds monomorphization for `func::{closure#0}` (coroutine poll function), when func itself is monomorphized. Simple test with one lib async function and ten dependent crates (executable) that use the function, shows 5-7% compilation time improvement (single-threaded).
...owLii fix `#[loop_match]` on diverging loop tracking issue: rust-lang/rust#132306 fixes rust-lang/rust#144492 fixes rust-lang/rust#144493 fixes rust-lang/rust#144781 this generated invalid MIR before. issue rust-lang/rust#143806 still has an issue where we assign `state = state` which is invalid in MIR. Fixing that problem is tricky, so I'd like to do that separately. r? `@bjorn3`
Add `read_buf` equivalents for positioned reads Adds the following items under the ~~`read_buf` (rust-lang/rust#78485)~~ `read_buf_at` (rust-lang/rust#140771) feature: - `std::os::unix::fs::FileExt::read_buf_at` - `std::os::unix::fs::FileExt::read_buf_exact_at` - `std::os::windows::fs::FileExt::seek_read_buf` try-job: `x86_64-msvc*` try-job: `test-various*` try-job: `dist-various*`
core: add Peekable::next_if_map Implementation for rust-lang/rust#143702
Stabilize `path_add_extension` FCP in tracking issue rust-lang/rust#127292 finished in January. There was more discussion since then, but [libs-api decided to match `set_extension`][0] by keeping the return type as-is and adding a panic for invalid extensions. The latter was implemented in rust-lang/rust#140163, so this feature should be ready for stabilization. But if anyone's unsure, another FCP could be done to confirm. Closes rust-lang/rust#127292 [0]: rust-lang/rust#127292 (comment)
fix drop scope for `super let` bindings within `if let` Fixes rust-lang/rust#145328 by making non-lifetime-extended `super let` reuse the logic used to compute drop scopes for non-lifetime-extended temporaries. Also fixes rust-lang/rust#145374, which regressed due to rust-lang/rust#143376 introducing `if let`-like scopes for match arms with guards. Tracking issue for `super let`: rust-lang/rust#139076 This is a regression fix / breaking change for macros stably exposing `super let`, including `pin!` and `format_args!`. Nominating to be discussed alongside rust-lang/rust#145328: ```@rustbot``` label +I-lang-nominated +I-libs-api-nominated
raw_vec.rs: Remove superfluous fn alloc_guard `alloc_guard` checks that its argument is at most `isize::MAX`, but it is called only with layout sizes, which are already guaranteed to be at most `isize::MAX`.
On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const When encountering an or-pattern with a binding not available in all patterns, look for consts and unit struct/variants that have similar names as the binding to detect typos. ``` error[E0408]: variable `Ban` is not bound in all patterns --> $DIR/binding-typo.rs:22:9 | LL | (Foo, _) | (Ban, Foo) => {} | ^^^^^^^^ --- variable not in all patterns | | | pattern doesn't bind `Ban` | help: you might have meant to use the similarly named unit variant `Bar` | LL - (Foo, _) | (Ban, Foo) => {} LL + (Foo, _) | (Bar, Foo) => {} | ``` For items that are not in the immedate scope, suggest the full path for them: ``` error[E0408]: variable `Non` is not bound in all patterns --> $DIR/binding-typo-2.rs:51:16 | LL | (Non | Some(_))=> {} | --- ^^^^^^^ pattern doesn't bind `Non` | | | variable not in all patterns | help: you might have meant to use the similarly named unit variant `None` | LL - (Non | Some(_))=> {} LL + (core::option::Option::None | Some(_))=> {} | ``` When encountering a typo in a pattern that gets interpreted as an unused binding, look for unit struct/variant of the same type as the binding: ``` error: unused variable: `Non` --> $DIR/binding-typo-2.rs:36:9 | LL | Non => {} | ^^^ | help: if this is intentional, prefix it with an underscore | LL | _Non => {} | + help: you might have meant to pattern match on the similarly named variant `None` | LL - Non => {} LL + std::prelude::v1::None => {} | ``` Suggest constant on unused binding in a pattern ``` error: unused variable: `Batery` --> $DIR/binding-typo-2.rs:110:9 | LL | Batery => {} | ^^^^^^ | help: if this is intentional, prefix it with an underscore | LL | _Batery => {} | + help: you might have meant to pattern match on the similarly named constant `Battery` | LL | Battery => {} | + ``` Fix rust-lang/rust#51976.
Rename `ToolRustc` to `ToolRustcPrivate` I think that this name gets the point across much better. r? ````@jieyouxu````
llvm: nvptx: Layout update to match LLVM LLVM upstream switched layouts to support 256-bit vector load/store. ``````@rustbot`````` label llvm-main r? durin42
...ock-fences, r=tgross35 docs(std): add missing closing code block fences in doc comments This PR adds a few closing code block fences which I believe are missing in some doc comments. It seems that rustdoc just autocloses code blocks at the end of doc comments and thus these were easily overlooked: I do not think these code blocks are special in any way. I found these when working on a Clippy lint that checks the last sentence of doc comments for terminal punctuation, and these were failing cases when testing against the std. Therefore I am not entirely sure these are all such cases, but still have high hopes that they are (or at least a well-defined subset of them).
Disallow frontmatter in `--cfg` and `--check-cfg` arguments This PR disallows the frontmatter syntax in `--cfg` and `--check-cfg` arguments. Fixes rust-lang/rust#146130 r? fmease
compiletest: cygwin follows windows in using PATH for dynamic libraries `@Berrysoft`
fix(rustdoc): match rustc `--emit` precedence Resolves rust-lang/rust#141664 This changes rustdoc's `--emit` to allow only one instance of each type, regardless of the actual data that `--emit` carries. This matches rustc's `--emit` behavior. As of the writing, only `dep-info` emit type carries extra data.
...l, r=Kobzol Make bootstrap self test parallel This PR refactors the bootstrap self test: 1. Replaced the hardcoded --test-threads=1 with std::thread::available_parallelism(), allowing tests to run with the maximum concurrency supported by the system. 2. Replaced custom hacks around OUT_DIR with TempDir and introduced TestCtx to simplify configuration setup. r? `@Kobzol`
...s, r=lolbinarycat [rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths Since the bug was fixed in rust-lang/rust#146091, we can now uncomment the code. :) r? lolbinarycat
triagebot: configure some pings when certain attributes are used Let's try this out in practice. :) Cc `@rust-lang/miri` `@rust-lang/wg-const-eval` `@Urgau`
Rollup of 24 pull requests Successful merges: - rust-lang/rust#140459 (Add `read_buf` equivalents for positioned reads) - rust-lang/rust#143725 (core: add Peekable::next_if_map) - rust-lang/rust#145209 (Stabilize `path_add_extension`) - rust-lang/rust#145342 (fix drop scope for `super let` bindings within `if let`) - rust-lang/rust#145750 (raw_vec.rs: Remove superfluous fn alloc_guard) - rust-lang/rust#145827 (On unused binding or binding not present in all patterns, suggest potential typo of unit struct/variant or const) - rust-lang/rust#145932 (Allow `inline(always)` with a target feature behind a unstable feature `target_feature_inline_always`.) - rust-lang/rust#145962 (Ensure we emit an allocator shim when only some crate types need one) - rust-lang/rust#145963 (Add LSX accelerated implementation for source file analysis) - rust-lang/rust#146054 (add `#[must_use]` to `array::repeat`) - rust-lang/rust#146090 (Derive `PartialEq` for `InvisibleOrigin`) - rust-lang/rust#146112 (don't uppercase error messages) - rust-lang/rust#146120 (Correct typo in `rustc_errors` comment) - rust-lang/rust#146124 (Test `rustc-dev` in `distcheck`) - rust-lang/rust#146127 (Rename `ToolRustc` to `ToolRustcPrivate`) - rust-lang/rust#146131 (rustdoc-search: add test case for indexing every item type) - rust-lang/rust#146134 (llvm: nvptx: Layout update to match LLVM) - rust-lang/rust#146136 (docs(std): add missing closing code block fences in doc comments) - rust-lang/rust#146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments) - rust-lang/rust#146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries) - rust-lang/rust#146150 (fix(rustdoc): match rustc `--emit` precedence ) - rust-lang/rust#146155 (Make bootstrap self test parallel) - rust-lang/rust#146161 ([rustdoc] Uncomment code to add scraped rustdoc examples in loaded paths) - rust-lang/rust#146172 (triagebot: configure some pings when certain attributes are used) r? `@ghost` `@rustbot` modify labels: rollup
Update cargo submodule 12 commits in a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9..761c4658d0079d607e6d33cf0c060e61a617cad3 2025年08月26日 23:05:12 +0000 to 2025年09月04日 01:25:01 +0000 - refactor(shell): Prepare for `Report`s being generated in more places (rust-lang/cargo#15920) - refactor(frontmatter): Pull out as a dedicated mod (rust-lang/cargo#15914) - chore: downgrade to libc@0.2.174 (rust-lang/cargo#15918) - fix(publish): Don't generate final artifacts (rust-lang/cargo#15910) - chore: Address most typos (rust-lang/cargo#15911) - chore(deps): update rust crate annotate-snippets to 0.12.1 (rust-lang/cargo#15909) - test(script): Switch frontmatter tests to end-to-end (rust-lang/cargo#15899) - chore: fix some typos and grammar (rust-lang/cargo#15905) - Update dependencies (rust-lang/cargo#15904) - feat: Don't stop at first error when emitting lints and warnings (rust-lang/cargo#15889) - fix(cli): Show the bad manifest path (rust-lang/cargo#15896) - chore(deps): update rust crate tracing-subscriber to v0.3.20 [security] (rust-lang/cargo#15898)
rustdoc-search: yet another stringdex optimization attempt This one's uses a different tactic. It shouldn't significantly increase the amount of downloaded index data, but still reduces the amount of disk usage. This one works by changing the suffix-only node representation to omit some data that's needed for checking. Since those nodes make up the bulk of the tree, it reduces the data they store, but also requires validating the match by fetching the name itself (but the names list is pretty small, and when I tried it with wordnet "indexing" it was about the same). r? `@GuillaumeGomez`
...s, r=rcvalle Sanitizers target modificators Depends on bool flag fix: rust-lang/rust#138483. Some sanitizers need to be target modifiers, and some do not. For now, we should mark all sanitizers as target modifiers except for these: AddressSanitizer, LeakSanitizer For kCFI, the helper flag -Zsanitizer-cfi-normalize-integers should also be a target modifier. Many test errors was with sanizer flags inconsistent with std deps. Tests are fixed with `-C unsafe-allow-abi-mismatch`.
resolve: Avoid finalizing extern prelude entries more than once
Suggest parentheses when `match` or `if` expression in binop is parsed as statement ``` error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:81:5 | LL | match () { _ => true } && match () { _ => true }; | ^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `bool` | help: parentheses are required to parse this as an expression | LL | (match () { _ => true }) && match () { _ => true }; | + + ``` Address the common case from rust-lang/rust#88727. The original parse error is still outstanding, but the cases brought up in the thread are resolved.
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites ## Summary Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`. | New test suites | Explanation | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tests/run-make` | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`. | | `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. | This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](rust-lang/compiler-team#847). Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`). Fixes rust-lang/rust#134109. ## Remarks - I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability. - The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see rust-lang/rust#130642). --- try-job: aarch64-msvc-1 try-job: test-various try-job: x86_64-gnu-debug try-job: aarch64-gnu-debug try-job: aarch64-apple try-job: dist-various-1
Add socket extensions for cygwin r? `@joboet` * Abstract name uds addr * quickack * passcred
single buffer for exponent fmt of integers No need for fragmented buffers when formatting. ``` orig.txt: fmt::write_i128_exp 143.39ns/iter +/- 0.32 orig.txt: fmt::write_i64_exp 68.72ns/iter +/- 0.03 new.txt: fmt::write_i128_exp 138.29ns/iter +/- 0.50 new.txt: fmt::write_i64_exp 58.93ns/iter +/- 4.62 ``` This patch fully eliminates unsafe pointer use (after rust-lang/rust#135265 and rust-lang/rust#136594). r? libs
Rollup of 5 pull requests Successful merges: - rust-lang/rust#139524 (Add socket extensions for cygwin) - rust-lang/rust#145940 (single buffer for exponent fmt of integers) - rust-lang/rust#146206 (identity uses are ok, even if there are no defining uses) - rust-lang/rust#146272 (Update comment for `-Werror` on LLVM builds) - rust-lang/rust#146280 (Make `LetChainsPolicy` public for rustfmt usage) r? `@ghost` `@rustbot` modify labels: rollup
lint ImproperCTypes: refactor linting architecture (part 1) This is the first PR in an effort to split rust-lang/rust#134697 into individually-mergeable parts. This one focuses on properly packaging the lint and its tests, as well as properly separate the "linting" and "type-checking" code. There is exactly one user-visible change: the safety of `Option<Box<FFISafePointee>>` is now the same in `extern` blocks and function definitions: it is safe. r? `@tgross35` because you are already looking at the original
...ems-take2, r=RalfJung Miri: non-deterministic floating point operations in foreign_items Take 2 of rust-lang/rust#143906. The last 2 commits are what changed compared to the original pr. Verified the tests using (fish shell): ```fish env MIRIFLAGS="-Zmiri-max-extra-rounding-error -Zmiri-many-seeds" ./x miri --no-fail-fast std core coretests -- f32 f64 ``` r? `@RalfJung`
GVN: Allow reusing aggregates if LHS is not a simple local. This resolves a FIXME in the code. I don't see a reason not to allow this.
Add amdgpu test for addrspacecasting global vars and the gpu-kernel calling convention Add two tests that can now be added, as the amdgpu is merged. - Global variables are casted to the default address space since rust-lang/rust#135026 - gpu-kernel calling convention, translatos to amdgpu_kernel rust-lang/rust#135047 Tracking issue: rust-lang/rust#135024
Reimplement DestinationPropagation according to live ranges. This PR reimplements DestinationPropagation as a problem of merging live-ranges of locals. We merge locals that have disjoint live-ranges. This allows merging several locals in the same round by updating live range information. Live ranges are mainly computed using the `MaybeLiveLocals` analysis. The subtlety is that we split each statement and terminator in 2 positions. The first position is the regular statement. The second position is a shadow, which is always more live. It encodes partial writes and dead writes as a local being live for half a statement. This half statement ensures that writes conflict with another local's writes and regular liveness. r? `@Amanieu`
This updates the rust-version file to 2f3f27bf79ec147fec9d2e7980605307a74067f4.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 2f3f27bf79ec147fec9d2e7980605307a74067f4 Filtered ref: 82a5eaf Upstream diff: rust-lang/rust@a1dbb44...2f3f27b This merge was created using https://github.com/rust-lang/josh-sync.
Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide
or r? <username>
.
@rustbot
rustbot
added
the
S-waiting-on-review
Status: this PR is waiting for a reviewer to verify its content
label
Sep 8, 2025
@rustbot
rustbot
removed
the
S-waiting-on-review
Status: this PR is waiting for a reviewer to verify its content
label
Sep 8, 2025
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.