Skip to content

Deny multiple EII impls on a single item#159326

Open
bjorn3 wants to merge 1 commit into
rust-lang:mainfrom
bjorn3:deny_multiple_eii_impls
Open

Deny multiple EII impls on a single item#159326
bjorn3 wants to merge 1 commit into
rust-lang:mainfrom
bjorn3:deny_multiple_eii_impls

Conversation

@bjorn3

@bjorn3 bjorn3 commented Jul 15, 2026

Copy link
Copy Markdown
Member

This allows implementing EIIs that don't have a default impl without the involvement of symbol aliases by simply changing the mangled symbol name of the implementation, which would make them trivially compatible with all backends and targets. This change will be left to a followup PR.

r? jdonszelmann

@rustbot

rustbot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_hir/src/attrs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_builtin_macros/src/autodiff.rs

cc @ZuseZ4

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 15, 2026
@rustbot

rustbot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

jdonszelmann is currently at their maximum review capacity.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@bjorn3
bjorn3 force-pushed the deny_multiple_eii_impls branch from 1b8c264 to c5b8085 Compare July 15, 2026 11:24
@rustbot

rustbot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jul 15, 2026
Comment thread compiler/rustc_builtin_macros/src/eii.rs
Comment thread compiler/rustc_ast/src/ast.rs Outdated
@rust-bors

This comment has been minimized.

This allows implementing EIIs that don't have a default impl without the
involvement of symbol aliases by simply changing the mangled symbol name
of the implementation, which would make them trivially compatible with
all backends and targets. This change will be left to a followup PR.
@bjorn3
bjorn3 force-pushed the deny_multiple_eii_impls branch from 1779491 to 57fb26e Compare July 24, 2026 09:58
@rustbot

rustbot commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

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.

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) F-extern_item_impls `#![feature(extern_item_impls)]` 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants