As of Rust 1.68, the uefi crates work on stable. Remove the
`channel = "nightly"` setting from `rust-toolchain.toml` and
`template/rust-toolchain.toml`.
Related changes:
* The CI job to compile with the MSRV has been changed from `nightly-2022-11-22`
to `1.68`. So for now the MSRV job isn't checking anything that isn't already
checked by other jobs, but once 1.69 comes out it will.
* The CI job to test the latest crates.io release still needs the nightly
toolchain until we do a new release.
* Some of the uefi-macros compiler ui tests have been modified so that the error
output matches the errors produced by stable compiler, which are currently
slightly different in a few cases from the nightly compiler. In particular,
the precise spans we output for errors in the guid macros don't work on
stable, because proc-macro's Literal::subspan method is currently unstable.
Temporarily modify rust-toolchain.toml to pin to `nightly-2022-08-26`,
as compilation is broken on current nightly due to
https://github.com/rust-osdev/uefi-rs/issues/500. `nightly-2022-09-01`
is the most recent nightly that avoids the bug, but it doesn't have miri
(which is run by CI), so pin to a slightly older version.
Also pinned the toolchain in the template app.
This change should be reverted once #500 is fixed.
Add a `rust-toolchain.toml` file that specifies the channel and
components needed to build uefi-rs. See
https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file for
documentation of the `rust-toolchain.toml` format.
Remove the `--toolchain` option from `xtask`, as using this file is a
simpler alternative. Also remove the instructions for installing the
nightly toolchain from the readme, as `rustup` will do this
automatically now.
The template application has been updated to add a
`rust-toolchain.toml`, and `BUILDING.md` has been updated to mention it
as well.
The `toolchain` action previously used in the CI is unmaintained and
doesn't understand `rust-toolchain.toml` (it does understand the older
`rust-toolchain` file, but that doesn't allow for including required
components). Since the runners come with rustup already installed, we
don't actually need a complex action here anyway, so just remove those
sections entirely. A few jobs need extra components installed, do that
with `rustup component add`.
Note that this change will also cause `xtask` itself to be built with
nightly. That should generally be fine, we only had it using stable
because of https://github.com/rust-osdev/uefi-rs/issues/397, and in the
future we can easily temporarily pin to a non-current nightly if a bug
occurs with an `xtask` dependency again.
Fixes https://github.com/rust-osdev/uefi-rs/issues/498