Skip to content

Conversation

@WaffleLapkin
Copy link
Member

This is just better, but this is also allows it to handle changes from #149614 (i.e. ManuallyDrop containing MaybeDangle).

@rustbot rustbot added 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. labels Dec 13, 2025
@WaffleLapkin WaffleLapkin marked this pull request as ready for review December 13, 2025 14:22
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 13, 2025

r? @jdonszelmann

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

@taiki-e
Copy link
Member

taiki-e commented Dec 13, 2025

Could you also update the same code in rustc_codegen_cranelift?

// Adapted from https://github.com/rust-lang/rust/blob/f3c66088610c1b80110297c2d9a8b5f9265b013f/compiler/rustc_hir_analysis/src/check/intrinsicck.rs#L136-L151
ty::Adt(adt, args) if fx.tcx.is_lang_item(adt.did(), LangItem::MaybeUninit) => {
let fields = &adt.non_enum_variant().fields;
let ty = fields[FieldIdx::ONE].ty(fx.tcx, args);
let ty::Adt(ty, args) = ty.kind() else {
unreachable!("expected first field of `MaybeUninit` to be an ADT")
};
assert!(
ty.is_manually_drop(),
"expected first field of `MaybeUninit` to be `ManuallyDrop`"
);
let fields = &ty.non_enum_variant().fields;
let ty = fields[FieldIdx::ZERO].ty(fx.tcx, args);

@WaffleLapkin WaffleLapkin force-pushed the inlines-ur-mu-into-asm branch from df44a57 to cfb6a1f Compare December 13, 2025 14:51
@rustbot
Copy link
Collaborator

rustbot commented Dec 13, 2025

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@WaffleLapkin
Copy link
Member Author

@taiki-e good catch, I've updated it too.

@jdonszelmann
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 15, 2025

📌 Commit cfb6a1f has been approved by jdonszelmann

It is now in the queue for this repository.

@bors bors 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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 15, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 15, 2025
…m, r=jdonszelmann

Simplify how inline asm handles `MaybeUninit`

This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
bors added a commit that referenced this pull request Dec 15, 2025
Rollup of 9 pull requests

Successful merges:

 - #148756 (Warn on codegen attributes on required trait methods)
 - #148790 (Add new Tier-3 target: riscv64im-unknown-none-elf)
 - #149271 (feat: dlopen Enzyme)
 - #149354 (Bootstrap config: libgccjit libs dir)
 - #149459 (std: sys: fs: uefi: Implement set_times and set_perm)
 - #149950 (Simplify how inline asm handles `MaybeUninit`)
 - #150000 (Port `#[rustc_legacy_const_generics]` to use attribute parser )
 - #150014 (Metadata loader cleanups)
 - #150021 (document that mpmc channels deliver an item to (at most) one receiver)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 15, 2025
…m, r=jdonszelmann

Simplify how inline asm handles `MaybeUninit`

This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
bors added a commit that referenced this pull request Dec 15, 2025
Rollup of 8 pull requests

Successful merges:

 - #148756 (Warn on codegen attributes on required trait methods)
 - #148790 (Add new Tier-3 target: riscv64im-unknown-none-elf)
 - #149271 (feat: dlopen Enzyme)
 - #149459 (std: sys: fs: uefi: Implement set_times and set_perm)
 - #149950 (Simplify how inline asm handles `MaybeUninit`)
 - #150000 (Port `#[rustc_legacy_const_generics]` to use attribute parser )
 - #150014 (Metadata loader cleanups)
 - #150021 (document that mpmc channels deliver an item to (at most) one receiver)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 16, 2025
…m, r=jdonszelmann

Simplify how inline asm handles `MaybeUninit`

This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
bors added a commit that referenced this pull request Dec 16, 2025
Rollup of 14 pull requests

Successful merges:

 - #148756 (Warn on codegen attributes on required trait methods)
 - #148790 (Add new Tier-3 target: riscv64im-unknown-none-elf)
 - #149271 (feat: dlopen Enzyme)
 - #149459 (std: sys: fs: uefi: Implement set_times and set_perm)
 - #149771 (bootstrap readme: make easy to read when editor wrapping is not enabled)
 - #149856 (Provide an extended framework for type visit, for use in rust-analyzer)
 - #149950 (Simplify how inline asm handles `MaybeUninit`)
 - #150014 (Metadata loader cleanups)
 - #150021 (document that mpmc channels deliver an item to (at most) one receiver)
 - #150022 (Generate macro expansion for rust compiler crates docs)
 - #150029 (Update books)
 - #150031 (assert impossible branch is impossible)
 - #150034 (do not add `I-prioritize` when `F-*` labels are present)
 - #150036 (Use the embeddable filename for coverage artifacts)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 16, 2025
…m, r=jdonszelmann

Simplify how inline asm handles `MaybeUninit`

This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
bors added a commit that referenced this pull request Dec 16, 2025
Rollup of 13 pull requests

Successful merges:

 - #148756 (Warn on codegen attributes on required trait methods)
 - #148790 (Add new Tier-3 target: riscv64im-unknown-none-elf)
 - #149271 (feat: dlopen Enzyme)
 - #149459 (std: sys: fs: uefi: Implement set_times and set_perm)
 - #149771 (bootstrap readme: make easy to read when editor wrapping is not enabled)
 - #149856 (Provide an extended framework for type visit, for use in rust-analyzer)
 - #149950 (Simplify how inline asm handles `MaybeUninit`)
 - #150014 (Metadata loader cleanups)
 - #150021 (document that mpmc channels deliver an item to (at most) one receiver)
 - #150029 (Update books)
 - #150031 (assert impossible branch is impossible)
 - #150034 (do not add `I-prioritize` when `F-*` labels are present)
 - #150036 (Use the embeddable filename for coverage artifacts)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants