Detect bare blocks with type ascription that were meant to be a struct
literal
Address part of #34255. Potential improvement: silence the other knock down errors in `issue-34255-1.rs`.
This commit is contained in:
parent
a603756cc5
commit
48b8e4577a
1 changed files with 1 additions and 0 deletions
|
@ -160,6 +160,7 @@ fn rewrite_closure_with_block(
|
|||
.first()
|
||||
.map(|attr| attr.span.to(body.span))
|
||||
.unwrap_or(body.span),
|
||||
could_be_bare_literal: false,
|
||||
};
|
||||
let block = crate::expr::rewrite_block_with_visitor(
|
||||
context,
|
||||
|
|
Loading…
Reference in a new issue