about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/session/config.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index bf0e4a77777..474848fbaf3 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -291,14 +291,7 @@ pub struct ExternEntry {
     pub public: bool
 }
 
-impl ExternEntry {
-    pub fn new_public(location: Option<String>) -> ExternEntry {
-        ExternEntry {
-            location,
-            public: true
-        }
-    }
-}
+
 
 impl Externs {
     pub fn new(data: BTreeMap<String, BTreeSet<ExternEntry>>) -> Externs {
@@ -2704,6 +2697,15 @@ mod tests {
     use syntax;
     use super::Options;
 
+    impl ExternEntry {
+        fn new_public(location: Option<String>) -> ExternEntry {
+            ExternEntry {
+                location,
+                public: true
+            }
+        }
+    }
+
     fn optgroups() -> getopts::Options {
         let mut opts = getopts::Options::new();
         for group in super::rustc_optgroups() {