From 12ce6e9c60c662dc7181b70021145f191c0f9f3e Mon Sep 17 00:00:00 2001 From: Esteban Kuber Date: Thu, 2 Sep 2021 18:34:03 +0000 Subject: 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`. --- compiler/rustc_interface/src/util.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_interface/src') diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 6b64614363f..a5f0c014778 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -810,6 +810,7 @@ impl<'a> MutVisitor for ReplaceBodyWithLoop<'a, '_> { id: resolver.next_node_id(), span: rustc_span::DUMMY_SP, tokens: None, + could_be_bare_literal: false, } } -- cgit 1.4.1-3-g733a5