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:
commit
a5c039cdb7
22 changed files with 114 additions and 112 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue