Skip to content

Ensure ErasedData only implements appropriate auto traits#154229

Open
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:erase-auto-traits
Open

Ensure ErasedData only implements appropriate auto traits#154229
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:erase-auto-traits

Conversation

@Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Mar 22, 2026

This uses an external type to prevent auto traits to be inferred on ErasedData. That inference is incorrect since it may not store the type it declares.

This also implements DynSend and DynSync on ErasedData which are checked by bounds on erase_val.

Some diagnostics bounds were missing DynSync, which is also added here.

@rustbot rustbot added 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 Mar 22, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 22, 2026

r? @nnethercote

rustbot has assigned @nnethercote.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 12 candidates

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 22, 2026

cc @petrochenkov @Zalathar

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 22, 2026

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 22, 2026

⌛ Trying commit b0ccfe9 with merge 87b89de

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/23415439054

rust-bors bot pushed a commit that referenced this pull request Mar 22, 2026
Ensure `ErasedData` only implements appropriate auto traits
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-perf Status: Waiting on a perf run to be completed. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants