Commit graph

22240 commits

Author SHA1 Message Date
yukang
4d4f3151fb Add suggest alternatives for Out-of-range \x escapes 2025-11-24 19:36:20 +08:00
bors
42ec52baba Auto merge of #149258 - reddevilmidzy:ice, r=Kivooeo
Fix None handling for simplify_type in for_each_relevant_impl

resolve: rust-lang/rust#148062
2025-11-24 09:44:26 +00:00
reddevilmidzy
eb72e6764e Fix None handling for simplify_type in for_each_relevant_impl 2025-11-24 16:06:15 +09:00
bors
69408a877e Auto merge of #147760 - Walnut356:gnu_enum_viz, r=Mark-Simulacrum,saethlin
[Debugger Visualizers] Unify `*-gnu` and `*-msvc` enum output

Followup patch to rust-lang/rust#145218

Ports the msvc enum synthetic/summary logic to the gnu handlers so they have identical output. Also removes the "look-through-pointers" logic that caused rust-lang/rust#147450

<img width="629" height="220" alt="image" src="https://github.com/user-attachments/assets/d6ae44d5-232f-412d-b291-64ac52850c74" />

I know we don't run the test suite in CI anymore, but it's still useful locally so I updated the relevant tests.
2025-11-24 06:30:24 +00:00
Walnut
af1c2b277d update tests 2025-11-24 00:17:53 -06:00
reddevilmidzy
d3e4dd29a8 Use let...else consistently in user-facing diagnostics 2025-11-24 11:41:52 +09:00
Jacob Pratt
fdcf1f2d80
Rollup merge of #149197 - lolbinarycat:rustdoc-bad-render-attr, r=GuillaumeGomez
validate usage of crate-level doc attributes

fixes https://github.com/rust-lang/rust/issues/149187

r? `@GuillaumeGomez`
2025-11-23 16:28:13 -05:00
Jacob Pratt
2b3b95b54e
Rollup merge of #149179 - reddevilmidzy:test, r=JonathanBrouwer
Add regression test for 128705

close: rust-lang/rust#128705
2025-11-23 16:28:12 -05:00
binarycat
2ee6196078 validate usage of crate-level doc attributes 2025-11-23 12:00:53 -06:00
bors
e9acbd99d3 Auto merge of #147827 - saethlin:maybeuninit-codegen2, r=scottmcm
Fix MaybeUninit codegen using GVN

This is an alternative to https://github.com/rust-lang/rust/pull/142837, based on https://github.com/rust-lang/rust/pull/146355#discussion_r2421651968.

The general approach I took here is to aggressively propagate anything that is entirely uninitialized. GVN generally takes the approach of only synthesizing small types, but we need to generate large consts to fix the codegen issue.

I also added a special case to MIR dumps for this where now an entirely uninit const is printed as `const <uninit>`, because otherwise we end up with extremely verbose dumps of the new consts.

After GVN though, we still end up with a lot of MIR that looks like this:
```
StorageLive(_1);
_1 = const <uninit>;
_2 = &raw mut _1;
```
Which will break tests/codegen-llvm/maybeuninit-rvo.rs with the naive lowering. I think the ideal fix here is to somehow omit these `_1 = const <uninit>` assignments that come directly after a StorageLive, but I'm not sure how to do that. For now at least, ignoring such assignments (even if they don't come right after a StorageLive) in codegen seems to work.

Note that since GVN is based on synthesizing a `ConstValue`  which has a defined layout, this scenario still gets deoptimized by LLVM.
```rust
#![feature(rustc_attrs)]
#![crate_type = "lib"]
use std::mem::MaybeUninit;

#[unsafe(no_mangle)]
pub fn oof() -> [[MaybeUninit<u8>; 8]; 8] {
    #[rustc_no_mir_inline]
    pub fn inner<T: Copy>() -> [[MaybeUninit<T>; 8]; 8] {
        [[MaybeUninit::uninit(); 8]; 8]
    }

    inner()
}
```
This case can be handled correctly if enough inlining has happened, or it could be handled by post-mono GVN. Synthesizing `UnevaluatedConst` or some other special kind of const seems dubious.
2025-11-23 17:09:07 +00:00
bors
122cbd0438 Auto merge of #147804 - tmiasko:move-copy, r=cjgillot,saethlin
Turn moves into copies after copy propagation

Previously copy propagation presumed that there is further unspecified distinction between move operands and copy operands in assignments and propagated moves from assignments into terminators. This is inconsistent with current operational semantics.

