about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-07 19:15:33 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-11-14 13:40:42 +0100
commite31d75caeee35d4c026ec3beb56f6e5844eaf69e (patch)
treec8016535dc9aa91f44462eb648f4346405236bc7
parentaa6a72f4a5f53f7e81a5cb15f1f129e697667964 (diff)
downloadrust-e31d75caeee35d4c026ec3beb56f6e5844eaf69e.tar.gz
rust-e31d75caeee35d4c026ec3beb56f6e5844eaf69e.zip
TAIT: remove redundant check from ast_validation
-rw-r--r--src/librustc_passes/ast_validation.rs10
1 files changed, 1 insertions, 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::source_map::Spanned;
 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 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
                                                 "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");
-                }
-            }
             _ => {}
         }