Skip to content

Move trait prototype - #161457

Draft
zannabianca1997 wants to merge 14 commits into
rust-lang:mainfrom
zannabianca1997:move-trait
Draft

Move trait prototype#161457
zannabianca1997 wants to merge 14 commits into
rust-lang:mainfrom
zannabianca1997:move-trait

Conversation

@zannabianca1997

@zannabianca1997 zannabianca1997 commented Aug 21, 2026

Copy link
Copy Markdown

Finishing the work started by @nia-e in #156018 :

Add a barebones implementation for Move (#149607), pending some diagnostics changes & tests.

TODO

  • next solver currently errors when not enabling feature(move_trait)
  • change printing of trait objects to not show Move
  • change printing of opaque types to not show Move
  • fix mangling of Move bounds
  • how to handle empty trait object that now are dyn Move
  • also make sure rustdoc handles move correctly
  • valuable to look into why diesel regresses

r? lcnr

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 21, 2026
@rustbot

rustbot commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @lcnr (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions for more information.

@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr mentioned this pull request Aug 21, 2026
3 tasks
@lcnr lcnr changed the title Move trait prototype Move trait prototype Aug 21, 2026
@zannabianca1997

Copy link
Copy Markdown
Author

A quick ./x.py test tests/ui locally to have a baseline

test result: FAILED. 9 passed; 206 failed; 21862 ignored; 0 measured; 0 filtered out; finished in 1.14s

@zannabianca1997

Copy link
Copy Markdown
Author
test result: FAILED. 21801 passed; 32 failed; 244 ignored; 0 measured; 0 filtered out; finished in 168.70s

wow that were a lot of them. looks like the next batch is a bunch of fn that now has fn() + Move

@rust-log-analyzer

This comment has been minimized.

@zannabianca1997

Copy link
Copy Markdown
Author

looking at the errors, there is also a bunch of (dyn + 'static) printing.

Those are all checks going around the trait_alias feature, that created before empty trait object and now creates what are effectively dyn Move, that are being misprinted.

That sure raises a question - can we handle them now? ummm - putting this aside in favour of lower hanging fruits

@zannabianca1997

Copy link
Copy Markdown
Author

@lcnr this last one (520bc2f)

it's better to break the ABI and accept all aymbol mangling containing Move or we have to decide a way to mangle ?Move? I know rust has no stable abi but to put it in all symbols seems a bit too much

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

nia-e and others added 10 commits August 23, 2026 20:56
it should give some info tho...
Oh wow that got done with A LOT of tests
This is one of the two options, the other being break ABI. I suspect we
can do it, Rust not having a stable one (?)
mostly to avoid adding to every single dynamic symbol the `+ Move`
the output uses the debug print and parses it with regex

fixed the regex to fetch the first trait, instead of Move
@rust-log-analyzer

This comment has been minimized.

I am _almost_ sure this is what nia wanted to write. I am modifying the
behaviour, but I don't see how should it be different, as Move enters
now the implicit trait group
@rust-log-analyzer

This comment has been minimized.

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. 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.

5 participants