Turn moves into copies after copy propagation to preserve existing behavior.

Fixes https://github.com/rust-lang/rust/issues/137936.
Fixes https://github.com/rust-lang/rust/issues/146423.

r? `@cjgillot`
2025-11-23 13:56:14 +00:00
Ben Kimock
1a4852c5fe Fix MaybeUninit codegen using GVN 2025-11-23 08:23:49 -05:00
bors
e0e204f3e9 Auto merge of #149096 - chenyukang:yukang-fix-unused-vars-148373, r=oli-obk
Skip unused variables warning for unreachable code

Fixes rust-lang/rust#148373

These warnings are not reported on stable branch, but are now reported on the beta.

I tried another solution to record whether a `local` is reachable in `find_dead_assignments`, but the code in this PR seems simpler.

r? `@cjgillot`
2025-11-23 04:14:38 +00:00
Matthias Krüger
cb50c01887
Rollup merge of #149185 - Jules-Bertholet:fix-149092, r=chenyukang
Handle cycles when checking impl candidates for `doc(hidden)`

Fixes https://github.com/rust-lang/rust/issues/149092
2025-11-22 18:41:23 +01:00
Matthias Krüger
e33b17837e
Rollup merge of #149168 - lapla-cogito:ice_148622, r=tiif
Fix ICE when collecting opaques from trait method declarations

fixes rust-lang/rust#148622

When using an `opaque` type as a `const` generic parameter, the compiler would attempt to collect TAIT from trait method declarations, causing an ICE by panicking in `hir_body_owned_by`.
2025-11-22 18:41:22 +01:00
Matthias Krüger
cef578b3a9
Rollup merge of #149072 - chenyukang:yukang-fix-unused-148960, r=davidtwco
Fix the issue of unused assignment from MIR liveness checking

Fixes rust-lang/rust#148960
Fixes rust-lang/rust#148418

r? ``@davidtwco``

cc ``@cjgillot``

My first try on MIR related code, so it may not be the best fix.
2025-11-22 18:41:21 +01:00
Matthias Krüger
0279cba1f6
Rollup merge of #149065 - Muscraft:annotate-snippets-regressions, r=davidtwco
Address annotate-snippets test differences

When `annotate-snippets` became the default renderer on `nightly`, it came with a few rendering differences. I was not entirely happy with a few of the differences, and after talking with ``@davidtwco`` about them, I decided to address those that seemed like regressions.

r? ``@davidtwco``
2025-11-22 18:41:20 +01:00
Matthias Krüger
a2138ef8e6
Rollup merge of #148407 - Urgau:suspicious_int_mutable_consts, r=JonathanBrouwer
Warn against calls which mutate an interior mutable `const`-item

## `const_item_interior_mutations`

~~`interior_mutable_const_item_mutations`~~

~~`suspicious_mutation_of_interior_mutable_consts`~~

*warn-by-default*

The `const_item_interior_mutations` lint checks for calls which mutates an interior mutable const-item.

### Example

```rust
use std::sync::Once;

const INIT: Once = Once::new(); // using `INIT` will always create a temporary and
                                // never modify it-self on use, should be a `static`
                                // instead for shared use

fn init() {
    INIT.call_once(|| {
        println!("Once::call_once first call");
    });
}
```

```text
warning: mutation of an interior mutable `const` item with call to `call_once`
  --> a.rs:11:5
   |
11 |       INIT.call_once(|| {
   |       ^---
   |       |
   |  _____`INIT` is a interior mutable `const` item of type `std::sync::Once`
   | |
12 | |         println!("Once::call_once first call");
13 | |     });
   | |______^
   |
   = note: each usage of a `const` item creates a new temporary
   = note: only the temporaries and never the original `const INIT` will be modified
   = help: for more details on interior mutability see <https://doc.rust-lang.org/reference/interior-mutability.html>
   = note: `#[warn(const_item_interior_mutations)]` on by default
help: for a shared instance of `INIT`, consider making it a `static` item instead
   |
 6 - const INIT: Once = Once::new(); // using `INIT` will always create a temporary and
 6 + static INIT: Once = Once::new(); // using `INIT` will always create a temporary and
   |
```

### Explanation

Calling a method which mutates an interior mutable type has no effect as const-item are essentially inlined wherever they are used, meaning that they are copied directly into the relevant context when used rendering modification through interior mutability ineffective across usage of that const-item.

The current implementation of this lint only warns on significant `std` and `core` interior mutable types, like `Once`, `AtomicI32`, ... this is done out of prudence and may be extended in the future.

----

This PR is an targeted alternative to rust-lang/rust#132146. It avoids false-positives by adding an internal-only attribute `#[rustc_should_not_be_called_on_const_items]` on methods and functions that mutates an interior mutale type through a shared reference (mutable refrences are already linted by the `const_item_mutation` lint).

