Skip to content

Commit cc9ced2

Browse files
uefi-macros: Fix error tests
The new error text is actually not as good, we'll want to make some updates to the `entry` macro to improve that in the future.
1 parent 83c5e8b commit cc9ced2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

uefi-macros/tests/ui/entry_bad_arg.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ error[E0308]: mismatched types
66
|
77
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> uefi::Status`
88
found fn item `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>, usize) -> uefi::Status {main}`
9+
= note: when the arguments and return types match, functions can be coerced to function pointers

uefi-macros/tests/ui/entry_bad_return_type.stderr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ error[E0308]: mismatched types
22
--> tests/ui/entry_bad_return_type.rs:8:4
33
|
44
8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
5-
| ^^^^ expected struct `Status`, found `bool`
5+
| ^^^^ expected fn pointer, found fn item
66
|
77
= note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> Status`
88
found fn item `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<_>) -> bool {main}`
9+
= note: when the arguments and return types match, functions can be coerced to function pointers

0 commit comments

Comments
 (0)