about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/messages.ftl
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-11 18:04:34 +0100
committerGitHub <noreply@github.com>2025-02-11 18:04:34 +0100
commit65d20f39f3d1706d239abb53ef271b5612ec60e7 (patch)
treea8084a901cbaa56267d0876451ce8864c2667ba3 /compiler/rustc_ast_lowering/messages.ftl
parent09ee4e7b001d0be7ca3783aa93b4134474d678a0 (diff)
parentfbd30ea35fb79d73faa9d5b3feae391fed5336c8 (diff)
downloadrust-65d20f39f3d1706d239abb53ef271b5612ec60e7.tar.gz
rust-65d20f39f3d1706d239abb53ef271b5612ec60e7.zip
Rollup merge of #136239 - folkertdev:show-supported-register-classes, r=SparrowLii,jieyouxu
show supported register classes in error message

a simple diagnostic change that shows the supported register classes when an invalid one is found.

This information can be hard to find (especially for unstable targets), and this message now gives at least something to try or search for. I've followed the pattern for invalid clobber ABIs.

`@rustbot` label +A-inline-assembly
Diffstat (limited to 'compiler/rustc_ast_lowering/messages.ftl')
-rw-r--r--compiler/rustc_ast_lowering/messages.ftl3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/messages.ftl b/compiler/rustc_ast_lowering/messages.ftl
index f96c9fe8e32..1b91c33742d 100644
--- a/compiler/rustc_ast_lowering/messages.ftl
+++ b/compiler/rustc_ast_lowering/messages.ftl
@@ -112,7 +112,8 @@ ast_lowering_invalid_register =
     invalid register `{$reg}`: {$error}
 
 ast_lowering_invalid_register_class =
-    invalid register class `{$reg_class}`: {$error}
+    invalid register class `{$reg_class}`: unknown register class
+    .note = the following register classes are supported on this target: {$supported_register_classes}
 
 ast_lowering_match_arm_with_no_body =
     `match` arm with no body