Improve collapsible_match error message syntax
This commit is contained in:
parent
bfe7f070bd
commit
4e6fc6fa05
2 changed files with 2 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ fn check_arm<'tcx>(
|
|||
// collapsing patterns need an explicit field name in struct pattern matching
|
||||
// ex: Struct {x: Some(1)}
|
||||
let replace_msg = if is_innermost_parent_pat_struct {
|
||||
format!(", prefixed by {}:", snippet(cx, binding_span, "their field name"))
|
||||
format!(", prefixed by `{}`:", snippet(cx, binding_span, "their field name"))
|
||||
} else {
|
||||
String::new()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue