@@ -2,7 +2,6 @@ use rustc_ast as ast;
22use rustc_ast:: visit:: { self , AssocCtxt , FnCtxt , FnKind , Visitor } ;
33use rustc_ast:: { attr, AssocConstraint , AssocConstraintKind , NodeId } ;
44use rustc_ast:: { PatKind , RangeEnd } ;
5- use rustc_errors:: StashKey ;
65use rustc_feature:: { AttributeGate , BuiltinAttribute , Features , GateIssue , BUILTIN_ATTRIBUTE_MAP } ;
76use rustc_session:: parse:: { feature_err, feature_err_issue, feature_warn} ;
87use rustc_session:: Session ;
@@ -380,19 +379,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
380379
381380 fn visit_expr ( & mut self , e : & ' a ast:: Expr ) {
382381 match e. kind {
383- ast:: ExprKind :: Type ( ..) => {
384- if self . sess . parse_sess . span_diagnostic . err_count ( ) > 0 {
385- // And if it isn't, cancel the early-pass warning.
386- if let Some ( err) = self
387- . sess
388- . parse_sess
389- . span_diagnostic
390- . steal_diagnostic ( e. span , StashKey :: EarlySyntaxWarning )
391- {
392- err. cancel ( )
393- }
394- }
395- }
396382 ast:: ExprKind :: TryBlock ( _) => {
397383 gate_feature_post ! ( & self , try_blocks, e. span, "`try` expression is experimental" ) ;
398384 }
0 commit comments