@@ -548,9 +548,6 @@ struct DiagnosticMetadata<'ast> {
548548 /// they are used (in a `break` or `continue` statement)
549549 unused_labels : FxHashMap < NodeId , Span > ,
550550
551- /// Only used for better errors on `fn(): fn()`.
552- current_type_ascription : Vec < Span > ,
553-
554551 /// Only used for better errors on `let x = { foo: bar };`.
555552 /// In the case of a parse error with `let x = { foo: bar, };`, this isn't needed, it's only
556553 /// needed for cases where this parses as a correct type ascription.
@@ -4057,17 +4054,8 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
40574054 }
40584055 }
40594056 }
4060- ExprKind :: Type ( ref type_expr, ref ty) => {
4061- // `ParseSess::type_ascription_path_suggestions` keeps spans of colon tokens in
4062- // type ascription. Here we are trying to retrieve the span of the colon token as
4063- // well, but only if it's written without spaces `expr:Ty` and therefore confusable
4064- // with `expr::Ty`, only in this case it will match the span from
4065- // `type_ascription_path_suggestions`.
4066- self . diagnostic_metadata
4067- . current_type_ascription
4068- . push ( type_expr. span . between ( ty. span ) ) ;
4057+ ExprKind :: Type ( ref _type_expr, ref _ty) => {
40694058 visit:: walk_expr ( self , expr) ;
4070- self . diagnostic_metadata . current_type_ascription . pop ( ) ;
40714059 }
40724060 // `async |x| ...` gets desugared to `|x| async {...}`, so we need to
40734061 // resolve the arguments within the proper scopes so that usages of them inside the
0 commit comments