Skip to content

Commit ef3dcb6

Browse files
committed
uefi-macros: fix trybuild-based unit tests
The unit tests for the compiler diagnostics are utilizing the trybuild crate. With the recent reordering of the public exports of uefi/lib.rs, the fully qualified paths have changed. To update the expected error messages, I ran: `$ TRYBUILD=overwrite cargo xtask test` I'm not sure whether the previous changes also change something observable by the public API. In the Rust reference, I couldn't find anything about the fully qualified path and how it is influenced by the order of public exports.
1 parent 25c12dc commit ef3dcb6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

uefi-macros/tests/ui/fail/entry_bad_arg.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ error[E0308]: mismatched types
44
8 | fn main(_handle: Handle, _st: SystemTable<Boot>, _x: usize) -> Status {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
66
|
7-
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> uefi::Status`
8-
found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>, usize) -> uefi::Status`
7+
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> uefi::Status`
8+
found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>, usize) -> uefi::Status`

uefi-macros/tests/ui/fail/entry_bad_return_type.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ error[E0308]: mismatched types
44
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
66
|
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`
7+
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> Status`
8+
found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> bool`

0 commit comments

Comments
 (0)