soften the wording for removing type ascription

This commit is contained in:
yukang 2023-04-28 09:55:38 +08:00
parent 0fe1ff2137
commit 5d1796a608
14 changed files with 16 additions and 23 deletions

View file

@ -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());