File tree 2 files changed +17
-2
lines changed
uefi-macros/tests/ui/fail
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ error[E0308]: mismatched types
4
4
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
6
6
|
7
- = note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_ >) -> Status`
8
- found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_ >) -> bool`
7
+ = note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot >) -> Status`
8
+ found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot >) -> bool`
Original file line number Diff line number Diff line change @@ -271,6 +271,21 @@ impl Cargo {
271
271
}
272
272
CargoAction :: Test => {
273
273
action = "test" ;
274
+
275
+ // Ensure that uefi-macros trybuild tests work regardless of
276
+ // whether RUSTFLAGS is set.
277
+ //
278
+ // The trybuild tests run `rustc` with `--verbose`, which
279
+ // affects error output. This flag is set via
280
+ // `--config=build.rustflags` [1], but that will be ignored if
281
+ // the RUSTFLAGS env var is set. Compensate by appending
282
+ // `--verbose` to the var in that case.
283
+ //
284
+ // [1]: https://github.com/dtolnay/trybuild/blob/b1b7064b7ad11e0ab563e9eb843651d86e4545b7/src/cargo.rs#L44
285
+ if let Ok ( mut rustflags) = env:: var ( "RUSTFLAGS" ) {
286
+ rustflags. push_str ( " --verbose" ) ;
287
+ cmd. env ( "RUSTFLAGS" , rustflags) ;
288
+ }
274
289
}
275
290
} ;
276
291
cmd. arg ( action) ;
You can’t perform that action at this time.
0 commit comments