mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 18:04:13 +00:00
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
@ -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 New Issue
Block a user