From cdcecc85acdf50c87cfd1fbc0f5ddbc93b267fb8 Mon Sep 17 00:00:00 2001 From: Sasha Pourcelot Date: Sat, 4 Apr 2026 18:57:54 +0000 Subject: [PATCH] fix error message for `#[custom_mir]` --- compiler/rustc_attr_parsing/src/attributes/prototype.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_attr_parsing/src/attributes/prototype.rs b/compiler/rustc_attr_parsing/src/attributes/prototype.rs index e77096743dd0..e23e2ba633f7 100644 --- a/compiler/rustc_attr_parsing/src/attributes/prototype.rs +++ b/compiler/rustc_attr_parsing/src/attributes/prototype.rs @@ -82,7 +82,7 @@ fn extract_value( } let Some(val) = arg.name_value() else { - cx.adcx().expected_single_argument(arg.span().unwrap_or(span), 2); + cx.adcx().expected_name_value(span, Some(key)); *failed = true; return; };