Commit 38ba95d
authored
Rollup merge of rust-lang#89311 - FabianWolff:issue-89305, r=oli-obk
Add unit assignment to MIR for `asm!()`
Fixes rust-lang#89305. `ExprKind::LlvmInlineAsm` gets a `push_assign_unit()` here:
https://github.com/rust-lang/rust/blob/2b6ed3b675475abc01ce7e68bb75b457f0c85684/compiler/rustc_mir_build/src/build/expr/into.rs#L475-L479
The same should probably happen for `ExprKind::InlineAsm`, which fixes the "use of possibly-uninitialized variable" error described in rust-lang#89305.File tree
3 files changed
+35
-3
lines changed- compiler/rustc_mir_build/src/build/expr
- src/test/ui/asm
3 files changed
+35
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
453 | 455 | | |
| 456 | + | |
454 | 457 | | |
455 | 458 | | |
456 | 459 | | |
| |||
462 | 465 | | |
463 | 466 | | |
464 | 467 | | |
465 | | - | |
| 468 | + | |
466 | 469 | | |
467 | 470 | | |
468 | 471 | | |
469 | | - | |
| 472 | + | |
470 | 473 | | |
471 | 474 | | |
472 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments