Skip to content

Commit a46610f

Browse files
Change toolchain from nightly to stable
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.
1 parent 09c24e2 commit a46610f

9 files changed

+18
-13
lines changed

.github/workflows/msrv_toolchain.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[toolchain]
2-
# Oldest nightly that currently works with `cargo xtask build`.
3-
channel = "nightly-2022-11-22"
2+
channel = "1.68"
43
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"]

.github/workflows/rust.yml

+9
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ jobs:
108108
- name: Checkout sources
109109
uses: actions/checkout@v3
110110

111+
# TODO: for now our latest release (0.19.1) requires nightly.
112+
- name: Set nightly toolchain
113+
run: cp .github/workflows/nightly_toolchain.toml rust-toolchain.toml
114+
111115
- name: Build
112116
run: cargo xtask test-latest-release
113117

@@ -143,13 +147,18 @@ jobs:
143147
- name: Build
144148
run: cargo xtask build
145149

150+
# This job requires the nightly channel, but keep it as a separate job from
151+
# `nightly_channel` because it takes a while to run.
146152
build_feature_permutations:
147153
name: Check that the build works for all feature combinations
148154
runs-on: ubuntu-latest
149155
steps:
150156
- name: Checkout sources
151157
uses: actions/checkout@v3
152158

159+
- name: Set nightly toolchain so that `unstable` can be included
160+
run: cp .github/workflows/nightly_toolchain.toml rust-toolchain.toml
161+
153162
- name: Build
154163
run: cargo xtask build --feature-permutations
155164

rust-toolchain.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[toolchain]
2-
channel = "nightly"
32
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"]

template/rust-toolchain.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[toolchain]
2-
channel = "nightly"
32
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"]

uefi-macros/tests/ui/entry_bad_abi.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ error: Entry method must have no ABI modifier
22
--> tests/ui/entry_bad_abi.rs:8:1
33
|
44
8 | extern "C" fn main(_handle: Handle, _st: SystemTable<Boot>) -> Status {
5-
| ^^^^^^^^^^
5+
| ^^^^^^

uefi-macros/tests/ui/entry_bad_return_type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> tests/ui/entry_bad_return_type.rs:8:1
33
|
44
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Status`, found `bool`
66
|
77
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> Status`
88
found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> bool`
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: GUID component "Gaaa" is not a hexadecimal number
2-
--> tests/ui/guid_bad_hex_group2.rs:5:44
2+
--> tests/ui/guid_bad_hex_group2.rs:5:34
33
|
44
5 | const BadHexGroup2: Guid = guid!("aaaaaaaa-Gaaa-aaaa-aaaa-aaaaaaaaaaaa");
5-
| ^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: GUID component "aaaaaaaaaaaG" is not a hexadecimal number
2-
--> tests/ui/guid_bad_hex_group5.rs:5:59
2+
--> tests/ui/guid_bad_hex_group5.rs:5:34
33
|
44
5 | const BadHexGroup5: Guid = guid!("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaG");
5-
| ^^^^^^^^^^^^
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

xtask/src/main.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn build(opt: &BuildOpt) -> Result<()> {
5050

5151
let cargo = Cargo {
5252
action: CargoAction::Build,
53-
features: Feature::more_code(true, true),
53+
features: Feature::more_code(false, true),
5454
packages: Package::all_except_xtask(),
5555
release: opt.build_mode.release,
5656
target: Some(*opt.target),
@@ -64,8 +64,7 @@ fn clippy(opt: &ClippyOpt) -> Result<()> {
6464
// Run clippy on all the UEFI packages.
6565
let cargo = Cargo {
6666
action: CargoAction::Clippy,
67-
// for all possible features
68-
features: Feature::more_code(true, true),
67+
features: Feature::more_code(false, true),
6968
packages: Package::all_except_xtask(),
7069
release: false,
7170
target: Some(*opt.target),

0 commit comments

Comments
 (0)