From e31d75caeee35d4c026ec3beb56f6e5844eaf69e Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 7 Nov 2019 19:15:33 +0100 Subject: [PATCH] TAIT: remove redundant check from ast_validation --- src/librustc_passes/ast_validation.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/librustc_passes/ast_validation.rs b/src/librustc_passes/ast_validation.rs index ec5572914d8..bb0aa15efd0 100644 --- a/src/librustc_passes/ast_validation.rs +++ b/src/librustc_passes/ast_validation.rs @@ -20,7 +20,7 @@ use syntax::symbol::{kw, sym}; use syntax::visit::{self, Visitor}; use syntax::{span_err, struct_span_err, walk_list}; -use syntax_pos::{Span, MultiSpan}; +use syntax_pos::Span; use errors::{Applicability, FatalError}; struct AstValidator<'a> { @@ -584,14 +584,6 @@ fn visit_item(&mut self, item: &'a Item) { "unions cannot have zero fields"); } } - ItemKind::OpaqueTy(ref bounds, _) => { - if !bounds.iter() - .any(|b| if let GenericBound::Trait(..) = *b { true } else { false }) { - let msp = MultiSpan::from_spans(bounds.iter() - .map(|bound| bound.span()).collect()); - self.err_handler().span_err(msp, "at least one trait must be specified"); - } - } _ => {} }