Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions uefi-macros/tests/ui/fail/entry_bad_return_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ error[E0308]: mismatched types
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
|
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> Status`
found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> bool`
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> Status`
found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> bool`
15 changes: 15 additions & 0 deletions xtask/src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,21 @@ impl Cargo {
}
CargoAction::Test => {
action = "test";

// Ensure that uefi-macros trybuild tests work regardless of
// whether RUSTFLAGS is set.
//
// The trybuild tests run `rustc` with `--verbose`, which
// affects error output. This flag is set via
// `--config=build.rustflags` [1], but that will be ignored if
// the RUSTFLAGS env var is set. Compensate by appending
// `--verbose` to the var in that case.
//
// [1]: https://github.com/dtolnay/trybuild/blob/b1b7064b7ad11e0ab563e9eb843651d86e4545b7/src/cargo.rs#L44
if let Ok(mut rustflags) = env::var("RUSTFLAGS") {
rustflags.push_str(" --verbose");
cmd.env("RUSTFLAGS", rustflags);
}
}
};
cmd.arg(action);
Expand Down