Commit Graph

5 Commits

Author SHA1 Message Date
Nicholas Nethercote
b00404e1a1 Update use declarations formatting options.
As decided in rust-lang/compiler-team#750.

Use declarations are currently wildly inconsistent because rustfmt is
quite unopinionated about how they should be formatted. The
`rustfmt.toml` additions makes rustfmt more opinionated, which avoids
the need for any decision when adding new use declarations to a file.

This commit only updates `rustfmt.toml` and
`compiler/rustc_codegen_cranelift/rustfmt.toml`. The next commit will do
the reformatting.
2024-07-29 08:26:08 +10:00
bjorn3
5ec45d3d7a Merge commit '54cbb6e7531f95e086d5c3dd0d5e73bfbe3545ba' into sync_cg_clif-2024-03-08 2024-03-08 20:41:29 +00:00
bjorn3
4ae658683f Fix fn_sig_for_fn_abi and the coroutine transform for generators
There were three issues previously:
* The self argument was pinned, despite Iterator::next taking an
  unpinned mutable reference.
* A resume argument was passed, despite Iterator::next not having one.
* The return value was CoroutineState<Item, ()> rather than Option<Item>

While these things just so happened to work with the LLVM backend,
cg_clif does much stricter checks when trying to assign a value to a
place. In addition it can't handle the mismatch between the amount of
arguments specified by the FnAbi and the FnSig.
2023-11-23 20:17:19 +00:00
bjorn3
98a276b589 Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
bjorn3
27886cd6b6 Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05 2021-03-05 19:12:59 +01:00