Skip to content

Conversation

@BennoLossin
Copy link
Contributor

@BennoLossin BennoLossin commented Sep 7, 2025

Add Field Representing Types (FRTs)

This PR implements the first step of the field projection lang experiment (Tracking Issue: #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.

API added to core::field

pub unsafe trait Field {
    type Base;
    
    type Type;

    const OFFSET: usize;
}

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

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 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).

Design Decisions

During the development several desirable properties of FRTs were discovered. Either due to simplifying the implementation or because of language design reasons. These decisions are:

  • FRTs are inhabited ZSTs, they have the same layout as ()

    • They only contain type information via the Field trait. Their only use of the values is a future ergonomics change that allows skipping turbofish syntax.
    • This simplifies const-eval.
    • They are thus also Freeze
  • The coherence check of FRTs amounts to checking coherence of the base type.

    So field_of!(Foo, bar) is local if Foo is local (Bar is allowed to be foreign). Fundamental types are not handled specially, so field_of!(MaybeUninit<Struct>, value) still is local to core (aside from the fact that non-visible fields cannot be accessed in the first place).

  • Traits may be implemented for FRTs in the usual way (so if the FRT or the trait is local). There is an exception:

    • Drop: It requires supporting non-ADTs and as such it simplified the implementation to not allow it. A future PR can add this if required.
  • The Field trait is not user-implementable

    • this also can be lifted in the future, but for now only FRTs will implement it.
  • FRTs implement all auto traits as well as Copy and Clone.

TODOs

There are several FIXME(FRTs) scattered around the code:

  • rustdoc doesn't yet support them, this can be implemented later
    • src/librustdoc/json/conversions.rs
  • Debuginfo and symbol mangling is not implemented, for this PR they aren't important, but later we should implement it
    • compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
    • compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs
    • compiler/rustc_symbol_mangling/src/v0.rs
  • 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

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2025

r? @lcnr

rustbot has assigned @lcnr.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-json Area: Rustdoc JSON backend PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2025

changes to the core type system

cc @compiler-errors, @lcnr

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

HIR ty lowering was modified

cc @fmease

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in exhaustiveness checking

cc @Nadrieril

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @vakaras

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Copy link
Contributor Author

@BennoLossin BennoLossin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some changes to symbol mangling & constant names that I'm not sure how they resulted from my changes. Anybody has any idea?

View changes since this review

@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2025

Some changes occurred to constck

cc @fee1-dead

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2025

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@tmandry tmandry added the F-field_projections `#![feature(field_projections)]` label Sep 9, 2025
Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you ensure you have a test that is generic over the field and that queries the offset? That would hit all these points I just mentioned here (or at least some of them), and anyway seems like a very non-trivial case to test.

Or... wait the intrinsic is only used to define that one associated const? I don't know exactly when and how we normalize those but it may be that we indeed never see that MIR in its generic form then...

The test may have to invoke the intrinsic directly to trigger the case I am thinking of.

View changes since this review

@rust-bors

This comment has been minimized.

@Zalathar
Copy link
Member

@bors p=0

@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@oli-obk
Copy link
Contributor

oli-obk commented Feb 12, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 12, 2026

📌 Commit d84b0b0 has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 12, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 12, 2026
Add field representing types



# Add Field Representing Types (FRTs)

