about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/stmt.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-06 03:28:15 +0100
committerGitHub <noreply@github.com>2019-11-06 03:28:15 +0100
commit409b2bf941b2724a028f65518c64f799f205a186 (patch)
tree18d029fe26855d648607d80090acb0a28048f5fe /src/libsyntax/parse/parser/stmt.rs
parent7d66a09a29342d520a3a17ae3b4f6233c97948f4 (diff)
parenta8ccbf5f2fa75007ce0effe58caef4e342859a4f (diff)
Rollup merge of #66098 - estebank:path-asciption-typo, r=Centril
Detect `::` -> `:` typo when involving turbofish

Fix #65569.
Diffstat (limited to 'src/libsyntax/parse/parser/stmt.rs')
-rw-r--r--src/libsyntax/parse/parser/stmt.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser/stmt.rs b/src/libsyntax/parse/parser/stmt.rs
index 4f51fefe66f..12c530f3cbb 100644
--- a/src/libsyntax/parse/parser/stmt.rs
+++ b/src/libsyntax/parse/parser/stmt.rs
@@ -397,6 +397,7 @@ impl<'a> Parser<'a> {
             }
             let stmt = match self.parse_full_stmt(false) {
                 Err(mut err) => {
+                    self.maybe_annotate_with_ascription(&mut err, false);
                     err.emit();
                     self.recover_stmt_(SemiColonMode::Ignore, BlockMode::Ignore);
                     Some(Stmt {