From d92c68393323359d30a8ee2478b314853a39ba34 Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Fri, 1 Oct 2021 23:03:28 +0200 Subject: Improve error message for missing angle brackets in `[_]::method` --- compiler/rustc_ast/src/ast.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler') diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index c27ab810a4c..e2424e7d7ad 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -1211,6 +1211,8 @@ impl Expr { } } + ExprKind::Underscore => TyKind::Infer, + // This expression doesn't look like a type syntactically. _ => return None, }; -- cgit 1.4.1-3-g733a5