It should also be noted that this is NOT an uplift of the more general [`clippy::borrow_interior_mutable_const`](https://rust-lang.github.io/rust-clippy/master/index.html#/borrow_interior_mutable_const) lint, which is a much more general lint regarding borrow of interior mutable types, but has false-positives that are completly avoided by this lint.

A simple [GitHub Search](https://github.com/search?q=lang%3Arust+%2F%28%3F-i%29const+%5Ba-zA-Z0-9_%5D*%3A+Once%2F&type=code) reveals many instance where the user probably wanted to use a `static`-item instead.

----

````@rustbot```` labels +I-lang-nominated +T-lang
cc ````@traviscross````
r? compiler

Fixes [IRLO - Forbidding creation of constant mutexes, etc](https://internals.rust-lang.org/t/forbidding-creation-of-constant-mutexes-etc/19005)
Fixes https://github.com/rust-lang/rust/issues/132028
Fixes https://github.com/rust-lang/rust/issues/40543
2025-11-22 18:41:20 +01:00
Urgau
c48dce1187 Allow const_item_interior_mutations in tests 2025-11-22 14:48:40 +01:00
Urgau
dc2a61eccd Add const_item_interior_mutations lint 2025-11-22 14:48:40 +01:00
bors
af17d59d71 Auto merge of #149044 - clubby789:implicit-return-span, r=cjgillot
Reduce confusing `unreachable_code` lints

Closes rust-lang/rust#149042

Attempts to be smarter about identifying 'real'/user-written unreachable code to raise the lint
2025-11-22 06:28:24 +00:00
yukang
76bd555913 Avoid suggesting constrain the associated type to a trait 2025-11-22 10:20:14 +08:00
Guillaume Gomez
228b49e791
Rollup merge of #149151 - mu001999-contrib:test/use-path-kw, r=petrochenkov
Add test for importing path-segment keyword

Adding new test to make a snapshot of current compiler's behavior. See https://github.com/rust-lang/rust/pull/146972#issuecomment-3532148571

r? `@petrochenkov`
2025-11-21 21:34:29 +01:00
Guillaume Gomez
b2f5cc7827
Rollup merge of #149098 - Jamesbarford:fix/148919-tuple-struct-lint, r=JonathanBrouwer
Fix error message for calling a non-tuple struct

This feels a bit odd checking for `"0"` but I can't see how else to check for it being a Tuple

closes https://github.com/rust-lang/rust/issues/148919
2025-11-21 21:34:28 +01:00
Guillaume Gomez
629a283b98
Rollup merge of #149043 - aDotInTheVoid:is-this-real-is-this-out-of-spite-does-it-matter, r=GuillaumeGomez
rustdoc-json: add rlib path to ExternalCrate to enable robust crate resolution

Historically, it's not been possible to robustly resolve a cross-crate item in rustdoc-json. If you had a `Id` that wasn't in `Crate::index` (because it was defined in a different crate), you could only look it up it `Crate::paths`. But there, you don't get the full information, only an `ItemSummary`. This tells you the `path` and the `crate_id`.

But knowing the `crate_id` isn't enough to be able to build/find the rustdoc-json output with this item. It's only use is to get a `ExternalCrate` (via `Crate::external_crates`). But that only tells you the `name` (as a string). This isn't enough to uniquely identify a crate, as there could be multiple versions/features [^1] [^2].

This was originally proposed to be solved via `@LukeMathWalker's` `--orchestrator-id` proposal (https://github.com/rust-lang/compiler-team/issues/635). But that requires invasive changes to cargo/rustc. This PR instead implements `@Urgau's` proposal to re-use the path to a crate's rmeta/rlib as a unique identifer. Callers can use that to determine which package it corresponds to in the language of the build-system above rustc. E.g. for cargo, `cargo rustdoc --message-format=json --output-format=json -Zunstable-options`).

(Once you've found the right external crate's rustdoc-json output, you still need to resolve the path->id in that crate. But that's """just""" a matter of walking the module tree. We should probably still make that nicer (by, for example, allowing sharing `Id`s between rustdoc-json document), but that's a future concern)

For some notes from RustWeek 2025, where this was designed, see https://hackmd.io/0jkdguobTnW7nXoGKAxfEQ

CC `@obi1kenobi` (who wants this for cargo-semver-checks [^3]), `@epage` (who's conversations on what and wasn't possible with cargo informed taking this approach to solve this problem)

r? `@GuillaumeGomez`

## TODO:

- [x] Docs: [Done](e4cdd0c24a..457ed4edb1)
- [x] Tests: [Done](2e1b954dc5..4d00c1a7ee)

[^1]: https://github.com/rust-lang/compiler-team/issues/635#issue-1714254865 § Problem
[^2]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Identifying.20external.20crates.20in.20Rustdoc.20JSON/with/352701211
[^3]: https://github.com/obi1kenobi/cargo-semver-checks/issues/638
2025-11-21 21:34:26 +01:00
Zachary S
9a8dc7e17c Replace uses of 'CHECK: br' and 'CHECK-NOT: br' with 'br {{.*}}'.
v0 mangling can produce symbols with 'br' as a substring, leading to false positives for CHECK-NOT
2025-11-21 13:04:48 -06:00
Jules Bertholet
f580357863
Handle cycles when checking impl candidates for doc(hidden)
Fixes https://github.com/rust-lang/rust/issues/149092
2025-11-21 11:43:53 -05:00
Jamie Hill-Daniel
98141e0beb Reduce confusing unreachable_code lints 2025-11-21 16:07:54 +00:00
reddevilmidzy
a4ee7f8964 Add regression test for 128705 2025-11-21 23:03:39 +09:00
lapla-cogito
d340ea520b
Fix ICE when collecting opaques from trait method declarations 2025-11-21 21:42:40 +09:00
mu001999
640990f64c Add test for importing path-segment keyword 2025-11-21 19:38:15 +08:00
mu001999
fc822f8c85 Emit error when using path-segment keyword as cfg pred 2025-11-21 18:48:04 +08:00
Alona Enraght-Moony
361af821ab rustdoc-json: add rlib path to ExternalCrate to enable robust crate resolution
Historically, it's not been possible to robustly resolve a cross-crate
item in rustdoc-json. If you had a `Id` that wasn't in `Crate::index`
(because it was defined in a different crate), you could only look it up
it `Crate::paths`. But there, you don't get the full information, only
an `ItemSummary`. This tells you the `path` and the `crate_id`.

But knowing the `crate_id` isn't enough to be able to build/find the
rustdoc-json output with this item. It's only use is to get a
`ExternalCrate` (via `Crate::external_crates`). But that only tells you
the `name` (as a string). This isn't enough to uniquely identify a
crate, as there could be multiple versions/features [1] [2].

This was originally proposed to be solved via LukeMathWalker's
`--orchestrator-id` proposal
(https://www.github.com/rust-lang/compiler-team/issues/635). But that
requires invasive changes to cargo/rustc. This PR instead implements
Urgau's proposal to re-use the path to a crate's rmeta/rlib as a unique
identifer. Callers can use that to determine which package it
corresponds to in the language of the build-system above rustc. E.g. for
cargo, `cargo rustdoc --message-format=json --output-format=json
-Zunstable-options`).

(Once you've found the right external crate's rustdoc-json output, you
still need to resolve the path->id in that crate. But that's """just"""
a matter of walking the module tree. We should probably still make that
nicer (by, for example, allowing sharing `Id`s between rustdoc-json
document), but that's a future concern)

For some notes from RustWeek 2025, where this was designed, see
https://hackmd.io/0jkdguobTnW7nXoGKAxfEQ

[1]: https://www.github.com/rust-lang/compiler-team/issues/635#issue-1714254865 § Problem
[2]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Identifying.20external.20crates.20in.20Rustdoc.20JSON/with/352701211
2025-11-21 09:22:59 +00:00
yukang
f943606503 Fix unused_assignments false positives from macros 2025-11-21 12:19:48 +08:00
Stuart Cook
db505171a3
Rollup merge of #149160 - maxdexh:fix-instrinsic-unifying-coercion-ice, r=Kivooeo,BoxyUwU
Check for intrinsic to fn ptr casts in unified coercions

Fixes rust-lang/rust#149143 by ensuring that when coercing multiple expressions to a unified type, the same "intrinsic to fn ptr" check is applied as for other coercions.
2025-11-21 14:44:44 +11:00
yukang
2c6b1d3430 Skip unused variables warning for unreachable code 2025-11-21 08:48:45 +08:00
Max Dexheimer
ebf1c38aa6 Check for intrinsic to fn ptr casts in unified coercions
Ensures that when coercing multiple expressions to a
unified type, the same "intrinsic to fn ptr" check is applied as for
other coercions.
2025-11-21 00:01:21 +01:00
bors
5f7653df82 Auto merge of #149158 - matthiaskrgr:rollup-qmtvboe, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#149033 (autodiff rlib handling)
 - rust-lang/rust#149088 (Add missing trailing period to RustDoc for fn create_dir().)
 - rust-lang/rust#149111 (fs: Run file lock tests on all platforms that support it)
 - rust-lang/rust#149113 (sgx: avoid unnecessarily creating a slice)
 - rust-lang/rust#149123 (std: sys: fs: uefi: Fix FileAttr size)
 - rust-lang/rust#149133 (Remove an unused variable)
 - rust-lang/rust#149139 (Enable host tools for aarch64-unknown-linux-ohos)
 - rust-lang/rust#149144 (Reject `async fn` in `const impl` during AST validation)
 - rust-lang/rust#149154 (Fix platform supports docs tiny typo)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-20 22:14:43 +00:00
Matthias Krüger
83e37a9be3
Rollup merge of #149144 - lapla-cogito:ice_149083, r=oli-obk
Reject `async fn` in `const impl` during AST validation

closes rust-lang/rust#149083

Fixes the ICE when using `async fn` inside `const impl` blocks by adding AST validation.

Currently, inherent `impl`s does not perform any checks to verify whether it contains `async fn` declarations. In this PR, I have modified the `visit_assoc_item` function to call `check_async_fn_in_const_trait_or_impl` within the `TraitOrImpl::Impl` case to handle this requirement. Additionally, this change has introduced three possible contexts for the corresponding error messages, so I have updated to properly distinguish between these different contexts when generating messages.

r? oli-obk
2025-11-20 20:11:47 +01:00
Matthias Krüger
710720a827
Rollup merge of #149033 - ZuseZ4:autodiff-rlib, r=bjorn3
autodiff rlib handling

As I learned recently, we now apparently support rlib builds already in some cases.
With the last hint from saethlin this seems to now cover all cases. To be sure I'll add a few more testcases before I mark it as ready.

Once this PR lands, we should to the best of my knowledge, support autodiff in almost code locations, only vtable/dyn ptr remain unsupported for now.

r? ghost

closes: https://github.com/rust-lang/rust/issues/148856
closes: https://github.com/rust-lang/rust/issues/137520
2025-11-20 20:11:42 +01:00
bors
53732d5e07 Auto merge of #149109 - scottmcm:align-always-alignment, r=tgross35
See if this is the time we can remove `layout::size_align`

This was a bad idea before, but now that `size_of` and `align_of` work completely differently than when removing it was first tried in 2020, maybe it makes sense now.

(Or maybe I'll just add another attempt to the list in the comments...)

r? ghost
2025-11-20 19:01:43 +00:00
Tomasz Miąsko
6bd1a031ab Turn moves into copies after copy propagation
Previously copy propagation presumed that there is further unspecified
distinction between move operands and copy operands in assignments and
propagated moves from assignments into terminators. This is inconsistent
with current operational semantics.

Turn moves into copies after copy propagation to preserve existing behavior.

Fixes https://github.com/rust-lang/rust/issues/137936.
Fixes https://github.com/rust-lang/rust/issues/146423.
2025-11-20 19:23:10 +01:00
lapla
c108451faf
Reject async fn in const impl during AST validation 2025-11-21 00:02:58 +09:00
Oli Scherer
1223f5c168 Resolve to a concrete impl instead of using fuzzy search 2025-11-20 12:05:12 +00:00
yukang
00f3155794 fix unused assigment issue for variable with drop, issue 148418 2025-11-20 20:00:54 +08:00
Matthias Krüger
5172159dfd
Rollup merge of #149056 - fneddy:fix_s390_test_padding_overwrite, r=RalfJung
fix the fragment_in_dst_padding_gets_overwritten test on s390x

on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to smaller structs (24 instead of 32 bytes) and therefore the write_unaligned will write outside of the structs boundary.

To fix the test, change the trailing u32 into a u8. This will generate 7 trailing padding bytes on s390x and 15 on x86_64. Also change the start of the garbage data so it will span over x,y and padding:

```
s390x:   XXXXXXXXXXXXXXXXY-------
x86_64:  XXXXXXXXXXXXXXXXY---------------
                      GGGGGGGG

```

[^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
2025-11-20 11:15:54 +01:00
Matthias Krüger
7198d31e4b
Rollup merge of #149041 - folkertdev:sparc64-mips64-ignore-unsized, r=bjorn3
ignore unsized types in mips64 and sparc64 callconvs

Non-rustic calling conventions should not make up an ABI for unsized types (cc https://github.com/rust-lang/rust/pull/148302). The vast majority of our callconv implementations already ignore unsized types, `sparc64` and `mips64` I guess were missed.

r? `````@bjorn3`````
2025-11-20 11:15:53 +01:00
Matthias Krüger
422b83aeee
Rollup merge of #147173 - androm3da:bcain/hexagon_qurt, r=davidtwco,tgross35
Add support for hexagon-unknown-qurt target

MCP: https://github.com/rust-lang/compiler-team/issues/919
Fixes https://github.com/rust-lang/rust/issues/148982.
2025-11-20 11:15:51 +01:00
bors
683dd08db5 Auto merge of #89917 - davidtwco:issue-60705-stabilize-rust-symbol-mangling-scheme, r=wesleywiser
sess: default to v0 symbol mangling on nightly

cc rust-lang/rust#60705 rust-lang/compiler-team#938

Rust's current mangling scheme depends on compiler internals; loses information about generic parameters (and other things) which makes for a worse experience when using external tools that need to interact with Rust symbol names; is inconsistent; and can contain `.` characters which aren't universally supported. Therefore, Rust has defined its own symbol mangling scheme which is defined in terms of the Rust language, not the compiler implementation; encodes information about generic parameters in a reversible way; has a consistent definition; and generates symbols that only use the characters `A-Z`, `a-z`, `0-9`, and `_`.

Support for the new Rust symbol mangling scheme has been added to upstream tools that will need to interact with Rust symbols (e.g. debuggers).

This pull request changes the default symbol mangling scheme from the legacy scheme to the new Rust mangling scheme on nightly.

The following pull requests implemented v0 mangling in rustc (if I'm missing any, let me know):

- rust-lang/rust#57967
- rust-lang/rust#63559
- rust-lang/rust#75675
- rust-lang/rust#77452
- rust-lang/rust#77554
- rust-lang/rust#83767
- rust-lang/rust#87194
- rust-lang/rust#87789

Rust's symbol mangling scheme has support in the following external tools:

- `binutils`/`gdb` (GNU `libiberty`)
    - [[PATCH] Move rust_{is_mangled,demangle_sym} to a private libiberty header.
](https://gcc.gnu.org/pipermail/gcc-patches/2019-June/523011.html) committed as 979526c9ce
    - [[PATCH] Simplify and generalize rust-demangle's unescaping logic.
](https://gcc.gnu.org/pipermail/gcc-patches/2019-August/527835.html) committed as 42bf58bb13
    - [[PATCH] Remove some restrictions from rust-demangle.
](https://gcc.gnu.org/pipermail/gcc-patches/2019-September/530445.html) committed as e1cb00db67
    - [[PATCH] Refactor rust-demangle to be independent of C++ demangling.
](https://gcc.gnu.org/pipermail/gcc-patches/2019-November/533719.html) ([original submission](https://gcc.gnu.org/pipermail/gcc-patches/2019-October/532388.html)) committed as 32fc3719e0
    - [[PATCH] Support the new ("v0") mangling scheme in rust-demangle.
](https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558905.html) ([original submission](https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542012.html)) committed as 84096498a7
- `lldb`/`llvm-objdump`/`llvm-nm`/`llvm-symbolizer`/`llvm-cxxfilt`/etc
  - 7310403e3c
  - c8c2b4629f
  - 0a2d4f3f24
- Linux `perf`
- `valgrind`
  - [Update demangler to support Rust v0 name mangling.](https://bugs.kde.org/show_bug.cgi?id=431306)

https://github.com/rust-lang/rust/pull/85530#issuecomment-857855379 contains a summary of the most recent crater run of the v0 mangling, and the remaining issues from that were fixed by rust-lang/rust#87194 (confirmed by follow-up crater run, https://github.com/rust-lang/rust/pull/85530#issuecomment-883679416).

`@rustbot` label +T-compiler
r? `@michaelwoerister`
2025-11-20 04:26:30 +00:00
Scott McMurray
30f4a2ae16 See if this is the time we can remove layout::size_align
This was a bad idea before, but now that `size_of` and `align_of` work completely differently than when removing it was first tried in 2020, maybe it makes sense now.

(Or maybe I'll just add another attempt to the list in the comments...)
2025-11-19 12:55:21 -08:00