Commit 7a0bb7c
authored
Fixes to
This fixes a few aspects of the `rust-toolchain.toml` handling, to make
it
easier to make future changes such as limiting the use of
`rust-toolchain.toml`
to the tools that use rustc internals.
Fix a few obsolete references to `rust-toolchain` rather than
`rust-toolchain.toml`, since c2rust doesn't use the former.
Use the `rustfmt` component rather than `rustfmt-preview`, since the
latter is
obsolete (rustfmt has not been a "preview" for a long time).
Finally, make `c2rust-transpile` use a separate file for the generated
`rust-toolchain.toml`. When c2rust-transpile translates C variadics, it
generates code using the (currently) nightly-only feature `c_variadics`,
so it
emits a `rust-toolchain.toml` file to use nightly. Rather than copy this
file
from the `rust-toolchain.toml` used to build c2rust itself, use a
separate
file.
This also means the generated `rust-toolchain.toml` can stop requiring
toolchain components that the generated code doesn't need, such as
rustc-dev.
(It still requires `rustfmt`, as c2rust may run `cargo fmt` on the
generated
code if invoking `c2rust-refactor`.)rust-toolchain.toml handling (#1225)File tree
6 files changed
+9
-5
lines changed- .github/workflows
- analysis/tests
- c2rust-transpile/src/build_files
- tests
6 files changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments