mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 09:36:06 +00:00
review comment
This commit is contained in:
parent
b36bf76dec
commit
5b44b3cb1b
@ -495,7 +495,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
})) = self.tcx.hir().find(self.tcx.hir().get_parent_node(expr.id)) {
|
||||
// `expr` is a literal field for a struct, only suggest if appropriate
|
||||
for field in fields {
|
||||
if field.expr.id == expr.id {
|
||||
if field.expr.id == expr.id && field.is_shorthand {
|
||||
// This is a field literal
|
||||
prefix = format!("{}: ", field.ident);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user