summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2023-04-28 09:55:38 +0800
committeryukang <moorekang@gmail.com>2023-05-01 16:37:00 +0800
commit5d1796a608d387be784f17c28ec7c81f178a81eb (patch)
tree5a5aaafdd30a1c51393aa9d3215b048269089a81 /compiler/rustc_builtin_macros/src
parent0fe1ff2137f75ff5fafd45c04558c5f8ce9a00ee (diff)
downloadrust-5d1796a608d387be784f17c28ec7c81f178a81eb.tar.gz
rust-5d1796a608d387be784f17c28ec7c81f178a81eb.zip
soften the wording for removing type ascription
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
-rw-r--r--compiler/rustc_builtin_macros/src/asm.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/asm.rs b/compiler/rustc_builtin_macros/src/asm.rs
index 3ccdc8179a5..0ea8454db08 100644
--- a/compiler/rustc_builtin_macros/src/asm.rs
+++ b/compiler/rustc_builtin_macros/src/asm.rs
@@ -68,8 +68,7 @@ pub fn parse_asm_args<'a>(
         if !p.eat(&token::Comma) {
             if allow_templates {
                 // After a template string, we always expect *only* a comma...
-                let mut err = diag.create_err(errors::AsmExpectedComma { span: p.token.span });
-                return Err(err);
+                return Err(diag.create_err(errors::AsmExpectedComma { span: p.token.span }));
             } else {
                 // ...after that delegate to `expect` to also include the other expected tokens.
                 return Err(p.expect(&token::Comma).err().unwrap());