about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-06-14 12:23:46 +0100
committervarkor <github@varkor.com>2018-06-20 12:23:46 +0100
commit95f1866a4df85e815886901a7b64d8dd64709872 (patch)
treebdbf856debaa41d7b8efd222db486fc09a4e93fd /src/libsyntax/ast.rs
parentc5f16e0e180f4f76187e55aecb5913a1cf7fab2a (diff)
downloadrust-95f1866a4df85e815886901a7b64d8dd64709872.tar.gz
rust-95f1866a4df85e815886901a7b64d8dd64709872.zip
Make GenericBound explicit
Diffstat (limited to 'src/libsyntax/ast.rs')
-rw-r--r--src/libsyntax/ast.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 9dc13fab2d6..76d19ce0ac5 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -10,7 +10,6 @@
 
 // The Rust abstract syntax tree.
 
-pub use self::GenericBound::*;
 pub use self::UnsafeSource::*;
 pub use self::GenericArgs::*;
 pub use symbol::{Ident, Symbol as Name};
@@ -290,8 +289,8 @@ pub enum GenericBound {
 impl GenericBound {
     pub fn span(&self) -> Span {
         match self {
-            &Trait(ref t, ..) => t.span,
-            &Outlives(ref l) => l.ident.span,
+            &GenericBound::Trait(ref t, ..) => t.span,
+            &GenericBound::Outlives(ref l) => l.ident.span,
         }
     }
 }
@@ -930,8 +929,8 @@ impl Expr {
     fn to_bound(&self) -> Option<GenericBound> {
         match &self.node {
             ExprKind::Path(None, path) =>
-                Some(Trait(PolyTraitRef::new(Vec::new(), path.clone(), self.span),
-                                       TraitBoundModifier::None)),
+                Some(GenericBound::Trait(PolyTraitRef::new(Vec::new(), path.clone(), self.span),
+                                         TraitBoundModifier::None)),
             _ => None,
         }
     }