@@ -2,7 +2,6 @@ use rustc_ast as ast;
2
2
use rustc_ast:: visit:: { self , AssocCtxt , FnCtxt , FnKind , Visitor } ;
3
3
use rustc_ast:: { attr, AssocConstraint , AssocConstraintKind , NodeId } ;
4
4
use rustc_ast:: { PatKind , RangeEnd } ;
5
- use rustc_errors:: StashKey ;
6
5
use rustc_feature:: { AttributeGate , BuiltinAttribute , Features , GateIssue , BUILTIN_ATTRIBUTE_MAP } ;
7
6
use rustc_session:: parse:: { feature_err, feature_err_issue, feature_warn} ;
8
7
use rustc_session:: Session ;
@@ -380,19 +379,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
380
379
381
380
fn visit_expr ( & mut self , e : & ' a ast:: Expr ) {
382
381
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
- }
396
382
ast:: ExprKind :: TryBlock ( _) => {
397
383
gate_feature_post ! ( & self , try_blocks, e. span, "`try` expression is experimental" ) ;
398
384
}
0 commit comments