Skip to content

Commit e31d75c

Browse files
committed
TAIT: remove redundant check from ast_validation
1 parent aa6a72f commit e31d75c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/librustc_passes/ast_validation.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use syntax::source_map::Spanned;
2020
use syntax::symbol::{kw, sym};
2121
use syntax::visit::{self, Visitor};
2222
use syntax::{span_err, struct_span_err, walk_list};
23-
use syntax_pos::{Span, MultiSpan};
23+
use syntax_pos::Span;
2424
use errors::{Applicability, FatalError};
2525

2626
struct AstValidator<'a> {
@@ -584,14 +584,6 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
584584
"unions cannot have zero fields");
585585
}
586586
}
587-
ItemKind::OpaqueTy(ref bounds, _) => {
588-
if !bounds.iter()
589-
.any(|b| if let GenericBound::Trait(..) = *b { true } else { false }) {
590-
let msp = MultiSpan::from_spans(bounds.iter()
591-
.map(|bound| bound.span()).collect());
592-
self.err_handler().span_err(msp, "at least one trait must be specified");
593-
}
594-
}
595587
_ => {}
596588
}
597589

0 commit comments

Comments
 (0)