This PR implements the first step of the field projection lang experiment (Tracking Issue: #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)+ $(,)?);
```

## 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).

## Design Decisions

During the development several desirable properties of FRTs were discovered. Either due to simplifying the implementation or because of language design reasons. These decisions are:

* FRTs are inhabited ZSTs, they have the same layout as `()`
  * They only contain type information via the `Field` trait. Their only use of the values is a future ergonomics change that allows skipping turbofish syntax.
  * This simplifies const-eval.
  * They are thus also `Freeze`
* The coherence check of FRTs amounts to checking coherence of the base type.

  So `field_of!(Foo, bar)` is local if `Foo` is local (`Bar` is allowed to be foreign). Fundamental types are **not** handled specially, so `field_of!(MaybeUninit<Struct>, value)` still is local to `core` (aside from the fact that non-visible fields cannot be accessed in the first place).

* Traits may be implemented for FRTs in the usual way (so if the FRT or the trait is local). There is an exception:
  * `Drop`: It requires supporting non-ADTs and as such it simplified the implementation to not allow it. A future PR can add this if required.
* The `Field` trait is not user-implementable
  * this also can be lifted in the future, but for now only FRTs will implement it.
* FRTs implement all auto traits as well as `Copy` and `Clone`.


## TODOs

There are several `FIXME(FRTs)` scattered around the code:
- rustdoc doesn't yet support them, this can be implemented later
  - `src/librustdoc/json/conversions.rs`
- Debuginfo and symbol mangling is not implemented, for this PR they aren't important, but later we should implement it
    - `compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs`
    - `compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs`
    - `compiler/rustc_symbol_mangling/src/v0.rs`
- 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`
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 12, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 12, 2026

💔 Test for 1837b38 failed: CI. Failed job:

@BennoLossin
Copy link
Contributor Author

This code seems to fail on dist-i586-gnu-i586-i686-musl:

#[repr(C)]
pub struct Struct {
    a: i32,
    b: i64,
}

fn main() {
    assert_eq!(<field_of!(Struct, b)>::OFFSET, 8);
}

The value of OFFSET is 4. Seems like alignment of i64 is 4 on that platform... Which I thought wasn't allowed, but the reference is pretty clear on it. I'll just assert that it equals the corresponding offset_of!.

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2026
@oli-obk
Copy link
Contributor

oli-obk commented Feb 12, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 12, 2026

📌 Commit d15f505 has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 12, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 12, 2026
Add field representing types



# Add Field Representing Types (FRTs)

This PR implements the first step of the field projection lang experiment (Tracking Issue: #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)+ $(,)?);
```

## 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).

## Design Decisions

During the development several desirable properties of FRTs were discovered. Either due to simplifying the implementation or because of language design reasons. These decisions are:

* FRTs are inhabited ZSTs, they have the same layout as `()`
  * They only contain type information via the `Field` trait. Their only use of the values is a future ergonomics change that allows skipping turbofish syntax.
  * This simplifies const-eval.
  * They are thus also `Freeze`
* The coherence check of FRTs amounts to checking coherence of the base type.

  So `field_of!(Foo, bar)` is local if `Foo` is local (`Bar` is allowed to be foreign). Fundamental types are **not** handled specially, so `field_of!(MaybeUninit<Struct>, value)` still is local to `core` (aside from the fact that non-visible fields cannot be accessed in the first place).

* Traits may be implemented for FRTs in the usual way (so if the FRT or the trait is local). There is an exception:
  * `Drop`: It requires supporting non-ADTs and as such it simplified the implementation to not allow it. A future PR can add this if required.
* The `Field` trait is not user-implementable
  * this also can be lifted in the future, but for now only FRTs will implement it.
* FRTs implement all auto traits as well as `Copy` and `Clone`.


## TODOs

There are several `FIXME(FRTs)` scattered around the code:
- rustdoc doesn't yet support them, this can be implemented later
  - `src/librustdoc/json/conversions.rs`
- Debuginfo and symbol mangling is not implemented, for this PR they aren't important, but later we should implement it
    - `compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs`
    - `compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs`
    - `compiler/rustc_symbol_mangling/src/v0.rs`
- 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`
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-nopt failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[group]Runner Image Provisioner
Hosted Compute Agent
Version: 20260123.484
Commit: 6bd6555ca37d84114959e1c76d2c01448ff61c5d
Build Date: 2026-01-23T19:41:17Z
Worker ID: {175693f8-263b-4297-918d-3951851a4948}
Azure Region: westcentralus
##[endgroup]
##[group]Operating System
Ubuntu
24.04.3
LTS
---
REPOSITORY                                   TAG       IMAGE ID       CREATED       SIZE
ghcr.io/dependabot/dependabot-updater-core   latest    b72a662c47e3   12 days ago   790MB
=> Removing docker images...
Deleted Images:
untagged: ghcr.io/dependabot/dependabot-updater-core:latest
untagged: ghcr.io/dependabot/dependabot-updater-core@sha256:57ef9cc45f72cc4258ee1baa8243bc3cd55c0a0e570b6768c37346247be35f0d
deleted: sha256:b72a662c47e31df2e7bf59368b2b83be239f02a1baa721393717711a1a719df9
deleted: sha256:3e13ccd80f19769f39008cfc6549938e1ea4905f47b028c1df2dd6085191386c
deleted: sha256:842807995a512b2c5a9b241a3aecdbe79af6b0642d96fa5460cfcf0c9d8be295
deleted: sha256:0f9074b9f46f4570eb7cb4b65fcb3c3d909f9b1d14ca66b30508117b6deda303
deleted: sha256:2ca99cb9251d19157c56b5d91c8961bb4b35196a5ca9b4ffdccbf24abbfe2a5f
---
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap (line 72) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::with_capacity (line 283) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::capacity (line 445) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,RandomState>::from (line 1504) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::clear (line 819) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::contains_key (line 1220) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::drain (line 721) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::entry (line 959) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get (line 987) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::extract_if (line 761) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_disjoint_mut (line 1119) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_disjoint_mut (line 1077) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::hasher (line 837) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_disjoint_unchecked_mut (line 1162) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_mut (line 1247) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::get_key_value (line 1017) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::insert (line 1280) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::into_iter (line 2053) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::into_keys (line 491) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::into_values (line 586) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::is_empty (line 698) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::iter (line 618) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::len (line 681) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::keys (line 461) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::iter_mut (line 648) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::remove (line 1339) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::reserve (line 870) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::remove_entry (line 1367) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::retain (line 792) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::shrink_to (line 937) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::shrink_to_fit (line 913) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::try_insert (line 1309) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::try_reserve (line 895) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::values (line 523) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S>::with_capacity_and_hasher (line 383) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S>::with_hasher (line 351) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::HashMap<K,V,S,A>::values_mut (line 552) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::IntoIter (line 1611) ... ok
test library/std/src/collections/hash/map.rs - collections::hash::map::IntoKeys (line 1843) ... ok
---
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,RandomState>::new (line 142) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,RandomState>::with_capacity (line 161) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::capacity (line 313) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,RandomState>::from (line 1180) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::clear (line 490) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::contains (line 758) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::drain (line 398) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::difference (line 630) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::entry (line 861) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::get (line 783) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::extract_if (line 434) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::get_or_insert (line 805) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::hasher (line 508) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::get_or_insert_with (line 829) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::insert (line 983) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::intersection (line 697) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::into_iter (line 1643) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_disjoint (line 903) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_empty (line 375) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::iter (line 329) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_subset (line 929) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::is_superset (line 951) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::len (line 357) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::reserve (line 541) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::remove (line 1030) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::replace (line 1004) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::retain (line 465) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::shrink_to (line 607) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::shrink_to_fit (line 584) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::symmetric_difference (line 660) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::take (line 1058) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::try_reserve (line 567) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S,A>::union (line 726) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S>::with_capacity_and_hasher (line 255) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::HashSet<T,S>::with_hasher (line 223) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::Intersection (line 1507) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::IntoIter (line 1422) ... ok
test library/std/src/collections/hash/set.rs - collections::hash::set::Iter (line 1392) ... ok
---
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/abi-sysv64-arg-passing.rs ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
---
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ignored, only executed when the architecture is aarch64
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ignored, only executed when the architecture is aarch64
test [ui] tests/ui/asm/aarch64/arm64ec-sve.rs ... ok
test [ui] tests/ui/array-slice-vec/vector-slice-matching-8498.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/binary_asm_labels_allowed.rs ... ignored, only executed when the architecture is aarch64
test [ui] tests/ui/asm/binary_asm_labels.rs ... ok
test [ui] tests/ui/asm/bad-template.rs#aarch64 ... ok
test [ui] tests/ui/asm/cfg-parse-error.rs ... ok
---
test [ui] tests/ui/const-generics/occurs-check/unify-n-nplusone.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-3.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#full ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/extern/windows-tcb-trash-13259.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-more-maybe-bounds.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-macro.rs ... ok
---
---- [ui] tests/ui/field_representing_types/offset.rs#next stdout ----

error in revision `next`: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/field_representing_types/offset.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,old,next)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/field_representing_types/offset.next/a" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------

thread 'rustc' (134704) panicked at compiler/rustc_symbol_mangling/src/v0.rs:514:28:
not yet implemented: mangle field_of!(Struct, b)
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_type
   3: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_path_with_generic_args::<<rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::default_print_def_path::{closure#0}>
   4: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_def_path
   5: rustc_symbol_mangling::v0::mangle
   6: rustc_symbol_mangling::symbol_name_provider
      [... omitted 1 frame ...]
   7: <rustc_middle::mir::mono::MonoItem>::symbol_name
   8: <core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)>>::extend_trusted<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>::{closure#0}>::{closure#0}>
   9: <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)> as alloc::vec::spec_from_iter::SpecFromIter<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>>::from_iter
  10: rustc_monomorphize::partitioning::assert_symbols_are_distinct::<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>
  11: rustc_data_structures::sync::parallel::serial_join::<rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#0}, rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#1}, &[rustc_middle::mir::mono::CodegenUnit], ()>
  12: <rustc_session::session::Session>::time::<(&[rustc_middle::mir::mono::CodegenUnit], ()), rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}>
  13: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 1 frame ...]
  14: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  16: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  17: rustc_interface::passes::start_codegen
  18: <rustc_interface::queries::Linker>::codegen_and_build_linker
  19: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  20: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  21: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  22: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  23: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  24: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. This is a bug

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.95.0-nightly (5a8e0d420 2026-02-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z next-solver

query stack during panic:
#0 [symbol_name] computing the symbol for `project_ref::<Struct, field_of!(Struct, b)>`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
------------------------------------------

---- [ui] tests/ui/field_representing_types/offset.rs#next stdout end ----
---- [ui] tests/ui/field_representing_types/offset.rs#old stdout ----

error in revision `old`: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/field_representing_types/offset.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--check-cfg" "cfg(test,FALSE,old,next)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/field_representing_types/offset.old/a" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------

thread 'rustc' (134710) panicked at compiler/rustc_symbol_mangling/src/v0.rs:514:28:
not yet implemented: mangle field_of!(Struct, b)
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_type
   3: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_path_with_generic_args::<<rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::default_print_def_path::{closure#0}>
   4: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_def_path
   5: rustc_symbol_mangling::v0::mangle
   6: rustc_symbol_mangling::symbol_name_provider
      [... omitted 1 frame ...]
   7: <rustc_middle::mir::mono::MonoItem>::symbol_name
   8: <core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)>>::extend_trusted<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>::{closure#0}>::{closure#0}>
   9: <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)> as alloc::vec::spec_from_iter::SpecFromIter<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>>::from_iter
  10: rustc_monomorphize::partitioning::assert_symbols_are_distinct::<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>
  11: rustc_data_structures::sync::parallel::serial_join::<rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#0}, rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#1}, &[rustc_middle::mir::mono::CodegenUnit], ()>
  12: <rustc_session::session::Session>::time::<(&[rustc_middle::mir::mono::CodegenUnit], ()), rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}>
  13: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 1 frame ...]
  14: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  16: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  17: rustc_interface::passes::start_codegen
  18: <rustc_interface::queries::Linker>::codegen_and_build_linker
  19: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  20: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  21: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  22: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  23: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  24: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. This is a bug

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.95.0-nightly (5a8e0d420 2026-02-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0

query stack during panic:
#0 [symbol_name] computing the symbol for `project_ref::<Struct, field_of!(Struct, b)>`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
------------------------------------------

---- [ui] tests/ui/field_representing_types/offset.rs#old stdout end ----
---- [ui] tests/ui/field_representing_types/traits.rs#old stdout ----

error in revision `old`: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/field_representing_types/traits.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--check-cfg" "cfg(test,FALSE,old,next)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/field_representing_types/traits.old/a" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers"
stdout: none
--- stderr -------------------------------

thread 'rustc' (134736) panicked at compiler/rustc_symbol_mangling/src/v0.rs:514:28:
not yet implemented: mangle field_of!(Enum, Variant1.field)
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_type
   3: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_path_with_generic_args::<<rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::default_print_def_path::{closure#0}>
   4: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_def_path
   5: rustc_symbol_mangling::v0::mangle
   6: rustc_symbol_mangling::symbol_name_provider
      [... omitted 1 frame ...]
   7: <rustc_middle::mir::mono::MonoItem>::symbol_name
   8: <core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)>>::extend_trusted<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>::{closure#0}>::{closure#0}>
   9: <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)> as alloc::vec::spec_from_iter::SpecFromIter<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>>::from_iter
  10: rustc_monomorphize::partitioning::assert_symbols_are_distinct::<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>
  11: rustc_data_structures::sync::parallel::serial_join::<rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#0}, rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#1}, &[rustc_middle::mir::mono::CodegenUnit], ()>
  12: <rustc_session::session::Session>::time::<(&[rustc_middle::mir::mono::CodegenUnit], ()), rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}>
  13: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 1 frame ...]
  14: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  16: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  17: rustc_interface::passes::start_codegen
  18: <rustc_interface::queries::Linker>::codegen_and_build_linker
  19: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  20: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  21: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  22: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  23: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  24: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. This is a bug

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.95.0-nightly (5a8e0d420 2026-02-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0

query stack during panic:
#0 [symbol_name] computing the symbol for `assert_traits::<field_of!(Enum, Variant1.field)>`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
------------------------------------------

---- [ui] tests/ui/field_representing_types/traits.rs#old stdout end ----
---- [ui] tests/ui/field_representing_types/traits.rs#next stdout ----

error in revision `next`: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/field_representing_types/traits.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,old,next)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/field_representing_types/traits.next/a" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Znext-solver"
stdout: none
--- stderr -------------------------------

