Commit Graph

38486 Commits

Author SHA1 Message Date
Jonathan Brouwer
b62edc350c Rollup merge of #152730 - BennoLossin:field-projections-lang-item, r=oli-obk
add field representing types

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152730)*

> [!NOTE]
> This is a rewrite of #146307 by using a lang item instead of a custom `TyKind`. We still need a `hir::TyKind::FieldOf` variant, because resolving the field name cannot be done before HIR construction. The advantage of doing it this way is that we don't need to make any changes to types after HIR (including symbol mangling). At the very beginning of this feature implementation, I tried to do it using a lang item, but then quickly abandoned the approach, because at that time I was still intending to support nested fields.

Here is a [range-diff](605f49b274..f5f42d1e03) between the two PRs

---

# Add Field Representing Types (FRTs)

This PR implements the first step of the field projection lang experiment (Tracking Issue: rust-lang/rust#145383). Field representing types (FRTs) are a new kind of type. They can be named through the use of the `field_of!` macro with the first argument being the type and the second the name of the field (or variant and field in the case of an enum). No nested fields are supported.

FRTs natively implement the `Field` trait that's also added in this PR. It exposes information about the field such as the type of the field, the type of the base (i.e. the type that contains the field) and the offset within that base type. Only fields of non-packed structs are supported, fields of enums an unions have unique types for each field, but those do not implement the `Field` trait.

This PR was created in collaboration with @dingxiangfei2009, it wouldn't have been possible without him, so huge thanks for mentoring me!

I updated my library solution for field projections to use the FRTs from `core` instead of creating my own using the hash of the name of the field. See the [Rust-for-Linux/field-projection `lang-experiment` branch](https://github.com/Rust-for-Linux/field-projection/tree/lang-experiment).

## API added to `core::field`

```rust
pub unsafe trait Field {
    type Base;

    type Type;

    const OFFSET: usize;
}

pub macro field_of($Container:ty, $($fields:expr)+ $(,)?);
```

Along with a perma-unstable type that the compiler uses in the expansion of the macro:

```rust
#[unstable(feature = "field_representing_type_raw", issue = "none")]
pub struct FieldRepresentingType<T: ?Sized, const VARIANT: u32, const FIELD: u32> {
    _phantom: PhantomData<T>,
}
```

## Explanation of Field Representing Types (FRTs)

FRTs are used for compile-time & trait-level reflection for fields of structs & tuples. Each struct & tuple has a unique compiler-generated type nameable through the `field_of!` macro. This type natively contains information about the field such as the outermost container, type of the field and its offset. Users may implement additional traits on these types in order to record custom information (for example a crate may define a [`PinnableField` trait](https://github.com/Rust-for-Linux/field-projection/blob/lang-experiment/src/marker.rs#L9-L23) that records whether the field is structurally pinned).

They are the foundation of field projections, a general operation that's generic over the fields of a struct. This genericism needs to be expressible in the trait system. FRTs make this possible, since an operation generic over fields can just be a function with a generic parameter `F: Field`.

> [!NOTE]
> The approach of field projections has changed considerably since this PR was opened. In the end we might not need FRTs, so this API is highly experimental.

FRTs should act as though they were defined as `struct MyStruct_my_field<StructGenerics>;` next to the struct. So it should be local to the crate defining the struct so that one can implement any trait for the FRT from that crate. The `Field` traits should be implemented by the compiler & populated with correct information (`unsafe` code needs to be able to rely on them being correct).

## TODOs

There are some `FIXME(FRTs)` scattered around the code:
- Diagnostics for `field_of!` can be improved
  - `tests/ui/field_representing_types/nonexistent.rs`
  - `tests/ui/field_representing_types/non-struct.rs`
  - `tests/ui/field_representing_types/offset.rs`
  - `tests/ui/field_representing_types/not-field-if-packed.rs`
  - `tests/ui/field_representing_types/invalid.rs`
- Simple type alias already seem to work, but might need some extra work in `compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs`

r? @oli-obk
2026-02-28 12:52:52 +01:00
Jonathan Brouwer
7ad6ec0536 Rollup merge of #149027 - reddevilmidzy:suggest, r=madsmtm
Improve cross-crate trait impl param mismatch suggestions

resolve: rust-lang/rust#106999
2026-02-28 12:52:52 +01:00
Jonathan Brouwer
8698ce8d7e Rollup merge of #153211 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to fbc7b76b27.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-28 12:52:51 +01:00
Lukas Wirth
fbc7b76b27 Merge pull request #21669 from Shourya742/2026-02-18-add-span-parent
Implement Span::SpanParent for proc-macro-srv
2026-02-28 07:25:41 +00:00
bors
62f53910d3 Auto merge of #152838 - Kobzol:cargo-miri-cargo-in-tree-, r=jieyouxu
Use in-tree Cargo when testing stage 2+ cargo miri



Closes: https://github.com/rust-lang/rust/issues/152772

r? @jieyouxu
2026-02-28 05:04:20 +00:00
A4-Tacks
6e0c2683af Merge pull request #21720 from SpiZeak/migrate-generate-derive
Migrate `generate_derive` assist to SyntaxEditor
2026-02-28 04:58:40 +00:00
bors
3d48b93988 Auto merge of #152702 - oli-obk:nonnulltransmute, r=scottmcm
Prepare NonNull for pattern types



Pull out the changes that affect some tests, but do not require pattern types.

See https://github.com/rust-lang/rust/pull/136006#discussion_r2806740338 for what triggered this PR

r? @scottmcm
2026-02-27 13:04:46 +00:00
SpiZeak
fa0e4ed012 fix: migrate to SyntaxEditor in generate_derive assist 2026-02-27 11:09:44 +01:00
bors
2456d9f1bc Auto merge of #151247 - chenyukang:yukang-fix-const-recover-151149, r=estebank
Try to recover from over-parsing in const item with missing semicolon

Fixes rust-lang/rust#151149

r? @estebank
2026-02-27 09:09:21 +00:00
Shoyu Vanilla (Flint)
8494a8b3b7 Merge pull request #21710 from SpiZeak/migrate-fix-visibility
Migrate fix_visibility assist to use SyntaxEditor
2026-02-27 07:55:59 +00:00
SpiZeak
dd8e886398 feat: migrate fix_visibility assist to SyntaxEditor 2026-02-27 08:19:56 +01:00
Shoyu Vanilla (Flint)
5a7ae4de04 Merge pull request #21716 from lnicola/lockfile-path-nightly
fix: Use -Zlockfile-path on every 1.95 nightly
2026-02-27 07:03:40 +00:00
Laurențiu Nicola
ba09b3315e Use -Zlockfile-path on every 1.95 nightly 2026-02-27 08:53:39 +02:00
Shoyu Vanilla (Flint)
df080dbbd5 Merge pull request #21706 from A4-Tacks/redundant-enum-variant-pat
fix: no complete enum variant qualifier in pat
2026-02-27 02:17:11 +00:00
Shoyu Vanilla (Flint)
d33510122b Merge pull request #21698 from A4-Tacks/indent-iflet-with-match
fix: Fix scrutinee expr indent for replace_if_let_with_match
2026-02-27 02:12:58 +00:00
Shoyu Vanilla (Flint)
d3ea35e498 Merge pull request #21699 from Albab-Hasan/fix/ptr-cast-add-auto-trait-not-detected
fix: Detect E0804 when casting raw ptr-to-dyn adds auto traits
2026-02-27 02:11:49 +00:00
bors
7a8face496 Auto merge of #153108 - alexcrichton:revert, r=joboet
Revert "Simplify internals of `{Rc,Arc}::default`"

This reverts rust-lang/rust#152591 following a [perf run being done](https://github.com/rust-lang/rust/pull/152591#issuecomment-3960081137). I'm not really positioned at this time to dive in further and understand the performance regressions, so I'll back away from `Rc`/`Arc` and leave them as-is.
2026-02-26 19:51:40 +00:00
Lukas Wirth
56b59a8328 Merge pull request #21708 from lnicola/no-invalid-notification-panic
fix: Don't panic on invalid LSP notifications
2026-02-26 08:27:07 +00:00
bors
d5444f5d1c Auto merge of #153067 - arlosi:update-cargo, r=ehuss
Update cargo submodule

8 commits in 8cc0cb136772b8f54eafe0d163fcb7226a06af0c..f298b8c82da0cba538516b45b04a480fc501d4c0 2026-02-17 12:16:26 +0000 to 2026-02-24 21:59:20 +0000
- fix(host-config): fix panic when cross-compiling with host-config (rust-lang/cargo#16674)
- doc: improve documentation on using cfg values with build scripts (rust-lang/cargo#16671)
- Fix typo in cargo-yank docs (rust-lang/cargo#16656)
- fix(job_queue): Handle Clippy CLI arguments in `fix` message (rust-lang/cargo#16652)
- Add a test for fingerprint checking when a symlink target changes (rust-lang/cargo#16661)
- Fix parallel locking when `-Zfine-grain-locking` is enabled (rust-lang/cargo#16659)
- fix(cli): Remove `--lockfile-path` (rust-lang/cargo#16621)
- test(build-std): Update error message (rust-lang/cargo#16658)
2026-02-26 08:03:30 +00:00
bors
eee277d035 Auto merge of #153116 - jhpratt:rollup-yjBVB1Y, r=jhpratt
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#148146 (CI: use alternative disks if available)
 - rust-lang/rust#151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
 - rust-lang/rust#153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination)
 - rust-lang/rust#153075 (mGCA: Lower negated literals directly and reject non-integer negations)
 - rust-lang/rust#153078 (Remove `QuerySystemFns`)
 - rust-lang/rust#153089 (interpret: avoid dummy spans in the stacktrace)
 - rust-lang/rust#153111 (Refactor url_parts to return is_absolute instead of out param)
 - rust-lang/rust#149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls)
 - rust-lang/rust#153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.)
 - rust-lang/rust#153063 (`is_ty_must_use`: do not require a `span` argument)
 - rust-lang/rust#153071 (Update books)
 - rust-lang/rust#153092 (Remove redundant self usages)
 - rust-lang/rust#153094 (Simplify `AppendOnlyVec` iterators)

Failed merges:

 - rust-lang/rust#153091 (Migration of `LintDiagnostic` - part 4)
2026-02-26 04:36:00 +00:00
Jacob Pratt
fd9820cf16 Rollup merge of #153094 - cuviper:AppendOnlyVec-iters, r=Kivooeo
Simplify `AppendOnlyVec` iterators

This isn't a big deal, but I noticed that these iterators were more complicated than they need to be.
2026-02-25 21:42:59 -05:00
Jacob Pratt
7b5274a303 Rollup merge of #153092 - mu001999-contrib:cleanup/redundant-self, r=JonathanBrouwer
Remove redundant self usages

Extracted from https://github.com/rust-lang/rust/pull/152996.

r? petrochenkov
2026-02-25 21:42:58 -05:00
Jacob Pratt
e241c8c1a1 Rollup merge of #153029 - nnethercote:disallowed-pass-by-ref, r=Urgau
Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.

The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`.

The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints:
- `disallowed_macros`
- `disallowed_methods`
- `disallowed_names`
- `disallowed_script_idents`
- `disallowed_types`

The `pass_by_value` part of the name aligns with the following clippy lints:
- `needless_pass_by_value`
- `needless_pass_by_ref_mut`
- `trivially_copy_pass_by_ref`
- `large_types_passed_by_value` (less so)

r? @Urgau
2026-02-25 21:42:57 -05:00
Jacob Pratt
5abc695c5f Rollup merge of #153035 - Gelbpunkt:ppc64-callconv-llvm-abiname, r=RalfJung
rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from rust-lang/rust#150468 and also requested by @RalfJung [here](https://github.com/rust-lang/rust/pull/150468#discussion_r2842291237).

r? @RalfJung
2026-02-25 21:42:53 -05:00
Jacob Pratt
7a4fd242d5 Rollup merge of #151771 - hoodmane:wasm-double-panic, r=bjorn3
Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup

Previously this was not correctly implemented. Each funclet may need its own terminate block, so this changes the `terminate_block` into a `terminate_blocks` `IndexVec` which can have a terminate_block for each funclet. We key on the first basic block of the funclet -- in particular, this is the start block for the old case of the top level terminate function.

I also fixed the `terminate` handler to not be invoked when a foreign exception is raised, mimicking the behavior from msvc. On wasm, in order to avoid generating a `catch_all` we need to call `llvm.wasm.get.exception` and `llvm.wasm.get.ehselector`.
2026-02-25 21:42:53 -05:00
Jacob Pratt
032bcbcc46 Rollup merge of #148146 - the8472:ci-use-extra-disk, r=marcoieni
CI: use alternative disks if available

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/148146)*

cleaning up disk space takes a lot of time, sometimes [30 minutes](https://github.com/rust-lang/rust/actions/runs/18817052904/job/53686898697)
2026-02-25 21:42:52 -05:00
Laurențiu Nicola
26186144e7 Don't panic on invalid notifications 2026-02-25 21:06:33 +02:00
mu001999
f91be08311 Remove redundant self usages 2026-02-25 22:51:53 +08:00
A4-Tacks
423c466df5 fix: no complete enum variant qualifier in pat
Example
---
```rust
enum Enum { TupleV(u32), RecordV { field: u32 }, UnitV }
use Enum::*;
fn func() {
    if let $0 = unknown {}
}
```

**Before this PR**

```text
...
ev RecordV
ev TupleV
ev UnitV
bn RecordV {…} RecordV { field$1 }$0
bn TupleV(…)            TupleV($1)$0
bn UnitV                     UnitV$0
kw mut
kw ref
```

**After this PR**

```text
...
bn RecordV {…} RecordV { field$1 }$0
bn TupleV(…)            TupleV($1)$0
bn UnitV                     UnitV$0
kw mut
kw ref
```
2026-02-25 20:52:50 +08:00
Laurențiu Nicola
ff041aa337 Merge pull request #21681 from Wilfred/skip_test_on_nightly
internal: Skip rustfmt test if nightly toolchain is missing
2026-02-24 19:56:34 +00:00
Wilfred Hughes
57527228ad internal: Skip rustfmt test if nightly toolchain is missing
Currently the rustfmt slow test fails if you don't have a nightly
toolchain installed. We install a nightly toolchain on CI, but it's a
little confusing that tests can fail on a fresh checkout on a new
laptop.

Instead, skip this test if there's no nightly toolchain.
2026-02-24 14:26:32 -05:00
Albab-Hasan
da7b8bbec2 fix: detect E0804 when casting raw ptr-to-dyn adds auto traits
the `check_ptr_ptr_cast` function had an early return when the source and
destination dyn trait objects shared the same principal trait def id:

    if src_principal == dst_principal {
        return Ok(());
    }

this bypassed all three remaining checks that the code comment explicitly
listed as required: generic argument equality, projection equality, and
the auto-trait superset check. as a result, casts like
`*mut dyn Trait as *mut (dyn Trait + Send)` were silently accepted
instead of emitting E0804.

the fix removes the early return. `CastError::PtrPtrAddingAutoTraits` and
its diagnostic were already implemented — they just couldn't be reached.
the supertrait case (`trait Trait: Send`) continues to work correctly
because the auto-trait check already accounts for implied auto traits via
supertrait elaboration.
2026-02-24 18:59:02 +06:00
A4-Tacks
bc5e169317 fix: Fix scrutinee expr indent for replace_if_let_with_match
- Remove some redundant `.clone_for_update()` and `.indent(IndentLevel::single())`

Example
---
```rust
fn main() {
    if true {
        $0if true
            && false
        {
            foo()
        }
    }
}
```

**Before this PR**

```rust
fn main() {
    if true {
        match true
                    && false {
            true => foo(),
            _ => (),
        }
    }
}
```

**After this PR**

```rust
fn main() {
    if true {
        match true
            && false {
            true => foo(),
            _ => (),
        }
    }
}
```
2026-02-24 19:12:51 +08:00
bors
28e3ea56a8 Auto merge of #153026 - JonathanBrouwer:rollup-PAPpAYW, r=JonathanBrouwer
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#153007 (`rust-analyzer` subtree update)
 - rust-lang/rust#152670 (Simplify ThinLTO handling)
 - rust-lang/rust#152768 (Enable autodiff in ci for all major os)
 - rust-lang/rust#152908 (Enable rust.remap-debuginfo in the dist profile)
 - rust-lang/rust#152999 (Check importing `crate`/`$crate`/`super` after handling `self`)
 - rust-lang/rust#152003 (Reflection TypeId::trait_info_of)
 - rust-lang/rust#152976 (Revert relative paths for std links in rustc-docs)
 - rust-lang/rust#152985 (Port `#[feature]` to the new attribute system)
 - rust-lang/rust#152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - rust-lang/rust#152991 (fix interpreter tracing output)
 - rust-lang/rust#153004 (Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`)
 - rust-lang/rust#153008 (bootstrap.compiler.toml: update name of primary branch)
 - rust-lang/rust#153016 (Migration of `LintDiagnostic` - part 2)
 - rust-lang/rust#153020 (rustdoc: Improve sentence for documented empty impl blocks)

Failed merges:

 - rust-lang/rust#152988 (Port `#[register_tool]` to the new attribute system)
2026-02-24 03:43:46 +00:00
Jonathan Brouwer
873461831c Rollup merge of #153020 - GuillaumeGomez:improve-empty-impl-blocks-sentence, r=Urgau
rustdoc: Improve sentence for documented empty impl blocks

Part of rust-lang/rust#152874.

An impl block is not necessarily empty, so instead, better to precise that there are no **public** items.

r? @Urgau
2026-02-23 20:46:16 +01:00
Jonathan Brouwer
76fbafadcc Rollup merge of #153016 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer,Kivooeo
Migration of `LintDiagnostic` - part 2

Follow-up of https://github.com/rust-lang/rust/pull/152933.

More `LintDiagnostic` items being migrated to `Diagnostic`.

r? @JonathanBrouwer
2026-02-23 20:46:15 +01:00
Jonathan Brouwer
5c4f9095cd Rollup merge of #153008 - DanielEScherzer:patch-2, r=Zalathar
bootstrap.compiler.toml: update name of primary branch

Those building from the latest commit are building from `main`, not `master`
2026-02-23 20:46:15 +01:00
Jonathan Brouwer
18701fa010 Rollup merge of #153004 - Zalathar:tweak-modifiers, r=wesleywiser
Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`

This PR sorts the dummy items in the `modifiers` module, makes them non-pub to speed up find-all-references, and adds some extra explanation of what the dummy modifier items are for.

(These dummy items mostly just exist to carry documentation, and have no actual effect on compiler behaviour.)
2026-02-23 20:46:14 +01:00
Jonathan Brouwer
9b4164bfd0 Rollup merge of #152991 - RalfJung:interpret-step-trace, r=Kivooeo
fix interpreter tracing output

https://github.com/rust-lang/rust/pull/144708 accidentally changed the output of `MIRI_LOG=info <miri run>` in two ways:
- by adding `stmt=`/`terminator=` prefixes
- by changing the statement printing to be a verbose debug version instead of MIR pretty-printing

This fixes both of these:
- use explicit format strings to avoid the prefixes
- fix inconsistency in Debug impls for MIR types: now both TerminatorKind and StatementKind are pretty-printed, and Terminator and Statement just forward to the *Kind output
2026-02-23 20:46:14 +01:00
Jonathan Brouwer
223af3f579 Rollup merge of #152989 - JonathanBrouwer:rustc_inherit_overflow_checks, r=jdonszelmann
Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers

For https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163

r? @jdonszelmann
2026-02-23 20:46:13 +01:00
Jonathan Brouwer
5924302ae3 Rollup merge of #152985 - JonathanBrouwer:convert-feature, r=jdonszelmann
Port `#[feature]` to the new attribute system

Rebase of https://github.com/rust-lang/rust/pull/146652
2026-02-23 20:46:13 +01:00
Jonathan Brouwer
453b066cb8 Rollup merge of #152976 - arferreira:revert-relative-extern-paths, r=jieyouxu
Revert relative paths for std links in rustc-docs

Reverts rust-lang/rust#152243.

The relative path `../` passed via `--extern-html-root-url` produces broken links in compiler documentation. The path is wrong in both the published layout (`doc.rust-lang.org/nightly/nightly-rustc/` vs `doc.rust-lang.org/nightly/core/`) and local builds (`compiler-doc/` vs `doc/`).

This restores absolute URLs via `#[doc(html_root_url)]`.

Fixes rust-lang/rust#152917
Re-opens rust-lang/rust#151496

cc @eggyal
2026-02-23 20:46:12 +01:00
Jonathan Brouwer
feec59e8f7 Rollup merge of #152003 - 9SonSteroids:trait_info_of, r=oli-obk
Reflection TypeId::trait_info_of

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152003)*

This is for https://github.com/rust-lang/rust/issues/146922.

As https://github.com/rust-lang/rust/pull/151236 was requested to be remade by someone I implemented the functionality as `TypeId::trait_info_of` which additionally allows getting the vtable pointer to build `dyn` Objects in recursive reflection.

It allows checking if a TypeId implements a trait. Since this is my first PR feel free to tell me if there are any formal issues.
2026-02-23 20:46:11 +01:00
Jonathan Brouwer
41617cd988 Rollup merge of #152999 - mu001999-contrib:fix/152997, r=petrochenkov
Check importing `crate`/`$crate`/`super` after handling `self`

Fixes https://github.com/rust-lang/rust/issues/152997

r? petrochenkov
2026-02-23 20:46:11 +01:00
Jonathan Brouwer
235a90f214 Rollup merge of #152908 - bjorn3:dist_profile_remap_debuginfo, r=Kobzol
Enable rust.remap-debuginfo in the dist profile

Anyone who distributes rustc almost certainly wants to enable this option. It is necessary for reproducibility and for a distributed rustc local paths are useless anyway. And finally it improves privacy if you distribute a local build.
2026-02-23 20:46:11 +01:00
Jonathan Brouwer
c53d562d29 Rollup merge of #152768 - ZuseZ4:autodiff-in-ci-for-all-os, r=Kobzol
Enable autodiff in ci for all major os

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152768)*

Follow-up attempt to https://github.com/rust-lang/rust/pull/140064 after moving autodiff to dlopen.
It covers Linux (x86_64+aarch64), MacOS (aarch64), Windows (mingw-llvm aarch64+x86_64)
The extra build time for Enzyme are 180.27s on our slowest runner (aarch64-apple).

The follow-up distribution via rustup probably still needs a small fix, see https://github.com/rust-lang/rust/pull/151063#issuecomment-3778937008

Placing the downloaded libEnzyme artifact on my local linux under `~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib` enables my nightly compiler to run autodiff.

r? @Kobzol

closes: https://github.com/rust-lang/rust/pull/140064
closes: https://github.com/rust-lang/rust/pull/151243
closes: https://github.com/rust-lang/rust/pull/151063
2026-02-23 20:46:10 +01:00
Jonathan Brouwer
739b49fe4c Rollup merge of #152670 - bjorn3:lto_refactors12, r=petrochenkov
Simplify ThinLTO handling

This reduces the amount of complexity around ThinLTO module buffers. It removes duplication between `ModuleBuffer` and `ThinBuffer` (the latter was also used for fat LTO in some cases), clarifies when and where the ThinLTO summary is used (only for `--emit thin-link-bitcode`, ThinLTO performed by rustc rebuilds the summary every time). This also enables a follow up cleanup to reduce code duplication between red, green and imported codegen units.

Part of https://github.com/rust-lang/compiler-team/issues/908
2026-02-23 20:46:10 +01:00
Jonathan Brouwer
b3d5959cf5 Rollup merge of #153007 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 05da4cf3c4.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-23 20:46:09 +01:00
bors
61e7ff7fb2 Auto merge of #152791 - nnethercote:rm-const-FLAGS, r=Zalathar
Remove `const FLAGS`.

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152791)*

The performance wins provided by these types are meagre, and I don't think they justify the code complexity they introduce.

r? @Zalathar
2026-02-23 19:11:54 +00:00
Laurențiu Nicola
05da4cf3c4 Merge pull request #21694 from rust-lang/rustc-pull
minor: Rustc pull update
2026-02-23 07:04:48 +00:00