1
Fork 0

Auto merge of #98264 - compiler-errors:missing-arg-placeholder, r=jackh726

Make missing argument placeholder more obvious that it's a placeholder

Use `/* ty */` instead of `{ty}`, since people might be misled into thinking that this is valid syntax, and not just a diagnostic placeholder.

Fixes #96880
This commit is contained in:
bors 2022-06-20 05:37:17 +00:00
commit a5c039cdb7
22 changed files with 114 additions and 112 deletions

View file

@ -955,8 +955,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let input_ty = self.resolve_vars_if_possible(expected_ty);
if input_ty.is_unit() {
"()".to_string()
} else if !input_ty.is_ty_var() {
format!("/* {} */", input_ty)
} else {
format!("{{{}}}", input_ty)
"/* value */".to_string()
}
};
suggestion += &suggestion_text;