Repository navigation
Rustc pull update - #2246
Merged
Merged
Rustc pull update#2246
Conversation
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@1396514 Filtered ref: rust-lang/rustc-dev-guide@30addec Upstream diff: rust-lang/rust@44e34e1...1396514 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@c78a294 Filtered ref: rust-lang/rustc-dev-guide@2f61036 Upstream diff: rust-lang/rust@1396514...c78a294 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
all but one test suite support revisions directive
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@eda4fc7 Filtered ref: rust-lang/rustc-dev-guide@b8ceb2d Upstream diff: rust-lang/rust@e7d90c6...eda4fc7 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
add autodiff download instructions
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@91021cc Filtered ref: rust-lang/rustc-dev-guide@3ea5559 Upstream diff: rust-lang/rust@1e21831...91021cc This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
add chapter on projection vs trait split
projection vs trait bound split cleanup
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@9602bda Filtered ref: rust-lang/rustc-dev-guide@17d8cbf Upstream diff: rust-lang/rust@562dee4...9602bda This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
new rustc_on_unimplemented match values
Document AST lowering implementation
…otif-grp-links Fix GPU target notification group links
Update neovim instructions for neovim 0.11+
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@e22c616 Filtered ref: rust-lang/rustc-dev-guide@592b9fb Upstream diff: rust-lang/rust@17584a1...e22c616 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
…r/new-features-params implementing-new-features.md: update parameters to `declare_features!`
Mentions rustc-docs for rustc_private
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@045b177 Filtered ref: rust-lang/rustc-dev-guide@2622ac3 Upstream diff: rust-lang/rust@f53b654...045b177 This merge was created using https://github.com/rust-lang/josh-sync.
…c-pull Rustc pull update
Add CI testing instructions for offload
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@f2b291d Filtered ref: rust-lang/rustc-dev-guide@f2fe946 Upstream diff: rust-lang/rust@045b177...f2b291d This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
…0505-stage Fix name of first compiled stage, as stage0 is downloaded
Add docs for non defining vs defining uses in opaque types
…uwer Rollup of 5 pull requests Successful merges: - rust-lang/rust#162395 (Make more float intrinsics generic) - rust-lang/rust#164636 (Remove `record_*` macros from the metadata encoder) - rust-lang/rust#164624 (make `RustaceansAreAwesome` satisfy projection clauses) - rust-lang/rust#164695 ([tiny] Include trait definition line when pointing at assoc function in E0308) - rust-lang/rust#164744 (some `Attribute`/`AttributeExt` cleanups)
Bust Docker cache To force rebuild of all Docker containers, so that they can update their CA certificates, to deal with https://emudhra.we-have-a-problem.com/.
We run into the lang item being defined twice when running stdarch (so, `core_arch`) CI. Move the lang item into `core` proper. We run CI tests for the lang item in the main repo, so we should not touch it in stdarch anyway. This core definition is transparently wrapped in core_arch, so the methods and docs all remain there.
DirEntry::metadata: use dirfd on more targets Most of the BSDs support `dirfd` and `fstatat` just fine but for some reason we've not been using it for `DirEntry::metadata`. This syncs the `cfg` for using `dirfd` with the one that we use in `Dir::close` for the FD sanity check. Those target evidently all have `dirfd` as we're using it there, and that's a strict subset of the targets that have `Dir` handles, so they should support `fstatat` as well. try-job: *bsd* try-job: *various*
github-actions
Bot
force-pushed
the
rustc-pull
branch
from
October 26, 2026 04:15
6d90013 to
e742cde
Compare
…biguous_or_test, r=BoxyUwU assumptions_on_binders: Test mixed ambiguous ORs Follow up to rust-lang/rust#162442. Boxy pointed out that one got superseded by rust-lang/rust#162935, and yeah, once adwin's PR removes `propagate_ambiguity` there's nothing left for my code change to do. The test still covers a case nothing else does though, so this just moves the test over. The idea is an OR where one side is an alias outlives with a non-lifetime binder, which ends up ambiguous, and the other side is something we can prove from the root assumptions. That should hold no matter which order the OR is in. I also kept the cases that should still error, an AND where the ambiguous part is still required and an OR where every side is ambiguous. adwin mentioned in rust-lang/rust#162935 they weren't sure what to do with the non-lifetime binder ambiguity yet, so I think it's nice to have something pinning down how it behaves today. cc @BoxyUwU
…s, r=BoxyUwU trait solver: Resolve region vars before eager placeholder handling Region vars can already have known values in the unification table while the stored constraint still contains the vars. `max_universe` looks through the table, but `PlaceholderReplacer` sees the stored terms. In Boxy's nested binder case, that leaves an alias constraint ambiguous even after equating its regions. I used `deeply_resolve_via_unification_table` at the start of eager handling for each universe. That leaves only the current universe's placeholder to bind and lets the result match the actual assumption on the outer binder. Unknown vars stay unknown. The test DSL needed a small equality operation, `'a2 = 'a`, to reach this state. The paired outlives constraints in the original example go straight into solver storage and don't populate the table on current main. I added the version with real table equalities, plus a chained-var case. Both adjusted cases fail when the resolution call is removed and pass with it. I think keeping this separate makes rust-lang/rust#157984 easier to review. The broader equality and subtyping work stays there.
…gross35 move `ppcf128` lang item to `core::num::imp` tracking issue: rust-lang/rust#163323 cc rust-lang/rust#161787 We run into the lang item being defined twice when running stdarch (so, `core_arch`) CI. Move the lang item into `core` proper. We run CI tests for the lang item in the main repo, so we should not touch it in stdarch anyway. r? tgross35
Point at `impl` through which associated function is provided
When encountering a type mismatch in arguments of a call expr of an associated function, point not only at the `trait` but also the `impl`.
```
error[E0308]: mismatched types
--> tests/ui/fn_traits/point-at-impl-in-call-argument-type-error.rs:9:21
|
9 | let b = B::from(a); //~ ERROR: mismatched types
| ------- ^ expected `B`, found `A`
| |
| arguments to this function are incorrect
|
note: associated function defined here
--> library/core/src/convert/mod.rs:594:8
|
588 | pub const trait From<T>: Sized {
...
594 | fn from(value: T) -> Self;
| ^^^^
note: associated function provided through this blanket `impl`
--> library/core/src/convert/mod.rs:787:1
|
787 | const impl<T> From<T> for T {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
Includes/conflicts with rust-lang/rust#164695.
Fix rust-lang/rust#104712.
Use explicit target cpu in tests parsing generated asm These tests expect generated asm based on assumed target CPU, but some Linux distros use a different CPU baseline, causing a false positive. Found in 1.99.1 builds of Fedora and RHEL 10
…sleywiser Add regression tests for transmutability issues The commit with the fix is ee135be0415aa531339d2a536207f32b15a0acac, and is associated with the PR: rust-lang/rust#154991 Closes rust-lang/rust#153357 Closes rust-lang/rust#154536
…=oli-obk
Account for trait object with implicit `'static` lifetime in field type being returned
Point at `dyn Trait` in field of type definition when it introduces a `'static` obligation:
```
error: lifetime may not live long enough
--> $DIR/return-expr-with-implicit-trait-object-static-obligation.rs:11:24
|
LL | pub fn new(string: &str) -> Self {
| - let's call the lifetime of this reference `'1`
LL | Thing {
LL | chars: Box::new(string.chars()),
| ^^^^^^^^^^^^^^^^^^^^^^^^ coercion requires that `'1` must outlive `'static`
|
note: `dyn Trait` introduces an implicit `'static` obligation
--> $DIR/return-expr-with-implicit-trait-object-static-obligation.rs:5:20
|
LL | pub struct Thing {
LL | chars: Box<dyn Iterator<Item = char>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider introducing an explicit lifetime
|
LL ~ pub struct Thing<'a> {
LL ~ chars: Box<dyn Iterator<Item = char> + 'a>,
|
```
Fix rust-lang/rust#78547.
Point at introduction of unmet lifetime:
```
error: lifetime may not live long enough
--> $DIR/return-expr-with-implicit-trait-object-static-obligation.rs:24:13
|
LL | impl Thing<'_> {
| -- lifetime `'2` introduced here
LL | pub fn new(string: &str) -> Self {
| - ---- return type is `b::Thing<'2>`
| |
| let's call the lifetime of this reference `'1`
LL | / Thing {
LL | | chars: Box::new(string.chars()),
LL | | }
| |_____________^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
```
```
error: lifetime may not live long enough
--> $DIR/issue-52742.rs:12:9
|
LL | impl Foo<'_, '_> {
| -- lifetime `'2` introduced here
LL | fn take_bar(&mut self, b: Bar<'_>) {
| --------- - -- lifetime `'1` introduced here
| | |
| | has type `Bar<'1>`
| has type `&mut Foo<'_, '2>`
LL | self.y = b.z
| ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
```
…param, r=khyperia Self param after const param closes: rust-lang/rust#164570 The main issue here is that a const param before self could cause fn_has_self_parameter to incorrectly classify a function as a method, since removing the const param left self first. This PR fixes that by checking whether a const param has arg_pos == 0. It also adds a checked_sub now instead of vanilla '-'. r? @khyperia
Switch from `insta` to `expect-test` in bootstrap While I like `insta` a bit more for snapshot tests, it has a disadvantage that it requires installing a separate binary (`cargo insta`) for blessing *inline* snapshot tests. That is not very intuitive for people who need to bless inline bootstrap snapshots, and then realize that `x test bootstrap --bless` does nothing. This PR switches from `insta` to `expect-test`, which allows updating inline snapshots via an environment variable while running `cargo test`, without requiring a separate binary. `expect-test` is a `rust-lang` (well, `rust-analyzer`) [repository](https://github.com/rust-analyzer/expect-test), so we should be good there, and it even removes two `dev` dependencies from bootstrap. Changing the inline snapshots was a bit non-trivial to do with a regex (at least in my IDE) because we have to switch the argument order, which is not that simple across multiple lines. So I decided to try https://github.com/ast-grep/ast-grep. I used an LLM to propose the initial rewrite rule, and then modified it slightly and ran `ast-grep` to update the code. The applied rule was this: ```yaml id: insta-to-expect-test language: rust rule: pattern: insta::assert_snapshot!($$$ARGS) transform: LHS: replace: source: $$$ARGS replace: '(?s)^(?<lhs>.*?),\s*@(?<rhs>.*?)\s*,?\s*$' by: '${lhs}' RHS: replace: source: $$$ARGS replace: '(?s)^(?<lhs>.*?),\s*@(?<rhs>.*?)\s*,?\s*$' by: '${rhs}' fix: expect_test::expect![[$RHS]].assert_eq(&$LHS) ``` You can test it in the `ast-grep` [playground](https://ast-grep.github.io/playground.html#eyJtb2RlIjoiQ29uZmlnIiwibGFuZyI6InJ1c3QiLCJxdWVyeSI6IiIsInJld3JpdGUiOiJzb3VyY2U6ICQkJEFSR1Ncb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). I used double brackets because it formatted better (IMO) with `x fmt`. Most of the diff comes from the this mechanical change. I split it into a separate commit for easier review. I tried to replicate the disk snapshots as closely as possible, by even including the source file path in them, though I think it is not very useful. There are some newline changes in a few tests, I didn't feel like it is worth fixing those. CC @Zalathar I suppose that we should do the same for `citool`, I can send that as a follow-up. Fixes: rust-lang/rust#164837
…=nnethercote Add regression tests for #156380 Adds two ui tests in `tests/ui/reborrow` for the two snippets in rust-lang/rust#156380. The first one (moving a `String` out of a `Reborrow` type twice) was fixed by rust-lang/rust#156784. That PR has its own test but with a different struct, so this adds the exact repro from the issue. The second one (getting two aliasing `&mut i32` through a generic field) had no test. It compiles on nightly-2026-08-28 and errors on nightly-2026-08-29, which points at rust-lang/rust#159103. I checked both by hand: they compile on nightly-2026-05-20 and error on the current nightly, with and without `-Znext-solver`. Fixes rust-lang/rust#156380 Disclaimer - AI was used to explore and get the understanding of the codebase. All the changes and tests are executed and reviewed by me personally. Thansk
Add codegen test for power of two implying nonzero with debuginfo Fixes rust-lang/rust#137359 Fixed by the LLVM 23 update
…uwer Rollup of 14 pull requests Successful merges: - rust-lang/rust#163219 (assumptions_on_binders: Test mixed ambiguous ORs) - rust-lang/rust#164985 (Only recover if we may for `recover_missing_dot`) - rust-lang/rust#161521 (Replace check_attr_crate_level with check_target for #[doc]) - rust-lang/rust#162530 (Move #[naked] attribute check to attribute parsing stage) - rust-lang/rust#164103 (trait solver: Resolve region vars before eager placeholder handling) - rust-lang/rust#164692 (move `ppcf128` lang item to `core::num::imp`) - rust-lang/rust#164702 (Point at `impl` through which associated function is provided) - rust-lang/rust#164741 (Use explicit target cpu in tests parsing generated asm) - rust-lang/rust#164767 (Add regression tests for transmutability issues) - rust-lang/rust#164776 (Account for trait object with implicit `'static` lifetime in field type being returned) - rust-lang/rust#164791 (Self param after const param) - rust-lang/rust#164856 (Switch from `insta` to `expect-test` in bootstrap) - rust-lang/rust#164888 (Add regression tests for #156380) - rust-lang/rust#164967 (Add codegen test for power of two implying nonzero with debuginfo)
github-actions
Bot
force-pushed
the
rustc-pull
branch
from
October 26, 2026 22:43
e742cde to
4ea6d31
Compare
added 3 commits
October 27, 2026 02:46
This updates the rust-version file to 16d1ffac17ad8b739e32483ac2e65fe7e1804977.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Previous upstream ref: rust-lang/rust@260f1ac New upstream ref: rust-lang/rust@16d1ffa Filtered ref: 7baf70a Upstream diff: rust-lang/rust@260f1ac...16d1ffa This merge was created using https://github.com/rust-lang/josh-sync.
github-actions
Bot
force-pushed
the
rustc-pull
branch
from
October 27, 2026 02:47
4ea6d31 to
769dd61
Compare
tgross35
enabled auto-merge
October 27, 2026 02:56
This was referenced Oct 27, 2026
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.