Skip to content

Commit cd2de6a

Browse files
committed
Fix error message in #[patchable_function_entry]
1 parent 7cd2b8d commit cd2de6a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ impl<S: Stage> SingleAttributeParser<S> for PatchableFunctionEntryParser {
737737
let mut entry = None;
738738

739739
if meta_item_list.len() == 0 {
740-
cx.adcx().expected_list(meta_item_list.span, args);
740+
cx.adcx().expected_at_least_one_argument(meta_item_list.span);
741741
return None;
742742
}
743743

tests/ui/patchable-function-entry/patchable-function-entry-attribute.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ error[E0539]: malformed `patchable_function_entry` attribute input
4040
LL | #[patchable_function_entry()]
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^--^
4242
| | |
43-
| | expected this to be a list
43+
| | expected at least 1 argument here
4444
| help: must be of the form: `#[patchable_function_entry(prefix_nops = m, entry_nops = n)]`
4545

4646
error[E0538]: malformed `patchable_function_entry` attribute input

0 commit comments

Comments
 (0)