TAIT: remove redundant check from ast_validation

This commit is contained in:
Mazdak Farrokhzad 2019-11-07 19:15:33 +01:00
parent aa6a72f4a5
commit e31d75caee

View File

@ -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");
}
}
_ => {}
}