thread 'rustc' (134735) panicked at compiler/rustc_symbol_mangling/src/v0.rs:514:28:
not yet implemented: mangle field_of!(Enum, Variant1.field)
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_type
   3: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_path_with_generic_args::<<rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::default_print_def_path::{closure#0}>
   4: <rustc_symbol_mangling::v0::V0SymbolMangler as rustc_middle::ty::print::Printer>::print_def_path
   5: rustc_symbol_mangling::v0::mangle
   6: rustc_symbol_mangling::symbol_name_provider
      [... omitted 1 frame ...]
   7: <rustc_middle::mir::mono::MonoItem>::symbol_name
   8: <core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)>>::extend_trusted<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>::{closure#0}>::{closure#0}>
   9: <alloc::vec::Vec<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName)> as alloc::vec::spec_from_iter::SpecFromIter<(&rustc_middle::mir::mono::MonoItem, rustc_middle::ty::SymbolName), core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::partitioning::assert_symbols_are_distinct<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>::{closure#0}>>>::from_iter
  10: rustc_monomorphize::partitioning::assert_symbols_are_distinct::<core::slice::iter::Iter<rustc_middle::mir::mono::MonoItem>>
  11: rustc_data_structures::sync::parallel::serial_join::<rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#0}, rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}::{closure#1}, &[rustc_middle::mir::mono::CodegenUnit], ()>
  12: <rustc_session::session::Session>::time::<(&[rustc_middle::mir::mono::CodegenUnit], ()), rustc_monomorphize::partitioning::collect_and_partition_mono_items::{closure#0}>
  13: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 1 frame ...]
  14: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  16: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  17: rustc_interface::passes::start_codegen
  18: <rustc_interface::queries::Linker>::codegen_and_build_linker
  19: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  20: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  21: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  22: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  23: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  24: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. This is a bug

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.95.0-nightly (5a8e0d420 2026-02-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z next-solver

query stack during panic:
#0 [symbol_name] computing the symbol for `assert_traits::<field_of!(Enum, Variant1.field)>`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
------------------------------------------

---- [ui] tests/ui/field_representing_types/traits.rs#next stdout end ----

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 12, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 12, 2026

💔 Test for 5a8e0d4 failed: CI. Failed job:

@BennoLossin
Copy link
Contributor Author

BennoLossin commented Feb 12, 2026

Seems like I do in fact need to handle mangling of field representing types. Any suggestions on how to implement that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-json Area: Rustdoc JSON backend F-field_projections `#![feature(field_projections)]` I-lang-radar Items that are on lang's radar and will need eventual work or consideration. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.