From 514b37e3d6810abcc511838a4f238afaa247e700 Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Mon, 25 Apr 2016 10:50:24 -0400
Subject: [PATCH 01/10] refactor interface of make_compile_args

---
 src/tools/compiletest/src/runtest.rs | 47 +++++++++++++++-------------
 1 file changed, 26 insertions(+), 21 deletions(-)

diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 19f706dc1d7..8e6ac114ab3 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1161,7 +1161,8 @@ fn compile_test(config: &Config, props: &TestProps,
     let args = make_compile_args(config,
                                  props,
                                  link_args,
-                                 |a, b| TargetLocation::ThisFile(make_exe_name(a, b)), testpaths);
+                                 &testpaths.file,
+                                 TargetLocation::ThisFile(make_exe_name(config, testpaths)));
     compose_and_run_compiler(config, props, testpaths, args, None)
 }
 
@@ -1270,16 +1271,17 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
             }
         };
         crate_type.extend(extra_link_args.clone());
+        let aux_output = {
+            let f = make_lib_name(config, &testpaths.file, testpaths);
+            let parent = f.parent().unwrap();
+            TargetLocation::ThisDirectory(parent.to_path_buf())
+        };
         let aux_args =
             make_compile_args(config,
                               &aux_props,
                               crate_type,
-                              |a,b| {
-                                  let f = make_lib_name(a, &b.file, testpaths);
-                                  let parent = f.parent().unwrap();
-                                  TargetLocation::ThisDirectory(parent.to_path_buf())
-                              },
-                              &aux_testpaths);
+                              &aux_testpaths.file,
+                              aux_output);
         let auxres = compose_and_run(config,
                                      &aux_testpaths,
                                      aux_args,
@@ -1328,22 +1330,21 @@ enum TargetLocation {
     ThisDirectory(PathBuf),
 }
 
-fn make_compile_args<F>(config: &Config,
-                        props: &TestProps,
-                        extras: Vec<String> ,
-                        xform: F,
-                        testpaths: &TestPaths)
-                        -> ProcArgs where
-    F: FnOnce(&Config, &TestPaths) -> TargetLocation,
+fn make_compile_args(config: &Config,
+                     props: &TestProps,
+                     extras: Vec<String> ,
+                     input_file: &Path,
+                     output_file: TargetLocation)
+                     -> ProcArgs
 {
-    let xform_file = xform(config, testpaths);
     let target = if props.force_host {
         &*config.host
     } else {
         &*config.target
     };
+
     // FIXME (#9639): This needs to handle non-utf8 paths
-    let mut args = vec!(testpaths.file.to_str().unwrap().to_owned(),
+    let mut args = vec!(input_file.to_str().unwrap().to_owned(),
                         "-L".to_owned(),
                         config.build_base.to_str().unwrap().to_owned(),
                         format!("--target={}", target));
@@ -1384,7 +1385,7 @@ fn make_compile_args<F>(config: &Config,
         args.push("-C".to_owned());
         args.push("prefer-dynamic".to_owned());
     }
-    let path = match xform_file {
+    let path = match output_file {
         TargetLocation::ThisFile(path) => {
             args.push("-o".to_owned());
             path
@@ -1550,6 +1551,9 @@ fn output_testname(filepath: &Path) -> PathBuf {
     PathBuf::from(filepath.file_stem().unwrap())
 }
 
+/// Given a test path like `compile-fail/foo/bar.rs` Returns a name like
+///
+///     <output>/foo/bar-stage1
 fn output_base_name(config: &Config, testpaths: &TestPaths) -> PathBuf {
     let dir = config.build_base.join(&testpaths.relative_dir);
 
@@ -1772,10 +1776,11 @@ fn compile_test_and_save_ir(config: &Config, props: &TestProps,
     let args = make_compile_args(config,
                                  props,
                                  link_args,
-                                 |a, b| TargetLocation::ThisDirectory(
-                                     output_base_name(a, b).parent()
-                                        .unwrap().to_path_buf()),
-                                 testpaths);
+                                 &testpaths.file,
+                                 TargetLocation::ThisDirectory(
+                                     output_base_name(config, testpaths).parent()
+                                                                        .unwrap()
+                                                                        .to_path_buf()));
     compose_and_run_compiler(config, props, testpaths, args, None)
 }
 

From ef884bcb932e78d7ed353d9c04b8261cf0c37fdb Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Mon, 25 Apr 2016 16:51:06 -0400
Subject: [PATCH 02/10] use methods for EarlyProps and TestProps

---
 src/tools/compiletest/src/header.rs  | 444 ++++++++++++++-------------
 src/tools/compiletest/src/main.rs    |   4 +-
 src/tools/compiletest/src/runtest.rs |  12 +-
 3 files changed, 233 insertions(+), 227 deletions(-)

diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index c8df8739f52..d75b3b71a99 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -18,6 +18,111 @@ use common::Config;
 use common;
 use util;
 
+/// Properties which must be known very early, before actually running
+/// the test.
+pub struct EarlyProps {
+    pub ignore: bool,
+    pub should_fail: bool,
+}
+
+impl EarlyProps {
+    pub fn from_file(config: &Config, testfile: &Path) -> Self {
+        let mut props = EarlyProps {
+            ignore: false,
+            should_fail: false,
+        };
+
+        iter_header(testfile, None, &mut |ln| {
+            props.ignore =
+                props.ignore ||
+                parse_name_directive(ln, "ignore-test") ||
+                parse_name_directive(ln, &ignore_target(config)) ||
+                parse_name_directive(ln, &ignore_architecture(config)) ||
+                parse_name_directive(ln, &ignore_stage(config)) ||
+                parse_name_directive(ln, &ignore_env(config)) ||
+                (config.mode == common::Pretty &&
+                 parse_name_directive(ln, "ignore-pretty")) ||
+                (config.target != config.host &&
+                 parse_name_directive(ln, "ignore-cross-compile")) ||
+                ignore_gdb(config, ln) ||
+                ignore_lldb(config, ln);
+
+            props.should_fail =
+                props.should_fail ||
+                parse_name_directive(ln, "should-fail");
+        });
+
+        return props;
+
+        fn ignore_target(config: &Config) -> String {
+            format!("ignore-{}", util::get_os(&config.target))
+        }
+        fn ignore_architecture(config: &Config) -> String {
+            format!("ignore-{}", util::get_arch(&config.target))
+        }
+        fn ignore_stage(config: &Config) -> String {
+            format!("ignore-{}",
+                    config.stage_id.split('-').next().unwrap())
+        }
+        fn ignore_env(config: &Config) -> String {
+            format!("ignore-{}", util::get_env(&config.target).unwrap_or("<unknown>"))
+        }
+        fn ignore_gdb(config: &Config, line: &str) -> bool {
+            if config.mode != common::DebugInfoGdb {
+                return false;
+            }
+
+            if parse_name_directive(line, "ignore-gdb") {
+                return true;
+            }
+
+            if let Some(ref actual_version) = config.gdb_version {
+                if line.contains("min-gdb-version") {
+                    let min_version = line.trim()
+                                          .split(' ')
+                                          .last()
+                                          .expect("Malformed GDB version directive");
+                    // Ignore if actual version is smaller the minimum required
+                    // version
+                    gdb_version_to_int(actual_version) <
+                        gdb_version_to_int(min_version)
+                } else {
+                    false
+                }
+            } else {
+                false
+            }
+        }
+
+        fn ignore_lldb(config: &Config, line: &str) -> bool {
+            if config.mode != common::DebugInfoLldb {
+                return false;
+            }
+
+            if parse_name_directive(line, "ignore-lldb") {
+                return true;
+            }
+
+            if let Some(ref actual_version) = config.lldb_version {
+                if line.contains("min-lldb-version") {
+                    let min_version = line.trim()
+                                          .split(' ')
+                                          .last()
+                                          .expect("Malformed lldb version directive");
+                    // Ignore if actual version is smaller the minimum required
+                    // version
+                    lldb_version_to_int(actual_version) <
+                        lldb_version_to_int(min_version)
+                } else {
+                    false
+                }
+            } else {
+                false
+            }
+        }
+    }
+}
+
 #[derive(Clone, Debug)]
 pub struct TestProps {
     // Lines that should be expected, in order, on standard out
@@ -57,233 +162,134 @@ pub struct TestProps {
     pub revisions: Vec<String>,
 }
 
-// Load any test directives embedded in the file
-pub fn load_props(testfile: &Path) -> TestProps {
-    let error_patterns = Vec::new();
-    let aux_builds = Vec::new();
-    let exec_env = Vec::new();
-    let run_flags = None;
-    let pp_exact = None;
-    let check_lines = Vec::new();
-    let build_aux_docs = false;
-    let force_host = false;
-    let check_stdout = false;
-    let no_prefer_dynamic = false;
-    let pretty_expanded = false;
-    let pretty_compare_only = false;
-    let forbid_output = Vec::new();
-    let mut props = TestProps {
-        error_patterns: error_patterns,
-        compile_flags: vec![],
-        run_flags: run_flags,
-        pp_exact: pp_exact,
-        aux_builds: aux_builds,
-        revisions: vec![],
-        rustc_env: vec![],
-        exec_env: exec_env,
-        check_lines: check_lines,
-        build_aux_docs: build_aux_docs,
-        force_host: force_host,
-        check_stdout: check_stdout,
-        no_prefer_dynamic: no_prefer_dynamic,
-        pretty_expanded: pretty_expanded,
-        pretty_mode: format!("normal"),
-        pretty_compare_only: pretty_compare_only,
-        forbid_output: forbid_output,
-    };
-    load_props_into(&mut props, testfile, None);
-    props
-}
-
-/// Load properties from `testfile` into `props`. If a property is
-/// tied to a particular revision `foo` (indicated by writing
-/// `//[foo]`), then the property is ignored unless `cfg` is
-/// `Some("foo")`.
-pub fn load_props_into(props: &mut TestProps, testfile: &Path, cfg: Option<&str>)  {
-    iter_header(testfile, cfg, &mut |ln| {
-        if let Some(ep) = parse_error_pattern(ln) {
-            props.error_patterns.push(ep);
-        }
-
-        if let Some(flags) = parse_compile_flags(ln) {
-            props.compile_flags.extend(
-                flags
-                    .split_whitespace()
-                    .map(|s| s.to_owned()));
-        }
-
-        if let Some(r) = parse_revisions(ln) {
-            props.revisions.extend(r);
-        }
-
-        if props.run_flags.is_none() {
-            props.run_flags = parse_run_flags(ln);
-        }
-
-        if props.pp_exact.is_none() {
-            props.pp_exact = parse_pp_exact(ln, testfile);
-        }
-
-        if !props.build_aux_docs {
-            props.build_aux_docs = parse_build_aux_docs(ln);
-        }
-
-        if !props.force_host {
-            props.force_host = parse_force_host(ln);
-        }
-
-        if !props.check_stdout {
-            props.check_stdout = parse_check_stdout(ln);
-        }
-
-        if !props.no_prefer_dynamic {
-            props.no_prefer_dynamic = parse_no_prefer_dynamic(ln);
-        }
-
-        if !props.pretty_expanded {
-            props.pretty_expanded = parse_pretty_expanded(ln);
-        }
-
-        if let Some(m) = parse_pretty_mode(ln) {
-            props.pretty_mode = m;
-        }
-
-        if !props.pretty_compare_only {
-            props.pretty_compare_only = parse_pretty_compare_only(ln);
-        }
-
-        if let  Some(ab) = parse_aux_build(ln) {
-            props.aux_builds.push(ab);
-        }
-
-        if let Some(ee) = parse_env(ln, "exec-env") {
-            props.exec_env.push(ee);
-        }
-
-        if let Some(ee) = parse_env(ln, "rustc-env") {
-            props.rustc_env.push(ee);
-        }
-
-        if let Some(cl) =  parse_check_line(ln) {
-            props.check_lines.push(cl);
-        }
-
-        if let Some(of) = parse_forbid_output(ln) {
-            props.forbid_output.push(of);
-        }
-    });
-
-    for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
-        match env::var(key) {
-            Ok(val) =>
-                if props.exec_env.iter().find(|&&(ref x, _)| *x == key).is_none() {
-                    props.exec_env.push((key.to_owned(), val))
-                },
-            Err(..) => {}
+impl TestProps {
+    pub fn new() -> Self {
+        let error_patterns = Vec::new();
+        let aux_builds = Vec::new();
+        let exec_env = Vec::new();
+        let run_flags = None;
+        let pp_exact = None;
+        let check_lines = Vec::new();
+        let build_aux_docs = false;
+        let force_host = false;
+        let check_stdout = false;
+        let no_prefer_dynamic = false;
+        let pretty_expanded = false;
+        let pretty_compare_only = false;
+        let forbid_output = Vec::new();
+        TestProps {
+            error_patterns: error_patterns,
+            compile_flags: vec![],
+            run_flags: run_flags,
+            pp_exact: pp_exact,
+            aux_builds: aux_builds,
+            revisions: vec![],
+            rustc_env: vec![],
+            exec_env: exec_env,
+            check_lines: check_lines,
+            build_aux_docs: build_aux_docs,
+            force_host: force_host,
+            check_stdout: check_stdout,
+            no_prefer_dynamic: no_prefer_dynamic,
+            pretty_expanded: pretty_expanded,
+            pretty_mode: format!("normal"),
+            pretty_compare_only: pretty_compare_only,
+            forbid_output: forbid_output,
         }
     }
-}
 
-pub struct EarlyProps {
-    pub ignore: bool,
-    pub should_fail: bool,
-}
-
-// scan the file to detect whether the test should be ignored and
-// whether it should panic; these are two things the test runner needs
-// to know early, before actually running the test
-pub fn early_props(config: &Config, testfile: &Path) -> EarlyProps {
-    let mut props = EarlyProps {
-        ignore: false,
-        should_fail: false,
-    };
-
-    iter_header(testfile, None, &mut |ln| {
-        props.ignore =
-            props.ignore ||
-            parse_name_directive(ln, "ignore-test") ||
-            parse_name_directive(ln, &ignore_target(config)) ||
-            parse_name_directive(ln, &ignore_architecture(config)) ||
-            parse_name_directive(ln, &ignore_stage(config)) ||
-            parse_name_directive(ln, &ignore_env(config)) ||
-            (config.mode == common::Pretty &&
-             parse_name_directive(ln, "ignore-pretty")) ||
-            (config.target != config.host &&
-             parse_name_directive(ln, "ignore-cross-compile")) ||
-            ignore_gdb(config, ln) ||
-            ignore_lldb(config, ln);
-
-        props.should_fail =
-            props.should_fail ||
-            parse_name_directive(ln, "should-fail");
-    });
-
-    return props;
-
-    fn ignore_target(config: &Config) -> String {
-        format!("ignore-{}", util::get_os(&config.target))
+    pub fn from_file(testfile: &Path) -> Self {
+        let mut props = TestProps::new();
+        props.load_from(testfile, None);
+        props
     }
-    fn ignore_architecture(config: &Config) -> String {
-        format!("ignore-{}", util::get_arch(&config.target))
-    }
-    fn ignore_stage(config: &Config) -> String {
-        format!("ignore-{}",
-                config.stage_id.split('-').next().unwrap())
-    }
-    fn ignore_env(config: &Config) -> String {
-        format!("ignore-{}", util::get_env(&config.target).unwrap_or("<unknown>"))
-    }
-    fn ignore_gdb(config: &Config, line: &str) -> bool {
-        if config.mode != common::DebugInfoGdb {
-            return false;
-        }
 
-        if parse_name_directive(line, "ignore-gdb") {
-            return true;
-        }
-
-        if let Some(ref actual_version) = config.gdb_version {
-            if line.contains("min-gdb-version") {
-                let min_version = line.trim()
-                                      .split(' ')
-                                      .last()
-                                      .expect("Malformed GDB version directive");
-                // Ignore if actual version is smaller the minimum required
-                // version
-                gdb_version_to_int(actual_version) <
-                    gdb_version_to_int(min_version)
-            } else {
-                false
+    /// Load properties from `testfile` into `props`. If a property is
+    /// tied to a particular revision `foo` (indicated by writing
+    /// `//[foo]`), then the property is ignored unless `cfg` is
+    /// `Some("foo")`.
+    pub fn load_from(&mut self, testfile: &Path, cfg: Option<&str>)  {
+        iter_header(testfile, cfg, &mut |ln| {
+            if let Some(ep) = parse_error_pattern(ln) {
+                self.error_patterns.push(ep);
             }
-        } else {
-            false
-        }
-    }
 
-    fn ignore_lldb(config: &Config, line: &str) -> bool {
-        if config.mode != common::DebugInfoLldb {
-            return false;
-        }
-
-        if parse_name_directive(line, "ignore-lldb") {
-            return true;
-        }
-
-        if let Some(ref actual_version) = config.lldb_version {
-            if line.contains("min-lldb-version") {
-                let min_version = line.trim()
-                                      .split(' ')
-                                      .last()
-                                      .expect("Malformed lldb version directive");
-                // Ignore if actual version is smaller the minimum required
-                // version
-                lldb_version_to_int(actual_version) <
-                    lldb_version_to_int(min_version)
-            } else {
-                false
+            if let Some(flags) = parse_compile_flags(ln) {
+                self.compile_flags.extend(
+                    flags
+                        .split_whitespace()
+                        .map(|s| s.to_owned()));
+            }
+
+            if let Some(r) = parse_revisions(ln) {
+                self.revisions.extend(r);
+            }
+
+            if self.run_flags.is_none() {
+                self.run_flags = parse_run_flags(ln);
+            }
+
+            if self.pp_exact.is_none() {
+                self.pp_exact = parse_pp_exact(ln, testfile);
+            }
+
+            if !self.build_aux_docs {
+                self.build_aux_docs = parse_build_aux_docs(ln);
+            }
+
+            if !self.force_host {
+                self.force_host = parse_force_host(ln);
+            }
+
+            if !self.check_stdout {
+                self.check_stdout = parse_check_stdout(ln);
+            }
+
+            if !self.no_prefer_dynamic {
+                self.no_prefer_dynamic = parse_no_prefer_dynamic(ln);
+            }
+
+            if !self.pretty_expanded {
+                self.pretty_expanded = parse_pretty_expanded(ln);
+            }
+
+            if let Some(m) = parse_pretty_mode(ln) {
+                self.pretty_mode = m;
+            }
+
+            if !self.pretty_compare_only {
+                self.pretty_compare_only = parse_pretty_compare_only(ln);
+            }
+
+            if let  Some(ab) = parse_aux_build(ln) {
+                self.aux_builds.push(ab);
+            }
+
+            if let Some(ee) = parse_env(ln, "exec-env") {
+                self.exec_env.push(ee);
+            }
+
+            if let Some(ee) = parse_env(ln, "rustc-env") {
+                self.rustc_env.push(ee);
+            }
+
+            if let Some(cl) =  parse_check_line(ln) {
+                self.check_lines.push(cl);
+            }
+
+            if let Some(of) = parse_forbid_output(ln) {
+                self.forbid_output.push(of);
+            }
+        });
+
+        for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
+            match env::var(key) {
+                Ok(val) =>
+                    if self.exec_env.iter().find(|&&(ref x, _)| *x == key).is_none() {
+                        self.exec_env.push((key.to_owned(), val))
+                    },
+                Err(..) => {}
             }
-        } else {
-            false
         }
     }
 }
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 26382967c6b..45c69eec542 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -39,6 +39,8 @@ use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Mode};
 use test::TestPaths;
 use util::logv;
 
+use self::header::EarlyProps;
+
 pub mod procsrv;
 pub mod util;
 mod json;
@@ -394,7 +396,7 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
 }
 
 pub fn make_test(config: &Config, testpaths: &TestPaths) -> test::TestDescAndFn {
-    let early_props = header::early_props(config, &testpaths.file);
+    let early_props = EarlyProps::from_file(config, &testpaths.file);
 
     // The `should-fail` annotation doesn't apply to pretty tests,
     // since we run the pretty printer across all tests by default.
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 8e6ac114ab3..29a5fef4391 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -47,7 +47,7 @@ pub fn run(config: Config, testpaths: &TestPaths) {
         print!("\n\n");
     }
     debug!("running {:?}", testpaths.file.display());
-    let props = header::load_props(&testpaths.file);
+    let props = TestProps::from_file(&testpaths.file);
     debug!("loaded props");
     match config.mode {
         CompileFail => run_cfail_test(&config, &props, &testpaths),
@@ -84,9 +84,7 @@ fn for_each_revision<OP>(config: &Config, props: &TestProps, testpaths: &TestPat
     } else {
         for revision in &props.revisions {
             let mut revision_props = props.clone();
-            header::load_props_into(&mut revision_props,
-                                    &testpaths.file,
-                                    Some(&revision));
+            revision_props.load_from(&testpaths.file, Some(&revision));
             revision_props.compile_flags.extend(vec![
                 format!("--cfg"),
                 format!("{}", revision),
@@ -1174,7 +1172,7 @@ fn document(config: &Config,
     if props.build_aux_docs {
         for rel_ab in &props.aux_builds {
             let aux_testpaths = compute_aux_test_paths(config, testpaths, rel_ab);
-            let aux_props = header::load_props(&aux_testpaths.file);
+            let aux_props = TestProps::from_file(&aux_testpaths.file);
             let auxres = document(config, &aux_props, &aux_testpaths, out_dir);
             if !auxres.status.success() {
                 return auxres;
@@ -1249,7 +1247,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
 
     for rel_ab in &props.aux_builds {
         let aux_testpaths = compute_aux_test_paths(config, testpaths, rel_ab);
-        let aux_props = header::load_props(&aux_testpaths.file);
+        let aux_props = TestProps::from_file(&aux_testpaths.file);
         let mut crate_type = if aux_props.no_prefer_dynamic {
             Vec::new()
         } else {
@@ -2044,7 +2042,7 @@ fn run_incremental_test(config: &Config, props: &TestProps, testpaths: &TestPath
 
     for revision in &props.revisions {
         let mut revision_props = props.clone();
-        header::load_props_into(&mut revision_props, &testpaths.file, Some(&revision));
+        revision_props.load_from(&testpaths.file, Some(&revision));
 
         revision_props.compile_flags.extend(vec![
             format!("-Z"),

From 6b10756a59c37a53761c326946dc4e42f24ff606 Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Mon, 25 Apr 2016 17:59:31 -0400
Subject: [PATCH 03/10] move free functions in runtest into methods

Also, promote the for loop iterating over revisions out into the
top-level method, whereas before it was pushed down instead each test's
method. Not entirely clear that this was the right call.
---
 src/tools/compiletest/src/runtest.rs | 3786 +++++++++++++-------------
 1 file changed, 1873 insertions(+), 1913 deletions(-)

diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 29a5fef4391..14a4c74bcd4 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -47,306 +47,304 @@ pub fn run(config: Config, testpaths: &TestPaths) {
         print!("\n\n");
     }
     debug!("running {:?}", testpaths.file.display());
-    let props = TestProps::from_file(&testpaths.file);
-    debug!("loaded props");
-    match config.mode {
-        CompileFail => run_cfail_test(&config, &props, &testpaths),
-        ParseFail => run_cfail_test(&config, &props, &testpaths),
-        RunFail => run_rfail_test(&config, &props, &testpaths),
-        RunPass => run_rpass_test(&config, &props, &testpaths),
-        RunPassValgrind => run_valgrind_test(&config, &props, &testpaths),
-        Pretty => run_pretty_test(&config, &props, &testpaths),
-        DebugInfoGdb => run_debuginfo_gdb_test(&config, &props, &testpaths),
-        DebugInfoLldb => run_debuginfo_lldb_test(&config, &props, &testpaths),
-        Codegen => run_codegen_test(&config, &props, &testpaths),
-        Rustdoc => run_rustdoc_test(&config, &props, &testpaths),
-        CodegenUnits => run_codegen_units_test(&config, &props, &testpaths),
-        Incremental => run_incremental_test(&config, &props, &testpaths),
-        RunMake => run_rmake_test(&config, &props, &testpaths),
-    }
-}
+    let base_props = TestProps::from_file(&testpaths.file);
 
-fn get_output(props: &TestProps, proc_res: &ProcRes) -> String {
-    if props.check_stdout {
-        format!("{}{}", proc_res.stdout, proc_res.stderr)
+    let base_cx = TestCx { config: &config,
+                           props: &base_props,
+                           testpaths: testpaths,
+                           revision: None };
+    base_cx.init_all();
+
+    if base_props.revisions.is_empty() {
+        base_cx.run_revision()
     } else {
-        proc_res.stderr.clone()
-    }
-}
-
-
-fn for_each_revision<OP>(config: &Config, props: &TestProps, testpaths: &TestPaths,
-                         mut op: OP)
-    where OP: FnMut(&Config, &TestProps, &TestPaths, Option<&str>)
-{
-    if props.revisions.is_empty() {
-        op(config, props, testpaths, None)
-    } else {
-        for revision in &props.revisions {
-            let mut revision_props = props.clone();
+        for revision in &base_props.revisions {
+            let mut revision_props = base_props.clone();
             revision_props.load_from(&testpaths.file, Some(&revision));
             revision_props.compile_flags.extend(vec![
                 format!("--cfg"),
                 format!("{}", revision),
             ]);
-            op(config, &revision_props, testpaths, Some(revision));
+            let rev_cx = TestCx {
+                config: &config,
+                props: &revision_props,
+                testpaths: testpaths,
+                revision: Some(revision)
+            };
+            rev_cx.run_revision();
         }
     }
+
+    base_cx.complete_all();
 }
 
-fn run_cfail_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    for_each_revision(config, props, testpaths, run_cfail_test_revision);
+struct TestCx<'test> {
+    config: &'test Config,
+    props: &'test TestProps,
+    testpaths: &'test TestPaths,
+    revision: Option<&'test str>
 }
 
-fn run_cfail_test_revision(config: &Config,
-                           props: &TestProps,
-                           testpaths: &TestPaths,
-                           revision: Option<&str>) {
-    let proc_res = compile_test(config, props, testpaths);
+struct DebuggerCommands {
+    commands: Vec<String>,
+    check_lines: Vec<String>,
+    breakpoint_lines: Vec<usize>,
+}
 
-    if proc_res.status.success() {
-        fatal_proc_rec(
-            revision,
-            &format!("{} test compiled successfully!", config.mode)[..],
-            &proc_res);
-    }
-
-    check_correct_failure_status(revision, &proc_res);
-
-    if proc_res.status.success() {
-        fatal(revision, "process did not return an error status");
-    }
-
-    let output_to_check = get_output(props, &proc_res);
-    let expected_errors = errors::load_errors(&testpaths.file, revision);
-    if !expected_errors.is_empty() {
-        if !props.error_patterns.is_empty() {
-            fatal(revision, "both error pattern and expected errors specified");
+impl<'test> TestCx<'test> {
+    /// invoked once before any revisions have been processed
+    fn init_all(&self) {
+        assert!(self.revision.is_none(), "init_all invoked for a revision");
+        match self.config.mode {
+            Incremental => self.init_incremental_test(),
+            _ => { }
         }
-        check_expected_errors(revision, expected_errors, testpaths, &proc_res);
-    } else {
-        check_error_patterns(revision, props, testpaths, &output_to_check, &proc_res);
-    }
-    check_no_compiler_crash(revision, &proc_res);
-    check_forbid_output(revision, props, &output_to_check, &proc_res);
-}
-
-fn run_rfail_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    for_each_revision(config, props, testpaths, run_rfail_test_revision);
-}
-
-fn run_rfail_test_revision(config: &Config,
-                           props: &TestProps,
-                           testpaths: &TestPaths,
-                           revision: Option<&str>) {
-    let proc_res = compile_test(config, props, testpaths);
-
-    if !proc_res.status.success() {
-        fatal_proc_rec(revision, "compilation failed!", &proc_res);
     }
 
-    let proc_res = exec_compiled_test(config, props, testpaths);
-
-    // The value our Makefile configures valgrind to return on failure
-    const VALGRIND_ERR: i32 = 100;
-    if proc_res.status.code() == Some(VALGRIND_ERR) {
-        fatal_proc_rec(revision, "run-fail test isn't valgrind-clean!", &proc_res);
+    /// Code executed for each revision in turn (or, if there are no
+    /// revisions, exactly once, with revision == None).
+    fn run_revision(&self) {
+        match self.config.mode {
+            CompileFail => self.run_cfail_test(),
+            ParseFail => self.run_cfail_test(),
+            RunFail => self.run_rfail_test(),
+            RunPass => self.run_rpass_test(),
+            RunPassValgrind => self.run_valgrind_test(),
+            Pretty => self.run_pretty_test(),
+            DebugInfoGdb => self.run_debuginfo_gdb_test(),
+            DebugInfoLldb => self.run_debuginfo_lldb_test(),
+            Codegen => self.run_codegen_test(),
+            Rustdoc => self.run_rustdoc_test(),
+            CodegenUnits => self.run_codegen_units_test(),
+            Incremental => self.run_incremental_test(),
+            RunMake => self.run_rmake_test(),
+        }
     }
 
-    let output_to_check = get_output(props, &proc_res);
-    check_correct_failure_status(revision, &proc_res);
-    check_error_patterns(revision, props, testpaths, &output_to_check, &proc_res);
-}
-
-fn check_correct_failure_status(revision: Option<&str>, proc_res: &ProcRes) {
-    // The value the rust runtime returns on failure
-    const RUST_ERR: i32 = 101;
-    if proc_res.status.code() != Some(RUST_ERR) {
-        fatal_proc_rec(
-            revision,
-            &format!("failure produced the wrong error: {}",
-                     proc_res.status),
-            proc_res);
-    }
-}
-
-fn run_rpass_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    for_each_revision(config, props, testpaths, run_rpass_test_revision);
-}
-
-fn run_rpass_test_revision(config: &Config,
-                           props: &TestProps,
-                           testpaths: &TestPaths,
-                           revision: Option<&str>) {
-    let proc_res = compile_test(config, props, testpaths);
-
-    if !proc_res.status.success() {
-        fatal_proc_rec(revision, "compilation failed!", &proc_res);
+    /// Invoked after all revisions have executed.
+    fn complete_all(&self) {
+        assert!(self.revision.is_none(), "init_all invoked for a revision");
     }
 
-    let proc_res = exec_compiled_test(config, props, testpaths);
+    fn run_cfail_test(&self) {
+        let proc_res = self.compile_test();
 
-    if !proc_res.status.success() {
-        fatal_proc_rec(revision, "test run failed!", &proc_res);
-    }
-}
+        if proc_res.status.success() {
+            self.fatal_proc_rec(
+                &format!("{} test compiled successfully!", self.config.mode)[..],
+                &proc_res);
+        }
 
-fn run_valgrind_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    assert!(props.revisions.is_empty(), "revisions not relevant here");
+        self.check_correct_failure_status(&proc_res);
 
-    if config.valgrind_path.is_none() {
-        assert!(!config.force_valgrind);
-        return run_rpass_test(config, props, testpaths);
+        if proc_res.status.success() {
+            self.fatal("process did not return an error status");
+        }
+
+        let output_to_check = self.get_output(&proc_res);
+        let expected_errors = errors::load_errors(&self.testpaths.file, self.revision);
+        if !expected_errors.is_empty() {
+            if !self.props.error_patterns.is_empty() {
+                self.fatal("both error pattern and expected errors specified");
+            }
+            self.check_expected_errors(expected_errors, &proc_res);
+        } else {
+            self.check_error_patterns(&output_to_check, &proc_res);
+        }
+        self.check_no_compiler_crash(&proc_res);
+        self.check_forbid_output(&output_to_check, &proc_res);
     }
 
-    let mut proc_res = compile_test(config, props, testpaths);
-
-    if !proc_res.status.success() {
-        fatal_proc_rec(None, "compilation failed!", &proc_res);
-    }
-
-    let mut new_config = config.clone();
-    new_config.runtool = new_config.valgrind_path.clone();
-    proc_res = exec_compiled_test(&new_config, props, testpaths);
-
-    if !proc_res.status.success() {
-        fatal_proc_rec(None, "test run failed!", &proc_res);
-    }
-}
-
-fn run_pretty_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    for_each_revision(config, props, testpaths, run_pretty_test_revision);
-}
-
-fn run_pretty_test_revision(config: &Config,
-                            props: &TestProps,
-                            testpaths: &TestPaths,
-                            revision: Option<&str>) {
-    if props.pp_exact.is_some() {
-        logv(config, "testing for exact pretty-printing".to_owned());
-    } else {
-        logv(config, "testing for converging pretty-printing".to_owned());
-    }
-
-    let rounds =
-        match props.pp_exact { Some(_) => 1, None => 2 };
-
-    let mut src = String::new();
-    File::open(&testpaths.file).unwrap().read_to_string(&mut src).unwrap();
-    let mut srcs = vec!(src);
-
-    let mut round = 0;
-    while round < rounds {
-        logv(config, format!("pretty-printing round {} revision {:?}",
-                             round, revision));
-        let proc_res = print_source(config,
-                                    props,
-                                    testpaths,
-                                    srcs[round].to_owned(),
-                                    &props.pretty_mode);
+    fn run_rfail_test(&self) {
+        let proc_res = self.compile_test();
 
         if !proc_res.status.success() {
-            fatal_proc_rec(revision,
-                           &format!("pretty-printing failed in round {} revision {:?}",
-                                    round, revision),
-                           &proc_res);
+            self.fatal_proc_rec("compilation failed!", &proc_res);
         }
 
-        let ProcRes{ stdout, .. } = proc_res;
-        srcs.push(stdout);
-        round += 1;
-    }
+        let proc_res = self.exec_compiled_test();
 
-    let mut expected = match props.pp_exact {
-        Some(ref file) => {
-            let filepath = testpaths.file.parent().unwrap().join(file);
-            let mut s = String::new();
-            File::open(&filepath).unwrap().read_to_string(&mut s).unwrap();
-            s
+        // The value our Makefile configures valgrind to return on failure
+        const VALGRIND_ERR: i32 = 100;
+        if proc_res.status.code() == Some(VALGRIND_ERR) {
+            self.fatal_proc_rec("run-fail test isn't valgrind-clean!", &proc_res);
         }
-        None => { srcs[srcs.len() - 2].clone() }
-    };
-    let mut actual = srcs[srcs.len() - 1].clone();
 
-    if props.pp_exact.is_some() {
-        // Now we have to care about line endings
-        let cr = "\r".to_owned();
-        actual = actual.replace(&cr, "").to_owned();
-        expected = expected.replace(&cr, "").to_owned();
+        let output_to_check = self.get_output(&proc_res);
+        self.check_correct_failure_status(&proc_res);
+        self.check_error_patterns(&output_to_check, &proc_res);
     }
 
-    compare_source(revision, &expected, &actual);
-
-    // If we're only making sure that the output matches then just stop here
-    if props.pretty_compare_only { return; }
-
-    // Finally, let's make sure it actually appears to remain valid code
-    let proc_res = typecheck_source(config, props, testpaths, actual);
-    if !proc_res.status.success() {
-        fatal_proc_rec(revision, "pretty-printed source does not typecheck", &proc_res);
+    fn get_output(&self, proc_res: &ProcRes) -> String {
+        if self.props.check_stdout {
+            format!("{}{}", proc_res.stdout, proc_res.stderr)
+        } else {
+            proc_res.stderr.clone()
+        }
     }
 
-    if !props.pretty_expanded { return }
-
-    // additionally, run `--pretty expanded` and try to build it.
-    let proc_res = print_source(config, props, testpaths, srcs[round].clone(), "expanded");
-    if !proc_res.status.success() {
-        fatal_proc_rec(revision, "pretty-printing (expanded) failed", &proc_res);
+    fn check_correct_failure_status(&self, proc_res: &ProcRes) {
+        // The value the rust runtime returns on failure
+        const RUST_ERR: i32 = 101;
+        if proc_res.status.code() != Some(RUST_ERR) {
+            self.fatal_proc_rec(
+                &format!("failure produced the wrong error: {}",
+                         proc_res.status),
+                proc_res);
+        }
     }
 
-    let ProcRes{ stdout: expanded_src, .. } = proc_res;
-    let proc_res = typecheck_source(config, props, testpaths, expanded_src);
-    if !proc_res.status.success() {
-        fatal_proc_rec(
-            revision,
-            "pretty-printed source (expanded) does not typecheck",
-            &proc_res);
+    fn run_rpass_test(&self) {
+        let proc_res = self.compile_test();
+
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("compilation failed!", &proc_res);
+        }
+
+        let proc_res = self.exec_compiled_test();
+
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("test run failed!", &proc_res);
+        }
     }
 
-    return;
+    fn run_valgrind_test(&self) {
+        assert!(self.revision.is_none(), "revisions not relevant here");
 
-    fn print_source(config: &Config,
-                    props: &TestProps,
-                    testpaths: &TestPaths,
+        if self.config.valgrind_path.is_none() {
+            assert!(!self.config.force_valgrind);
+            return self.run_rpass_test();
+        }
+
+        let mut proc_res = self.compile_test();
+
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("compilation failed!", &proc_res);
+        }
+
+        let mut new_config = self.config.clone();
+        new_config.runtool = new_config.valgrind_path.clone();
+        let new_cx = TestCx { config: &new_config, ..*self };
+        proc_res = new_cx.exec_compiled_test();
+
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("test run failed!", &proc_res);
+        }
+    }
+
+    fn run_pretty_test(&self) {
+        if self.props.pp_exact.is_some() {
+            logv(self.config, "testing for exact pretty-printing".to_owned());
+        } else {
+            logv(self.config, "testing for converging pretty-printing".to_owned());
+        }
+
+        let rounds = match self.props.pp_exact { Some(_) => 1, None => 2 };
+
+        let mut src = String::new();
+        File::open(&self.testpaths.file).unwrap().read_to_string(&mut src).unwrap();
+        let mut srcs = vec!(src);
+
+        let mut round = 0;
+        while round < rounds {
+            logv(self.config, format!("pretty-printing round {} revision {:?}",
+                                      round, self.revision));
+            let proc_res = self.print_source(srcs[round].to_owned(), &self.props.pretty_mode);
+
+            if !proc_res.status.success() {
+                self.fatal_proc_rec(&format!("pretty-printing failed in round {} revision {:?}",
+                                             round, self.revision),
+                                    &proc_res);
+            }
+
+            let ProcRes{ stdout, .. } = proc_res;
+            srcs.push(stdout);
+            round += 1;
+        }
+
+        let mut expected = match self.props.pp_exact {
+            Some(ref file) => {
+                let filepath = self.testpaths.file.parent().unwrap().join(file);
+                let mut s = String::new();
+                File::open(&filepath).unwrap().read_to_string(&mut s).unwrap();
+                s
+            }
+            None => { srcs[srcs.len() - 2].clone() }
+        };
+        let mut actual = srcs[srcs.len() - 1].clone();
+
+        if self.props.pp_exact.is_some() {
+            // Now we have to care about line endings
+            let cr = "\r".to_owned();
+            actual = actual.replace(&cr, "").to_owned();
+            expected = expected.replace(&cr, "").to_owned();
+        }
+
+        self.compare_source(&expected, &actual);
+
+        // If we're only making sure that the output matches then just stop here
+        if self.props.pretty_compare_only { return; }
+
+        // Finally, let's make sure it actually appears to remain valid code
+        let proc_res = self.typecheck_source(actual);
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("pretty-printed source does not typecheck", &proc_res);
+        }
+
+        if !self.props.pretty_expanded { return }
+
+        // additionally, run `--pretty expanded` and try to build it.
+        let proc_res = self.print_source(srcs[round].clone(), "expanded");
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("pretty-printing (expanded) failed", &proc_res);
+        }
+
+        let ProcRes{ stdout: expanded_src, .. } = proc_res;
+        let proc_res = self.typecheck_source(expanded_src);
+        if !proc_res.status.success() {
+            self.fatal_proc_rec(
+                "pretty-printed source (expanded) does not typecheck",
+                &proc_res);
+        }
+    }
+
+    fn print_source(&self,
                     src: String,
-                    pretty_type: &str) -> ProcRes {
-        let aux_dir = aux_output_dir_name(config, testpaths);
-        compose_and_run(config,
-                        testpaths,
-                        make_pp_args(config,
-                                     props,
-                                     testpaths,
-                                     pretty_type.to_owned()),
-                        props.exec_env.clone(),
-                        config.compile_lib_path.to_str().unwrap(),
-                        Some(aux_dir.to_str().unwrap()),
-                        Some(src))
+                    pretty_type: &str)
+                    -> ProcRes {
+        let aux_dir = self.aux_output_dir_name();
+        self.compose_and_run(self.make_pp_args(pretty_type.to_owned()),
+                             self.props.exec_env.clone(),
+                             self.config.compile_lib_path.to_str().unwrap(),
+                             Some(aux_dir.to_str().unwrap()),
+                             Some(src))
     }
 
-    fn make_pp_args(config: &Config,
-                    props: &TestProps,
-                    testpaths: &TestPaths,
-                    pretty_type: String) -> ProcArgs {
-        let aux_dir = aux_output_dir_name(config, testpaths);
+    fn make_pp_args(&self,
+                    pretty_type: String)
+                    -> ProcArgs {
+        let aux_dir = self.aux_output_dir_name();
         // FIXME (#9639): This needs to handle non-utf8 paths
         let mut args = vec!("-".to_owned(),
                             "-Zunstable-options".to_owned(),
                             "--unpretty".to_owned(),
                             pretty_type,
-                            format!("--target={}", config.target),
+                            format!("--target={}", self.config.target),
                             "-L".to_owned(),
                             aux_dir.to_str().unwrap().to_owned());
-        args.extend(split_maybe_args(&config.target_rustcflags));
-        args.extend(props.compile_flags.iter().cloned());
+        args.extend(self.split_maybe_args(&self.config.target_rustcflags));
+        args.extend(self.props.compile_flags.iter().cloned());
         return ProcArgs {
-            prog: config.rustc_path.to_str().unwrap().to_owned(),
+            prog: self.config.rustc_path.to_str().unwrap().to_owned(),
             args: args,
         };
     }
 
-    fn compare_source(revision: Option<&str>, expected: &str, actual: &str) {
+    fn compare_source(&self,
+                      expected: &str,
+                      actual: &str) {
         if expected != actual {
-            error(revision, "pretty-printed source does not match expected source");
+            self.error("pretty-printed source does not match expected source");
             println!("\n\
 expected:\n\
 ------------------------------------------\n\
@@ -362,749 +360,1728 @@ actual:\n\
         }
     }
 
-    fn typecheck_source(config: &Config, props: &TestProps,
-                        testpaths: &TestPaths, src: String) -> ProcRes {
-        let args = make_typecheck_args(config, props, testpaths);
-        compose_and_run_compiler(config, props, testpaths, args, Some(src))
+    fn typecheck_source(&self, src: String) -> ProcRes {
+        let args = self.make_typecheck_args();
+        self.compose_and_run_compiler(args, Some(src))
     }
 
-    fn make_typecheck_args(config: &Config, props: &TestProps, testpaths: &TestPaths) -> ProcArgs {
-        let aux_dir = aux_output_dir_name(config, testpaths);
-        let target = if props.force_host {
-            &*config.host
+    fn make_typecheck_args(&self) -> ProcArgs {
+        let aux_dir = self.aux_output_dir_name();
+        let target = if self.props.force_host {
+            &*self.config.host
         } else {
-            &*config.target
+            &*self.config.target
         };
         // FIXME (#9639): This needs to handle non-utf8 paths
         let mut args = vec!("-".to_owned(),
                             "-Zno-trans".to_owned(),
                             format!("--target={}", target),
                             "-L".to_owned(),
-                            config.build_base.to_str().unwrap().to_owned(),
+                            self.config.build_base.to_str().unwrap().to_owned(),
                             "-L".to_owned(),
                             aux_dir.to_str().unwrap().to_owned());
-        args.extend(split_maybe_args(&config.target_rustcflags));
-        args.extend(props.compile_flags.iter().cloned());
+        args.extend(self.split_maybe_args(&self.config.target_rustcflags));
+        args.extend(self.props.compile_flags.iter().cloned());
         // FIXME (#9639): This needs to handle non-utf8 paths
         return ProcArgs {
-            prog: config.rustc_path.to_str().unwrap().to_owned(),
+            prog: self.config.rustc_path.to_str().unwrap().to_owned(),
             args: args,
         };
     }
-}
 
-fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    assert!(props.revisions.is_empty(), "revisions not relevant here");
+    fn run_debuginfo_gdb_test(&self) {
+        assert!(self.revision.is_none(), "revisions not relevant here");
 
-    let mut config = Config {
-        target_rustcflags: cleanup_debug_info_options(&config.target_rustcflags),
-        host_rustcflags: cleanup_debug_info_options(&config.host_rustcflags),
-        .. config.clone()
-    };
+        let config = Config {
+            target_rustcflags: self.cleanup_debug_info_options(&self.config.target_rustcflags),
+            host_rustcflags: self.cleanup_debug_info_options(&self.config.host_rustcflags),
+            .. self.config.clone()
+        };
 
-    let config = &mut config;
-    let DebuggerCommands {
-        commands,
-        check_lines,
-        breakpoint_lines
-    } = parse_debugger_commands(testpaths, "gdb");
-    let mut cmds = commands.join("\n");
+        let test_cx = TestCx {
+            config: &config,
+            ..*self
+        };
 
-    // compile test file (it should have 'compile-flags:-g' in the header)
-    let compiler_run_result = compile_test(config, props, testpaths);
-    if !compiler_run_result.status.success() {
-        fatal_proc_rec(None, "compilation failed!", &compiler_run_result);
+        test_cx.run_debuginfo_gdb_test_no_opt();
     }
 
-    let exe_file = make_exe_name(config, testpaths);
+    fn run_debuginfo_gdb_test_no_opt(&self) {
+        let DebuggerCommands {
+            commands,
+            check_lines,
+            breakpoint_lines
+        } = self.parse_debugger_commands("gdb");
+        let mut cmds = commands.join("\n");
 
-    let debugger_run_result;
-    match &*config.target {
-        "arm-linux-androideabi" | "aarch64-linux-android" => {
-
-            cmds = cmds.replace("run", "continue");
-
-            // write debugger script
-            let mut script_str = String::with_capacity(2048);
-            script_str.push_str(&format!("set charset {}\n", charset()));
-            script_str.push_str(&format!("file {}\n", exe_file.to_str().unwrap()));
-            script_str.push_str("target remote :5039\n");
-            script_str.push_str(&format!("set solib-search-path \
-                                         ./{}/stage2/lib/rustlib/{}/lib/\n",
-                                         config.host, config.target));
-            for line in &breakpoint_lines {
-                script_str.push_str(&format!("break {:?}:{}\n",
-                                             testpaths.file
-                                                      .file_name()
-                                                      .unwrap()
-                                                      .to_string_lossy(),
-                                             *line)[..]);
-            }
-            script_str.push_str(&cmds);
-            script_str.push_str("\nquit\n");
-
-            debug!("script_str = {}", script_str);
-            dump_output_file(config,
-                             testpaths,
-                             &script_str,
-                             "debugger.script");
-
-
-            procsrv::run("",
-                         &config.adb_path,
-                         None,
-                         &[
-                            "push".to_owned(),
-                            exe_file.to_str().unwrap().to_owned(),
-                            config.adb_test_dir.clone()
-                         ],
-                         vec!(("".to_owned(), "".to_owned())),
-                         Some("".to_owned()))
-                .expect(&format!("failed to exec `{:?}`", config.adb_path));
-
-            procsrv::run("",
-                         &config.adb_path,
-                         None,
-                         &[
-                            "forward".to_owned(),
-                            "tcp:5039".to_owned(),
-                            "tcp:5039".to_owned()
-                         ],
-                         vec!(("".to_owned(), "".to_owned())),
-                         Some("".to_owned()))
-                .expect(&format!("failed to exec `{:?}`", config.adb_path));
-
-            let adb_arg = format!("export LD_LIBRARY_PATH={}; \
-                                   gdbserver{} :5039 {}/{}",
-                                  config.adb_test_dir.clone(),
-                                  if config.target.contains("aarch64")
-                                  {"64"} else {""},
-                                  config.adb_test_dir.clone(),
-                                  exe_file.file_name().unwrap().to_str()
-                                          .unwrap());
-
-            let mut process = procsrv::run_background("",
-                                                      &config.adb_path
-                                                            ,
-                                                      None,
-                                                      &[
-                                                        "shell".to_owned(),
-                                                        adb_arg.clone()
-                                                      ],
-                                                      vec!(("".to_owned(),
-                                                            "".to_owned())),
-                                                      Some("".to_owned()))
-                .expect(&format!("failed to exec `{:?}`", config.adb_path));
-            loop {
-                //waiting 1 second for gdbserver start
-                ::std::thread::sleep(::std::time::Duration::new(1,0));
-                if TcpStream::connect("127.0.0.1:5039").is_ok() {
-                    break
-                }
-            }
-
-            let tool_path = match config.android_cross_path.to_str() {
-                Some(x) => x.to_owned(),
-                None => fatal(None, "cannot find android cross path")
-            };
-
-            let debugger_script = make_out_name(config, testpaths, "debugger.script");
-            // FIXME (#9639): This needs to handle non-utf8 paths
-            let debugger_opts =
-                vec!("-quiet".to_owned(),
-                     "-batch".to_owned(),
-                     "-nx".to_owned(),
-                     format!("-command={}", debugger_script.to_str().unwrap()));
-
-            let mut gdb_path = tool_path;
-            gdb_path.push_str(&format!("/bin/{}-gdb", config.target));
-            let procsrv::Result {
-                out,
-                err,
-                status
-            } = procsrv::run("",
-                             &gdb_path,
-                             None,
-                             &debugger_opts,
-                             vec!(("".to_owned(), "".to_owned())),
-                             None)
-                .expect(&format!("failed to exec `{:?}`", gdb_path));
-            let cmdline = {
-                let cmdline = make_cmdline("",
-                                           &format!("{}-gdb", config.target),
-                                           &debugger_opts);
-                logv(config, format!("executing {}", cmdline));
-                cmdline
-            };
-
-            debugger_run_result = ProcRes {
-                status: Status::Normal(status),
-                stdout: out,
-                stderr: err,
-                cmdline: cmdline
-            };
-            if process.kill().is_err() {
-                println!("Adb process is already finished.");
-            }
+        // compile test file (it should have 'compile-flags:-g' in the header)
+        let compiler_run_result = self.compile_test();
+        if !compiler_run_result.status.success() {
+            self.fatal_proc_rec("compilation failed!", &compiler_run_result);
         }
 
-        _=> {
-            let rust_src_root = find_rust_src_root(config)
-                .expect("Could not find Rust source root");
-            let rust_pp_module_rel_path = Path::new("./src/etc");
-            let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path)
-                                                       .to_str()
-                                                       .unwrap()
-                                                       .to_owned();
-            // write debugger script
-            let mut script_str = String::with_capacity(2048);
-            script_str.push_str(&format!("set charset {}\n", charset()));
-            script_str.push_str("show version\n");
+        let exe_file = self.make_exe_name();
 
-            match config.gdb_version {
-                Some(ref version) => {
-                    println!("NOTE: compiletest thinks it is using GDB version {}",
-                             version);
+        let debugger_run_result;
+        match &*self.config.target {
+            "arm-linux-androideabi" | "aarch64-linux-android" => {
 
-                    if header::gdb_version_to_int(version) >
-                        header::gdb_version_to_int("7.4") {
-                        // Add the directory containing the pretty printers to
-                        // GDB's script auto loading safe path
-                        script_str.push_str(
-                            &format!("add-auto-load-safe-path {}\n",
-                                     rust_pp_module_abs_path.replace(r"\", r"\\"))
-                                );
+                cmds = cmds.replace("run", "continue");
+
+                // write debugger script
+                let mut script_str = String::with_capacity(2048);
+                script_str.push_str(&format!("set charset {}\n", Self::charset()));
+                script_str.push_str(&format!("file {}\n", exe_file.to_str().unwrap()));
+                script_str.push_str("target remote :5039\n");
+                script_str.push_str(&format!("set solib-search-path \
+                                              ./{}/stage2/lib/rustlib/{}/lib/\n",
+                                             self.config.host, self.config.target));
+                for line in &breakpoint_lines {
+                    script_str.push_str(&format!("break {:?}:{}\n",
+                                                 self.testpaths.file.file_name()
+                                                 .unwrap()
+                                                 .to_string_lossy(),
+                                                 *line)[..]);
+                }
+                script_str.push_str(&cmds);
+                script_str.push_str("\nquit\n");
+
+                debug!("script_str = {}", script_str);
+                self.dump_output_file(&script_str, "debugger.script");
+
+
+                procsrv::run("",
+                             &self.config.adb_path,
+                             None,
+                             &[
+                                 "push".to_owned(),
+                                 exe_file.to_str().unwrap().to_owned(),
+                                 self.config.adb_test_dir.clone()
+                             ],
+                             vec!(("".to_owned(), "".to_owned())),
+                             Some("".to_owned()))
+                    .expect(&format!("failed to exec `{:?}`", self.config.adb_path));
+
+                procsrv::run("",
+                             &self.config.adb_path,
+                             None,
+                             &[
+                                 "forward".to_owned(),
+                                 "tcp:5039".to_owned(),
+                                 "tcp:5039".to_owned()
+                             ],
+                             vec!(("".to_owned(), "".to_owned())),
+                             Some("".to_owned()))
+                    .expect(&format!("failed to exec `{:?}`", self.config.adb_path));
+
+                let adb_arg = format!("export LD_LIBRARY_PATH={}; \
+                                       gdbserver{} :5039 {}/{}",
+                                      self.config.adb_test_dir.clone(),
+                                      if self.config.target.contains("aarch64")
+                                      {"64"} else {""},
+                                      self.config.adb_test_dir.clone(),
+                                      exe_file.file_name().unwrap().to_str()
+                                      .unwrap());
+
+                let mut process = procsrv::run_background("",
+                                                          &self.config.adb_path
+                                                          ,
+                                                          None,
+                                                          &[
+                                                              "shell".to_owned(),
+                                                              adb_arg.clone()
+                                                          ],
+                                                          vec!(("".to_owned(),
+                                                                "".to_owned())),
+                                                          Some("".to_owned()))
+                    .expect(&format!("failed to exec `{:?}`", self.config.adb_path));
+                loop {
+                    //waiting 1 second for gdbserver start
+                    ::std::thread::sleep(::std::time::Duration::new(1,0));
+                    if TcpStream::connect("127.0.0.1:5039").is_ok() {
+                        break
                     }
                 }
-                _ => {
-                    println!("NOTE: compiletest does not know which version of \
-                              GDB it is using");
+
+                let tool_path = match self.config.android_cross_path.to_str() {
+                    Some(x) => x.to_owned(),
+                    None => self.fatal("cannot find android cross path")
+                };
+
+                let debugger_script = self.make_out_name("debugger.script");
+                // FIXME (#9639): This needs to handle non-utf8 paths
+                let debugger_opts =
+                    vec!("-quiet".to_owned(),
+                         "-batch".to_owned(),
+                         "-nx".to_owned(),
+                         format!("-command={}", debugger_script.to_str().unwrap()));
+
+                let mut gdb_path = tool_path;
+                gdb_path.push_str(&format!("/bin/{}-gdb", self.config.target));
+                let procsrv::Result {
+                    out,
+                    err,
+                    status
+                } = procsrv::run("",
+                                 &gdb_path,
+                                 None,
+                                 &debugger_opts,
+                                 vec!(("".to_owned(), "".to_owned())),
+                                 None)
+                    .expect(&format!("failed to exec `{:?}`", gdb_path));
+                let cmdline = {
+                    let cmdline = self.make_cmdline("",
+                                                    &format!("{}-gdb", self.config.target),
+                                                    &debugger_opts);
+                    logv(self.config, format!("executing {}", cmdline));
+                    cmdline
+                };
+
+                debugger_run_result = ProcRes {
+                    status: Status::Normal(status),
+                    stdout: out,
+                    stderr: err,
+                    cmdline: cmdline
+                };
+                if process.kill().is_err() {
+                    println!("Adb process is already finished.");
                 }
             }
 
-            // The following line actually doesn't have to do anything with
-            // pretty printing, it just tells GDB to print values on one line:
-            script_str.push_str("set print pretty off\n");
+            _=> {
+                let rust_src_root = self.find_rust_src_root()
+                                        .expect("Could not find Rust source root");
+                let rust_pp_module_rel_path = Path::new("./src/etc");
+                let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path)
+                                                           .to_str()
+                                                           .unwrap()
+                                                           .to_owned();
+                // write debugger script
+                let mut script_str = String::with_capacity(2048);
+                script_str.push_str(&format!("set charset {}\n", Self::charset()));
+                script_str.push_str("show version\n");
 
-            // Add the pretty printer directory to GDB's source-file search path
-            script_str.push_str(&format!("directory {}\n",
-                                         rust_pp_module_abs_path));
+                match self.config.gdb_version {
+                    Some(ref version) => {
+                        println!("NOTE: compiletest thinks it is using GDB version {}",
+                                 version);
 
-            // Load the target executable
-            script_str.push_str(&format!("file {}\n",
-                                         exe_file.to_str().unwrap()
-                                                 .replace(r"\", r"\\")));
+                        if header::gdb_version_to_int(version) >
+                            header::gdb_version_to_int("7.4") {
+                                // Add the directory containing the pretty printers to
+                                // GDB's script auto loading safe path
+                                script_str.push_str(
+                                    &format!("add-auto-load-safe-path {}\n",
+                                             rust_pp_module_abs_path.replace(r"\", r"\\"))
+                                );
+                            }
+                    }
+                    _ => {
+                        println!("NOTE: compiletest does not know which version of \
+                                  GDB it is using");
+                    }
+                }
 
-            // Add line breakpoints
-            for line in &breakpoint_lines {
-                script_str.push_str(&format!("break '{}':{}\n",
-                                             testpaths.file.file_name().unwrap()
-                                                     .to_string_lossy(),
-                                             *line));
+                // The following line actually doesn't have to do anything with
+                // pretty printing, it just tells GDB to print values on one line:
+                script_str.push_str("set print pretty off\n");
+
+                // Add the pretty printer directory to GDB's source-file search path
+                script_str.push_str(&format!("directory {}\n",
+                                             rust_pp_module_abs_path));
+
+                // Load the target executable
+                script_str.push_str(&format!("file {}\n",
+                                             exe_file.to_str().unwrap()
+                                             .replace(r"\", r"\\")));
+
+                // Add line breakpoints
+                for line in &breakpoint_lines {
+                    script_str.push_str(&format!("break '{}':{}\n",
+                                                 self.testpaths.file.file_name().unwrap()
+                                                 .to_string_lossy(),
+                                                 *line));
+                }
+
+                script_str.push_str(&cmds);
+                script_str.push_str("\nquit\n");
+
+                debug!("script_str = {}", script_str);
+                self.dump_output_file(&script_str, "debugger.script");
+
+                // run debugger script with gdb
+                fn debugger() -> &'static str {
+                    if cfg!(windows) {"gdb.exe"} else {"gdb"}
+                }
+
+                let debugger_script = self.make_out_name("debugger.script");
+
+                // FIXME (#9639): This needs to handle non-utf8 paths
+                let debugger_opts =
+                    vec!("-quiet".to_owned(),
+                         "-batch".to_owned(),
+                         "-nx".to_owned(),
+                         format!("-command={}", debugger_script.to_str().unwrap()));
+
+                let proc_args = ProcArgs {
+                    prog: debugger().to_owned(),
+                    args: debugger_opts,
+                };
+
+                let environment = vec![("PYTHONPATH".to_owned(), rust_pp_module_abs_path)];
+
+                debugger_run_result =
+                    self.compose_and_run(proc_args,
+                                         environment,
+                                         self.config.run_lib_path.to_str().unwrap(),
+                                         None,
+                                         None);
             }
+        }
 
-            script_str.push_str(&cmds);
-            script_str.push_str("\nquit\n");
+        if !debugger_run_result.status.success() {
+            self.fatal("gdb failed to execute");
+        }
 
-            debug!("script_str = {}", script_str);
-            dump_output_file(config,
-                             testpaths,
-                             &script_str,
-                             "debugger.script");
+        self.check_debugger_output(&debugger_run_result, &check_lines);
+    }
 
-            // run debugger script with gdb
-            fn debugger() -> &'static str {
-                if cfg!(windows) {"gdb.exe"} else {"gdb"}
+    fn find_rust_src_root(&self) -> Option<PathBuf> {
+        let mut path = self.config.src_base.clone();
+        let path_postfix = Path::new("src/etc/lldb_batchmode.py");
+
+        while path.pop() {
+            if path.join(&path_postfix).is_file() {
+                return Some(path);
             }
-
-            let debugger_script = make_out_name(config, testpaths, "debugger.script");
-
-            // FIXME (#9639): This needs to handle non-utf8 paths
-            let debugger_opts =
-                vec!("-quiet".to_owned(),
-                     "-batch".to_owned(),
-                     "-nx".to_owned(),
-                     format!("-command={}", debugger_script.to_str().unwrap()));
-
-            let proc_args = ProcArgs {
-                prog: debugger().to_owned(),
-                args: debugger_opts,
-            };
-
-            let environment = vec![("PYTHONPATH".to_owned(), rust_pp_module_abs_path)];
-
-            debugger_run_result = compose_and_run(config,
-                                                  testpaths,
-                                                  proc_args,
-                                                  environment,
-                                                  config.run_lib_path.to_str().unwrap(),
-                                                  None,
-                                                  None);
         }
+
+        return None;
     }
 
-    if !debugger_run_result.status.success() {
-        fatal(None, "gdb failed to execute");
-    }
+    fn run_debuginfo_lldb_test(&self) {
+        assert!(self.revision.is_none(), "revisions not relevant here");
 
-    check_debugger_output(&debugger_run_result, &check_lines);
-}
-
-fn find_rust_src_root(config: &Config) -> Option<PathBuf> {
-    let mut path = config.src_base.clone();
-    let path_postfix = Path::new("src/etc/lldb_batchmode.py");
-
-    while path.pop() {
-        if path.join(&path_postfix).is_file() {
-            return Some(path);
+        if self.config.lldb_python_dir.is_none() {
+            self.fatal("Can't run LLDB test because LLDB's python path is not set.");
         }
+
+        let config = Config {
+            target_rustcflags: self.cleanup_debug_info_options(&self.config.target_rustcflags),
+            host_rustcflags: self.cleanup_debug_info_options(&self.config.host_rustcflags),
+            .. self.config.clone()
+        };
+
+
+        let test_cx = TestCx {
+            config: &config,
+            ..*self
+        };
+
+        test_cx.run_debuginfo_lldb_test_no_opt();
     }
 
-    return None;
-}
-
-fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    assert!(props.revisions.is_empty(), "revisions not relevant here");
-
-    if config.lldb_python_dir.is_none() {
-        fatal(None, "Can't run LLDB test because LLDB's python path is not set.");
-    }
-
-    let mut config = Config {
-        target_rustcflags: cleanup_debug_info_options(&config.target_rustcflags),
-        host_rustcflags: cleanup_debug_info_options(&config.host_rustcflags),
-        .. config.clone()
-    };
-
-    let config = &mut config;
-
-    // compile test file (it should have 'compile-flags:-g' in the header)
-    let compile_result = compile_test(config, props, testpaths);
-    if !compile_result.status.success() {
-        fatal_proc_rec(None, "compilation failed!", &compile_result);
-    }
-
-    let exe_file = make_exe_name(config, testpaths);
-
-    match config.lldb_version {
-        Some(ref version) => {
-            println!("NOTE: compiletest thinks it is using LLDB version {}",
-                     version);
+    fn run_debuginfo_lldb_test_no_opt(&self) {
+        // compile test file (it should have 'compile-flags:-g' in the header)
+        let compile_result = self.compile_test();
+        if !compile_result.status.success() {
+            self.fatal_proc_rec("compilation failed!", &compile_result);
         }
-        _ => {
-            println!("NOTE: compiletest does not know which version of \
-                      LLDB it is using");
+
+        let exe_file = self.make_exe_name();
+
+        match self.config.lldb_version {
+            Some(ref version) => {
+                println!("NOTE: compiletest thinks it is using LLDB version {}",
+                         version);
+            }
+            _ => {
+                println!("NOTE: compiletest does not know which version of \
+                          LLDB it is using");
+            }
         }
+
+        // Parse debugger commands etc from test files
+        let DebuggerCommands {
+            commands,
+            check_lines,
+            breakpoint_lines,
+            ..
+        } = self.parse_debugger_commands("lldb");
+
+        // Write debugger script:
+        // We don't want to hang when calling `quit` while the process is still running
+        let mut script_str = String::from("settings set auto-confirm true\n");
+
+        // Make LLDB emit its version, so we have it documented in the test output
+        script_str.push_str("version\n");
+
+        // Switch LLDB into "Rust mode"
+        let rust_src_root = self.find_rust_src_root().expect("Could not find Rust source root");
+        let rust_pp_module_rel_path = Path::new("./src/etc/lldb_rust_formatters.py");
+        let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path)
+                                                   .to_str()
+                                                   .unwrap()
+                                                   .to_owned();
+
+        script_str.push_str(&format!("command script import {}\n",
+                                     &rust_pp_module_abs_path[..])[..]);
+        script_str.push_str("type summary add --no-value ");
+        script_str.push_str("--python-function lldb_rust_formatters.print_val ");
+        script_str.push_str("-x \".*\" --category Rust\n");
+        script_str.push_str("type category enable Rust\n");
+
+        // Set breakpoints on every line that contains the string "#break"
+        let source_file_name = self.testpaths.file.file_name().unwrap().to_string_lossy();
+        for line in &breakpoint_lines {
+            script_str.push_str(&format!("breakpoint set --file '{}' --line {}\n",
+                                         source_file_name,
+                                         line));
+        }
+
+        // Append the other commands
+        for line in &commands {
+            script_str.push_str(line);
+            script_str.push_str("\n");
+        }
+
+        // Finally, quit the debugger
+        script_str.push_str("\nquit\n");
+
+        // Write the script into a file
+        debug!("script_str = {}", script_str);
+        self.dump_output_file(&script_str, "debugger.script");
+        let debugger_script = self.make_out_name("debugger.script");
+
+        // Let LLDB execute the script via lldb_batchmode.py
+        let debugger_run_result = self.run_lldb(&exe_file,
+                                                &debugger_script,
+                                                &rust_src_root);
+
+        if !debugger_run_result.status.success() {
+            self.fatal_proc_rec("Error while running LLDB", &debugger_run_result);
+        }
+
+        self.check_debugger_output(&debugger_run_result, &check_lines);
     }
 
-    // Parse debugger commands etc from test files
-    let DebuggerCommands {
-        commands,
-        check_lines,
-        breakpoint_lines,
-        ..
-    } = parse_debugger_commands(testpaths, "lldb");
-
-    // Write debugger script:
-    // We don't want to hang when calling `quit` while the process is still running
-    let mut script_str = String::from("settings set auto-confirm true\n");
-
-    // Make LLDB emit its version, so we have it documented in the test output
-    script_str.push_str("version\n");
-
-    // Switch LLDB into "Rust mode"
-    let rust_src_root = find_rust_src_root(config)
-        .expect("Could not find Rust source root");
-    let rust_pp_module_rel_path = Path::new("./src/etc/lldb_rust_formatters.py");
-    let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path)
-                                               .to_str()
-                                               .unwrap()
-                                               .to_owned();
-
-    script_str.push_str(&format!("command script import {}\n",
-                                 &rust_pp_module_abs_path[..])[..]);
-    script_str.push_str("type summary add --no-value ");
-    script_str.push_str("--python-function lldb_rust_formatters.print_val ");
-    script_str.push_str("-x \".*\" --category Rust\n");
-    script_str.push_str("type category enable Rust\n");
-
-    // Set breakpoints on every line that contains the string "#break"
-    let source_file_name = testpaths.file.file_name().unwrap().to_string_lossy();
-    for line in &breakpoint_lines {
-        script_str.push_str(&format!("breakpoint set --file '{}' --line {}\n",
-                                     source_file_name,
-                                     line));
-    }
-
-    // Append the other commands
-    for line in &commands {
-        script_str.push_str(line);
-        script_str.push_str("\n");
-    }
-
-    // Finally, quit the debugger
-    script_str.push_str("\nquit\n");
-
-    // Write the script into a file
-    debug!("script_str = {}", script_str);
-    dump_output_file(config,
-                     testpaths,
-                     &script_str,
-                     "debugger.script");
-    let debugger_script = make_out_name(config, testpaths, "debugger.script");
-
-    // Let LLDB execute the script via lldb_batchmode.py
-    let debugger_run_result = run_lldb(config,
-                                       testpaths,
-                                       &exe_file,
-                                       &debugger_script,
-                                       &rust_src_root);
-
-    if !debugger_run_result.status.success() {
-        fatal_proc_rec(None, "Error while running LLDB", &debugger_run_result);
-    }
-
-    check_debugger_output(&debugger_run_result, &check_lines);
-
-    fn run_lldb(config: &Config,
-                testpaths: &TestPaths,
+    fn run_lldb(&self,
                 test_executable: &Path,
                 debugger_script: &Path,
                 rust_src_root: &Path)
                 -> ProcRes {
         // Prepare the lldb_batchmode which executes the debugger script
         let lldb_script_path = rust_src_root.join("src/etc/lldb_batchmode.py");
-        cmd2procres(config,
-                    testpaths,
-                    Command::new(&config.lldb_python)
-                            .arg(&lldb_script_path)
-                            .arg(test_executable)
-                            .arg(debugger_script)
-                            .env("PYTHONPATH",
-                                 config.lldb_python_dir.as_ref().unwrap()))
+        self.cmd2procres(Command::new(&self.config.lldb_python)
+                         .arg(&lldb_script_path)
+                         .arg(test_executable)
+                         .arg(debugger_script)
+                         .env("PYTHONPATH",
+                              self.config.lldb_python_dir.as_ref().unwrap()))
     }
-}
 
-fn cmd2procres(config: &Config, testpaths: &TestPaths, cmd: &mut Command)
-              -> ProcRes {
-    let (status, out, err) = match cmd.output() {
-        Ok(Output { status, stdout, stderr }) => {
-            (status,
-             String::from_utf8(stdout).unwrap(),
-             String::from_utf8(stderr).unwrap())
-        },
-        Err(e) => {
-            fatal(None, &format!("Failed to setup Python process for \
-                            LLDB script: {}", e))
-        }
-    };
-
-    dump_output(config, testpaths, &out, &err);
-    ProcRes {
-        status: Status::Normal(status),
-        stdout: out,
-        stderr: err,
-        cmdline: format!("{:?}", cmd)
-    }
-}
-
-struct DebuggerCommands {
-    commands: Vec<String>,
-    check_lines: Vec<String>,
-    breakpoint_lines: Vec<usize>,
-}
-
-fn parse_debugger_commands(testpaths: &TestPaths, debugger_prefix: &str)
-                           -> DebuggerCommands {
-    let command_directive = format!("{}-command", debugger_prefix);
-    let check_directive = format!("{}-check", debugger_prefix);
-
-    let mut breakpoint_lines = vec!();
-    let mut commands = vec!();
-    let mut check_lines = vec!();
-    let mut counter = 1;
-    let reader = BufReader::new(File::open(&testpaths.file).unwrap());
-    for line in reader.lines() {
-        match line {
-            Ok(line) => {
-                if line.contains("#break") {
-                    breakpoint_lines.push(counter);
-                }
-
-                header::parse_name_value_directive(
-                        &line,
-                        &command_directive).map(|cmd| {
-                    commands.push(cmd)
-                });
-
-                header::parse_name_value_directive(
-                        &line,
-                        &check_directive).map(|cmd| {
-                    check_lines.push(cmd)
-                });
-            }
+    fn cmd2procres(&self, cmd: &mut Command) -> ProcRes {
+        let (status, out, err) = match cmd.output() {
+            Ok(Output { status, stdout, stderr }) => {
+                (status,
+                 String::from_utf8(stdout).unwrap(),
+                 String::from_utf8(stderr).unwrap())
+            },
             Err(e) => {
-                fatal(None, &format!("Error while parsing debugger commands: {}", e))
+                self.fatal(&format!("Failed to setup Python process for \
+                                      LLDB script: {}", e))
             }
-        }
-        counter += 1;
-    }
-
-    DebuggerCommands {
-        commands: commands,
-        check_lines: check_lines,
-        breakpoint_lines: breakpoint_lines,
-    }
-}
-
-fn cleanup_debug_info_options(options: &Option<String>) -> Option<String> {
-    if options.is_none() {
-        return None;
-    }
-
-    // Remove options that are either unwanted (-O) or may lead to duplicates due to RUSTFLAGS.
-    let options_to_remove = [
-        "-O".to_owned(),
-        "-g".to_owned(),
-        "--debuginfo".to_owned()
-    ];
-    let new_options =
-        split_maybe_args(options).into_iter()
-                                 .filter(|x| !options_to_remove.contains(x))
-                                 .collect::<Vec<String>>();
-
-    Some(new_options.join(" "))
-}
-
-fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String]) {
-    let num_check_lines = check_lines.len();
-
-    let mut check_line_index = 0;
-    for line in debugger_run_result.stdout.lines() {
-        if check_line_index >= num_check_lines {
-            break;
-        }
-
-        if check_single_line(line, &(check_lines[check_line_index])[..]) {
-            check_line_index += 1;
-        }
-    }
-    if check_line_index != num_check_lines && num_check_lines > 0 {
-        fatal_proc_rec(None, &format!("line not found in debugger output: {}",
-                                check_lines[check_line_index]),
-                      debugger_run_result);
-    }
-
-    fn check_single_line(line: &str, check_line: &str) -> bool {
-        // Allow check lines to leave parts unspecified (e.g., uninitialized
-        // bits in the  wrong case of an enum) with the notation "[...]".
-        let line = line.trim();
-        let check_line = check_line.trim();
-        let can_start_anywhere = check_line.starts_with("[...]");
-        let can_end_anywhere = check_line.ends_with("[...]");
-
-        let check_fragments: Vec<&str> = check_line.split("[...]")
-                                                   .filter(|frag| !frag.is_empty())
-                                                   .collect();
-        if check_fragments.is_empty() {
-            return true;
-        }
-
-        let (mut rest, first_fragment) = if can_start_anywhere {
-            match line.find(check_fragments[0]) {
-                Some(pos) => (&line[pos + check_fragments[0].len() ..], 1),
-                None => return false
-            }
-        } else {
-            (line, 0)
         };
 
-        for fragment_index in first_fragment .. check_fragments.len() {
-            let current_fragment = check_fragments[fragment_index];
-            match rest.find(current_fragment) {
-                Some(pos) => {
-                    rest = &rest[pos + current_fragment.len() .. ];
+        self.dump_output(&out, &err);
+        ProcRes {
+            status: Status::Normal(status),
+            stdout: out,
+            stderr: err,
+            cmdline: format!("{:?}", cmd)
+        }
+    }
+
+    fn parse_debugger_commands(&self, debugger_prefix: &str) -> DebuggerCommands {
+        let command_directive = format!("{}-command", debugger_prefix);
+        let check_directive = format!("{}-check", debugger_prefix);
+
+        let mut breakpoint_lines = vec!();
+        let mut commands = vec!();
+        let mut check_lines = vec!();
+        let mut counter = 1;
+        let reader = BufReader::new(File::open(&self.testpaths.file).unwrap());
+        for line in reader.lines() {
+            match line {
+                Ok(line) => {
+                    if line.contains("#break") {
+                        breakpoint_lines.push(counter);
+                    }
+
+                    header::parse_name_value_directive(
+                        &line,
+                        &command_directive).map(|cmd| {
+                            commands.push(cmd)
+                        });
+
+                    header::parse_name_value_directive(
+                        &line,
+                        &check_directive).map(|cmd| {
+                            check_lines.push(cmd)
+                        });
+                }
+                Err(e) => {
+                    self.fatal(&format!("Error while parsing debugger commands: {}", e))
                 }
-                None => return false
             }
+            counter += 1;
         }
 
-        if !can_end_anywhere && !rest.is_empty() {
-            return false;
+        DebuggerCommands {
+            commands: commands,
+            check_lines: check_lines,
+            breakpoint_lines: breakpoint_lines,
+        }
+    }
+
+    fn cleanup_debug_info_options(&self, options: &Option<String>) -> Option<String> {
+        if options.is_none() {
+            return None;
         }
 
-        return true;
-    }
-}
+        // Remove options that are either unwanted (-O) or may lead to duplicates due to RUSTFLAGS.
+        let options_to_remove = [
+            "-O".to_owned(),
+            "-g".to_owned(),
+            "--debuginfo".to_owned()
+        ];
+        let new_options =
+            self.split_maybe_args(options).into_iter()
+                                          .filter(|x| !options_to_remove.contains(x))
+                                          .collect::<Vec<String>>();
 
-fn check_error_patterns(revision: Option<&str>,
-                        props: &TestProps,
-                        testpaths: &TestPaths,
-                        output_to_check: &str,
-                        proc_res: &ProcRes) {
-    if props.error_patterns.is_empty() {
-        fatal(revision,
-              &format!("no error pattern specified in {:?}",
-                       testpaths.file.display()));
+        Some(new_options.join(" "))
     }
-    let mut next_err_idx = 0;
-    let mut next_err_pat = props.error_patterns[next_err_idx].trim();
-    let mut done = false;
-    for line in output_to_check.lines() {
-        if line.contains(next_err_pat) {
-            debug!("found error pattern {}", next_err_pat);
-            next_err_idx += 1;
-            if next_err_idx == props.error_patterns.len() {
-                debug!("found all error patterns");
-                done = true;
+
+    fn check_debugger_output(&self, debugger_run_result: &ProcRes, check_lines: &[String]) {
+        let num_check_lines = check_lines.len();
+
+        let mut check_line_index = 0;
+        for line in debugger_run_result.stdout.lines() {
+            if check_line_index >= num_check_lines {
                 break;
             }
-            next_err_pat = props.error_patterns[next_err_idx].trim();
+
+            if check_single_line(line, &(check_lines[check_line_index])[..]) {
+                check_line_index += 1;
+            }
         }
-    }
-    if done { return; }
-
-    let missing_patterns = &props.error_patterns[next_err_idx..];
-    if missing_patterns.len() == 1 {
-        fatal_proc_rec(
-            revision,
-            &format!("error pattern '{}' not found!", missing_patterns[0]),
-            proc_res);
-    } else {
-        for pattern in missing_patterns {
-            error(revision, &format!("error pattern '{}' not found!", *pattern));
+        if check_line_index != num_check_lines && num_check_lines > 0 {
+            self.fatal_proc_rec(&format!("line not found in debugger output: {}",
+                                         check_lines[check_line_index]),
+                                debugger_run_result);
         }
-        fatal_proc_rec(revision, "multiple error patterns not found", proc_res);
-    }
-}
 
-fn check_no_compiler_crash(revision: Option<&str>, proc_res: &ProcRes) {
-    for line in proc_res.stderr.lines() {
-        if line.starts_with("error: internal compiler error:") {
-            fatal_proc_rec(revision,
-                           "compiler encountered internal error",
-                           proc_res);
-        }
-    }
-}
+        fn check_single_line(line: &str, check_line: &str) -> bool {
+            // Allow check lines to leave parts unspecified (e.g., uninitialized
+            // bits in the  wrong case of an enum) with the notation "[...]".
+            let line = line.trim();
+            let check_line = check_line.trim();
+            let can_start_anywhere = check_line.starts_with("[...]");
+            let can_end_anywhere = check_line.ends_with("[...]");
 
-fn check_forbid_output(revision: Option<&str>,
-                       props: &TestProps,
-                       output_to_check: &str,
-                       proc_res: &ProcRes) {
-    for pat in &props.forbid_output {
-        if output_to_check.contains(pat) {
-            fatal_proc_rec(revision,
-                           "forbidden pattern found in compiler output",
-                           proc_res);
-        }
-    }
-}
-
-fn check_expected_errors(revision: Option<&str>,
-                         expected_errors: Vec<errors::Error>,
-                         testpaths: &TestPaths,
-                         proc_res: &ProcRes) {
-    if proc_res.status.success() {
-        fatal_proc_rec(revision, "process did not return an error status", proc_res);
-    }
-
-    let file_name =
-        format!("{}", testpaths.file.display())
-        .replace(r"\", "/"); // on windows, translate all '\' path separators to '/'
-
-    // If the testcase being checked contains at least one expected "help"
-    // message, then we'll ensure that all "help" messages are expected.
-    // Otherwise, all "help" messages reported by the compiler will be ignored.
-    // This logic also applies to "note" messages.
-    let expect_help = expected_errors.iter().any(|ee| ee.kind == Some(ErrorKind::Help));
-    let expect_note = expected_errors.iter().any(|ee| ee.kind == Some(ErrorKind::Note));
-
-    // Parse the JSON output from the compiler and extract out the messages.
-    let actual_errors = json::parse_output(&file_name, &proc_res.stderr);
-    let mut unexpected = 0;
-    let mut not_found = 0;
-    let mut found = vec![false; expected_errors.len()];
-    for actual_error in &actual_errors {
-        let opt_index =
-            expected_errors
-            .iter()
-            .enumerate()
-            .position(|(index, expected_error)| {
-                !found[index] &&
-                    actual_error.line_num == expected_error.line_num &&
-                    (expected_error.kind.is_none() ||
-                     actual_error.kind == expected_error.kind) &&
-                    actual_error.msg.contains(&expected_error.msg)
-            });
-
-        match opt_index {
-            Some(index) => {
-                // found a match, everybody is happy
-                assert!(!found[index]);
-                found[index] = true;
+            let check_fragments: Vec<&str> = check_line.split("[...]")
+                                                       .filter(|frag| !frag.is_empty())
+                                                       .collect();
+            if check_fragments.is_empty() {
+                return true;
             }
 
-            None => {
-                if is_unexpected_compiler_message(actual_error,
-                                                  expect_help,
-                                                  expect_note) {
-                    error(revision,
-                          &format!("{}:{}: unexpected {:?}: '{}'",
-                                   file_name,
-                                   actual_error.line_num,
-                                   actual_error.kind.as_ref()
-                                                    .map_or(String::from("message"),
-                                                            |k| k.to_string()),
-                                   actual_error.msg));
-                    unexpected += 1;
+            let (mut rest, first_fragment) = if can_start_anywhere {
+                match line.find(check_fragments[0]) {
+                    Some(pos) => (&line[pos + check_fragments[0].len() ..], 1),
+                    None => return false
+                }
+            } else {
+                (line, 0)
+            };
+
+            for fragment_index in first_fragment .. check_fragments.len() {
+                let current_fragment = check_fragments[fragment_index];
+                match rest.find(current_fragment) {
+                    Some(pos) => {
+                        rest = &rest[pos + current_fragment.len() .. ];
+                    }
+                    None => return false
+                }
+            }
+
+            if !can_end_anywhere && !rest.is_empty() {
+                return false;
+            }
+
+            return true;
+        }
+    }
+
+    fn check_error_patterns(&self,
+                            output_to_check: &str,
+                            proc_res: &ProcRes) {
+        if self.props.error_patterns.is_empty() {
+            self.fatal(&format!("no error pattern specified in {:?}",
+                                self.testpaths.file.display()));
+        }
+        let mut next_err_idx = 0;
+        let mut next_err_pat = self.props.error_patterns[next_err_idx].trim();
+        let mut done = false;
+        for line in output_to_check.lines() {
+            if line.contains(next_err_pat) {
+                debug!("found error pattern {}", next_err_pat);
+                next_err_idx += 1;
+                if next_err_idx == self.props.error_patterns.len() {
+                    debug!("found all error patterns");
+                    done = true;
+                    break;
+                }
+                next_err_pat = self.props.error_patterns[next_err_idx].trim();
+            }
+        }
+        if done { return; }
+
+        let missing_patterns = &self.props.error_patterns[next_err_idx..];
+        if missing_patterns.len() == 1 {
+            self.fatal_proc_rec(
+                &format!("error pattern '{}' not found!", missing_patterns[0]),
+                proc_res);
+        } else {
+            for pattern in missing_patterns {
+                self.error(&format!("error pattern '{}' not found!", *pattern));
+            }
+            self.fatal_proc_rec("multiple error patterns not found", proc_res);
+        }
+    }
+
+    fn check_no_compiler_crash(&self, proc_res: &ProcRes) {
+        for line in proc_res.stderr.lines() {
+            if line.starts_with("error: internal compiler error:") {
+                self.fatal_proc_rec("compiler encountered internal error", proc_res);
+            }
+        }
+    }
+
+    fn check_forbid_output(&self,
+                           output_to_check: &str,
+                           proc_res: &ProcRes) {
+        for pat in &self.props.forbid_output {
+            if output_to_check.contains(pat) {
+                self.fatal_proc_rec("forbidden pattern found in compiler output", proc_res);
+            }
+        }
+    }
+
+    fn check_expected_errors(&self,
+                             expected_errors: Vec<errors::Error>,
+                             proc_res: &ProcRes) {
+        if proc_res.status.success() {
+            self.fatal_proc_rec("process did not return an error status", proc_res);
+        }
+
+        let file_name =
+            format!("{}", self.testpaths.file.display())
+            .replace(r"\", "/"); // on windows, translate all '\' path separators to '/'
+
+        // If the testcase being checked contains at least one expected "help"
+        // message, then we'll ensure that all "help" messages are expected.
+        // Otherwise, all "help" messages reported by the compiler will be ignored.
+        // This logic also applies to "note" messages.
+        let expect_help = expected_errors.iter().any(|ee| ee.kind == Some(ErrorKind::Help));
+        let expect_note = expected_errors.iter().any(|ee| ee.kind == Some(ErrorKind::Note));
+
+        // Parse the JSON output from the compiler and extract out the messages.
+        let actual_errors = json::parse_output(&file_name, &proc_res.stderr);
+        let mut unexpected = 0;
+        let mut not_found = 0;
+        let mut found = vec![false; expected_errors.len()];
+        for actual_error in &actual_errors {
+            let opt_index =
+                expected_errors
+                .iter()
+                .enumerate()
+                .position(|(index, expected_error)| {
+                    !found[index] &&
+                        actual_error.line_num == expected_error.line_num &&
+                        (expected_error.kind.is_none() ||
+                         actual_error.kind == expected_error.kind) &&
+                        actual_error.msg.contains(&expected_error.msg)
+                });
+
+            match opt_index {
+                Some(index) => {
+                    // found a match, everybody is happy
+                    assert!(!found[index]);
+                    found[index] = true;
+                }
+
+                None => {
+                    if self.is_unexpected_compiler_message(actual_error, expect_help, expect_note) {
+                        self.error(
+                            &format!("{}:{}: unexpected {:?}: '{}'",
+                                     file_name,
+                                     actual_error.line_num,
+                                     actual_error.kind.as_ref()
+                                     .map_or(String::from("message"),
+                                             |k| k.to_string()),
+                                     actual_error.msg));
+                        unexpected += 1;
+                    }
+                }
+            }
+        }
+
+        // anything not yet found is a problem
+        for (index, expected_error) in expected_errors.iter().enumerate() {
+            if !found[index] {
+                self.error(
+                    &format!("{}:{}: expected {} not found: {}",
+                             file_name,
+                             expected_error.line_num,
+                             expected_error.kind.as_ref()
+                             .map_or("message".into(),
+                                     |k| k.to_string()),
+                             expected_error.msg));
+                not_found += 1;
+            }
+        }
+
+        if unexpected > 0 || not_found > 0 {
+            self.error(
+                &format!("{} unexpected errors found, {} expected errors not found",
+                         unexpected, not_found));
+            print!("status: {}\ncommand: {}\n",
+                   proc_res.status, proc_res.cmdline);
+            println!("actual errors (from JSON output): {:#?}\n", actual_errors);
+            println!("expected errors (from test file): {:#?}\n", expected_errors);
+            panic!();
+        }
+    }
+
+    /// Returns true if we should report an error about `actual_error`,
+    /// which did not match any of the expected error. We always require
+    /// errors/warnings to be explicitly listed, but only require
+    /// helps/notes if there are explicit helps/notes given.
+    fn is_unexpected_compiler_message(&self,
+                                      actual_error: &Error,
+                                      expect_help: bool,
+                                      expect_note: bool)
+                                      -> bool {
+        match actual_error.kind {
+            Some(ErrorKind::Help) => expect_help,
+            Some(ErrorKind::Note) => expect_note,
+            Some(ErrorKind::Error) => true,
+            Some(ErrorKind::Warning) => true,
+            Some(ErrorKind::Suggestion) => false,
+            None => false
+        }
+    }
+
+    fn compile_test(&self) -> ProcRes {
+        let aux_dir = self.aux_output_dir_name();
+        // FIXME (#9639): This needs to handle non-utf8 paths
+        let link_args = vec!("-L".to_owned(),
+                             aux_dir.to_str().unwrap().to_owned());
+        let args = self.make_compile_args(link_args,
+                                          &self.testpaths.file,
+                                          TargetLocation::ThisFile(self.make_exe_name()));
+        self.compose_and_run_compiler(args, None)
+    }
+
+    fn document(&self, out_dir: &Path) -> ProcRes {
+        if self.props.build_aux_docs {
+            for rel_ab in &self.props.aux_builds {
+                let aux_testpaths = self.compute_aux_test_paths(rel_ab);
+                let aux_props = TestProps::from_file(&aux_testpaths.file);
+                let aux_cx = TestCx {
+                    config: self.config,
+                    props: &aux_props,
+                    testpaths: &aux_testpaths,
+                    revision: self.revision
+                };
+                let auxres = aux_cx.document(out_dir);
+                if !auxres.status.success() {
+                    return auxres;
+                }
+            }
+        }
+
+        let aux_dir = self.aux_output_dir_name();
+        let mut args = vec!["-L".to_owned(),
+                            aux_dir.to_str().unwrap().to_owned(),
+                            "-o".to_owned(),
+                            out_dir.to_str().unwrap().to_owned(),
+                            self.testpaths.file.to_str().unwrap().to_owned()];
+        args.extend(self.props.compile_flags.iter().cloned());
+        let args = ProcArgs {
+            prog: self.config.rustdoc_path.to_str().unwrap().to_owned(),
+            args: args,
+        };
+        self.compose_and_run_compiler(args, None)
+    }
+
+    fn exec_compiled_test(&self) -> ProcRes {
+        let env = self.props.exec_env.clone();
+
+        match &*self.config.target {
+
+            "arm-linux-androideabi" | "aarch64-linux-android" => {
+                self._arm_exec_compiled_test(env)
+            }
+
+            _=> {
+                let aux_dir = self.aux_output_dir_name();
+                self.compose_and_run(self.make_run_args(),
+                                     env,
+                                     self.config.run_lib_path.to_str().unwrap(),
+                                     Some(aux_dir.to_str().unwrap()),
+                                     None)
+            }
+        }
+    }
+
+    fn compute_aux_test_paths(&self, rel_ab: &str) -> TestPaths {
+        let abs_ab = self.config.aux_base.join(rel_ab);
+        TestPaths {
+            file: abs_ab,
+            base: self.testpaths.base.clone(),
+            relative_dir: Path::new(rel_ab).parent()
+                                           .map(|p| p.to_path_buf())
+                                           .unwrap_or_else(|| PathBuf::new())
+        }
+    }
+
+    fn compose_and_run_compiler(&self, args: ProcArgs, input: Option<String>) -> ProcRes {
+        if !self.props.aux_builds.is_empty() {
+            self.create_dir_racy(&self.aux_output_dir_name());
+        }
+
+        let aux_dir = self.aux_output_dir_name();
+        // FIXME (#9639): This needs to handle non-utf8 paths
+        let extra_link_args = vec!["-L".to_owned(),
+                                   aux_dir.to_str().unwrap().to_owned()];
+
+        for rel_ab in &self.props.aux_builds {
+            let aux_testpaths = self.compute_aux_test_paths(rel_ab);
+            let aux_props = TestProps::from_file(&aux_testpaths.file);
+            let mut crate_type = if aux_props.no_prefer_dynamic {
+                Vec::new()
+            } else {
+                // We primarily compile all auxiliary libraries as dynamic libraries
+                // to avoid code size bloat and large binaries as much as possible
+                // for the test suite (otherwise including libstd statically in all
+                // executables takes up quite a bit of space).
+                //
+                // For targets like MUSL or Emscripten, however, there is no support for
+                // dynamic libraries so we just go back to building a normal library. Note,
+                // however, that for MUSL if the library is built with `force_host` then
+                // it's ok to be a dylib as the host should always support dylibs.
+                if (self.config.target.contains("musl") && !aux_props.force_host) ||
+                    self.config.target.contains("emscripten")
+                {
+                    vec!("--crate-type=lib".to_owned())
+                } else {
+                    vec!("--crate-type=dylib".to_owned())
+                }
+            };
+            crate_type.extend(extra_link_args.clone());
+            let aux_output = {
+                let f = self.make_lib_name(&self.testpaths.file);
+                let parent = f.parent().unwrap();
+                TargetLocation::ThisDirectory(parent.to_path_buf())
+            };
+            let aux_cx = TestCx {
+                config: self.config,
+                props: &aux_props,
+                testpaths: &aux_testpaths,
+                revision: self.revision
+            };
+            let aux_args = aux_cx.make_compile_args(crate_type, &aux_testpaths.file, aux_output);
+            let auxres = aux_cx.compose_and_run(aux_args,
+                                                Vec::new(),
+                                                aux_cx.config.compile_lib_path.to_str().unwrap(),
+                                                Some(aux_dir.to_str().unwrap()),
+                                                None);
+            if !auxres.status.success() {
+                self.fatal_proc_rec(
+                    &format!("auxiliary build of {:?} failed to compile: ",
+                             aux_testpaths.file.display()),
+                    &auxres);
+            }
+
+            match &*self.config.target {
+                "arm-linux-androideabi"  | "aarch64-linux-android" => {
+                    self._arm_push_aux_shared_library();
+                }
+                _ => {}
+            }
+        }
+
+        self.compose_and_run(args,
+                             self.props.rustc_env.clone(),
+                             self.config.compile_lib_path.to_str().unwrap(),
+                             Some(aux_dir.to_str().unwrap()),
+                             input)
+    }
+
+    // Like std::fs::create_dir_all, except handles concurrent calls among multiple
+    // threads or processes.
+    fn create_dir_racy(&self, path: &Path) {
+        match fs::create_dir(path) {
+            Ok(()) => return,
+            Err(ref e) if e.kind() == io::ErrorKind::AlreadyExists => return,
+            Err(ref e) if e.kind() == io::ErrorKind::NotFound => {}
+            Err(e) => panic!("failed to create dir {:?}: {}", path, e),
+        }
+        self.create_dir_racy(path.parent().unwrap());
+        match fs::create_dir(path) {
+            Ok(()) => {}
+            Err(ref e) if e.kind() == io::ErrorKind::AlreadyExists => {}
+            Err(e) => panic!("failed to create dir {:?}: {}", path, e),
+        }
+    }
+
+    fn compose_and_run(&self,
+                       ProcArgs{ args, prog }: ProcArgs,
+                       procenv: Vec<(String, String)> ,
+                       lib_path: &str,
+                       aux_path: Option<&str>,
+                       input: Option<String>) -> ProcRes {
+        return self.program_output(lib_path, prog, aux_path, args, procenv, input);
+    }
+
+    fn make_compile_args(&self,
+                         extras: Vec<String> ,
+                         input_file: &Path,
+                         output_file: TargetLocation)
+                         -> ProcArgs
+    {
+        let target = if self.props.force_host {
+            &*self.config.host
+        } else {
+            &*self.config.target
+        };
+
+        // FIXME (#9639): This needs to handle non-utf8 paths
+        let mut args = vec!(input_file.to_str().unwrap().to_owned(),
+                            "-L".to_owned(),
+                            self.config.build_base.to_str().unwrap().to_owned(),
+                            format!("--target={}", target));
+
+        match self.config.mode {
+            CompileFail |
+            ParseFail |
+            Incremental => {
+                // If we are extracting and matching errors in the new
+                // fashion, then you want JSON mode. Old-skool error
+                // patterns still match the raw compiler output.
+                if self.props.error_patterns.is_empty() {
+                    args.extend(["--error-format",
+                                 "json",
+                                 "-Z",
+                                 "unstable-options"]
+                                .iter()
+                                .map(|s| s.to_string()));
+                }
+            }
+
+            RunFail |
+            RunPass |
+            RunPassValgrind |
+            Pretty |
+            DebugInfoGdb |
+            DebugInfoLldb |
+            Codegen |
+            Rustdoc |
+            RunMake |
+            CodegenUnits => {
+                // do not use JSON output
+            }
+        }
+
+        args.extend_from_slice(&extras);
+        if !self.props.no_prefer_dynamic {
+            args.push("-C".to_owned());
+            args.push("prefer-dynamic".to_owned());
+        }
+        let path = match output_file {
+            TargetLocation::ThisFile(path) => {
+                args.push("-o".to_owned());
+                path
+            }
+            TargetLocation::ThisDirectory(path) => {
+                args.push("--out-dir".to_owned());
+                path
+            }
+        };
+        args.push(path.to_str().unwrap().to_owned());
+        if self.props.force_host {
+            args.extend(self.split_maybe_args(&self.config.host_rustcflags));
+        } else {
+            args.extend(self.split_maybe_args(&self.config.target_rustcflags));
+        }
+        args.extend(self.props.compile_flags.iter().cloned());
+        return ProcArgs {
+            prog: self.config.rustc_path.to_str().unwrap().to_owned(),
+            args: args,
+        };
+    }
+
+    fn make_lib_name(&self, auxfile: &Path) -> PathBuf {
+        // what we return here is not particularly important, as it
+        // happens; rustc ignores everything except for the directory.
+        let auxname = self.output_testname(auxfile);
+        self.aux_output_dir_name().join(&auxname)
+    }
+
+    fn make_exe_name(&self) -> PathBuf {
+        let mut f = self.output_base_name();
+        // FIXME: This is using the host architecture exe suffix, not target!
+        if self.config.target == "asmjs-unknown-emscripten" {
+            let mut fname = f.file_name().unwrap().to_os_string();
+            fname.push(".js");
+            f.set_file_name(&fname);
+        } else if !env::consts::EXE_SUFFIX.is_empty() {
+            let mut fname = f.file_name().unwrap().to_os_string();
+            fname.push(env::consts::EXE_SUFFIX);
+            f.set_file_name(&fname);
+        }
+        f
+    }
+
+    fn make_run_args(&self) -> ProcArgs {
+        // If we've got another tool to run under (valgrind),
+        // then split apart its command
+        let mut args = self.split_maybe_args(&self.config.runtool);
+
+        // If this is emscripten, then run tests under nodejs
+        if self.config.target == "asmjs-unknown-emscripten" {
+            args.push("nodejs".to_owned());
+        }
+
+        let exe_file = self.make_exe_name();
+
+        // FIXME (#9639): This needs to handle non-utf8 paths
+        args.push(exe_file.to_str().unwrap().to_owned());
+
+        // Add the arguments in the run_flags directive
+        args.extend(self.split_maybe_args(&self.props.run_flags));
+
+        let prog = args.remove(0);
+        return ProcArgs {
+            prog: prog,
+            args: args,
+        };
+    }
+
+    fn split_maybe_args(&self, argstr: &Option<String>) -> Vec<String> {
+        match *argstr {
+            Some(ref s) => {
+                s
+                    .split(' ')
+                    .filter_map(|s| {
+                        if s.chars().all(|c| c.is_whitespace()) {
+                            None
+                        } else {
+                            Some(s.to_owned())
+                        }
+                    }).collect()
+            }
+            None => Vec::new()
+        }
+    }
+
+    fn program_output(&self,
+                      lib_path: &str,
+                      prog: String,
+                      aux_path: Option<&str>,
+                      args: Vec<String>,
+                      env: Vec<(String, String)>,
+                      input: Option<String>)
+                      -> ProcRes {
+        let cmdline =
+        {
+            let cmdline = self.make_cmdline(lib_path,
+                                            &prog,
+                                            &args);
+            logv(self.config, format!("executing {}", cmdline));
+            cmdline
+        };
+        let procsrv::Result {
+            out,
+            err,
+            status
+        } = procsrv::run(lib_path,
+                         &prog,
+                         aux_path,
+                         &args,
+                         env,
+                         input).expect(&format!("failed to exec `{}`", prog));
+        self.dump_output(&out, &err);
+        return ProcRes {
+            status: Status::Normal(status),
+            stdout: out,
+            stderr: err,
+            cmdline: cmdline,
+        };
+    }
+
+    fn make_cmdline(&self, libpath: &str, prog: &str, args: &[String]) -> String {
+        use util;
+
+        // Linux and mac don't require adjusting the library search path
+        if cfg!(unix) {
+            format!("{} {}", prog, args.join(" "))
+        } else {
+            // Build the LD_LIBRARY_PATH variable as it would be seen on the command line
+            // for diagnostic purposes
+            fn lib_path_cmd_prefix(path: &str) -> String {
+                format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
+            }
+
+            format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.join(" "))
+        }
+    }
+
+    fn dump_output(&self, out: &str, err: &str) {
+        self.dump_output_file(out, "out");
+        self.dump_output_file(err, "err");
+        self.maybe_dump_to_stdout(out, err);
+    }
+
+    fn dump_output_file(&self,
+                        out: &str,
+                        extension: &str) {
+        let outfile = self.make_out_name(extension);
+        File::create(&outfile).unwrap().write_all(out.as_bytes()).unwrap();
+    }
+
+    fn make_out_name(&self, extension: &str) -> PathBuf {
+        self.output_base_name().with_extension(extension)
+    }
+
+    fn aux_output_dir_name(&self) -> PathBuf {
+        let f = self.output_base_name();
+        let mut fname = f.file_name().unwrap().to_os_string();
+        fname.push(&format!(".{}.libaux", self.config.mode));
+        f.with_file_name(&fname)
+    }
+
+    fn output_testname(&self, filepath: &Path) -> PathBuf {
+        PathBuf::from(filepath.file_stem().unwrap())
+    }
+
+    /// Given a test path like `compile-fail/foo/bar.rs` Returns a name like
+    ///
+    ///     <output>/foo/bar-stage1
+    fn output_base_name(&self) -> PathBuf {
+        let dir = self.config.build_base.join(&self.testpaths.relative_dir);
+
+        // Note: The directory `dir` is created during `collect_tests_from_dir`
+        dir
+            .join(&self.output_testname(&self.testpaths.file))
+            .with_extension(&self.config.stage_id)
+    }
+
+    fn maybe_dump_to_stdout(&self, out: &str, err: &str) {
+        if self.config.verbose {
+            println!("------{}------------------------------", "stdout");
+            println!("{}", out);
+            println!("------{}------------------------------", "stderr");
+            println!("{}", err);
+            println!("------------------------------------------");
+        }
+    }
+
+    fn error(&self, err: &str) {
+        match self.revision {
+            Some(rev) => println!("\nerror in revision `{}`: {}", rev, err),
+            None => println!("\nerror: {}", err)
+        }
+    }
+
+    fn fatal(&self, err: &str) -> ! {
+        self.error(err); panic!();
+    }
+
+    fn fatal_proc_rec(&self, err: &str, proc_res: &ProcRes) -> ! {
+        self.error(err);
+        print!("\
+            status: {}\n\
+            command: {}\n\
+            stdout:\n\
+            ------------------------------------------\n\
+            {}\n\
+            ------------------------------------------\n\
+            stderr:\n\
+            ------------------------------------------\n\
+            {}\n\
+            ------------------------------------------\n\
+            \n",
+               proc_res.status, proc_res.cmdline, proc_res.stdout,
+               proc_res.stderr);
+        panic!();
+    }
+
+    fn _arm_exec_compiled_test(&self, env: Vec<(String, String)>) -> ProcRes {
+        let args = self.make_run_args();
+        let cmdline = self.make_cmdline("", &args.prog, &args.args);
+
+        // get bare program string
+        let mut tvec: Vec<String> = args.prog
+                                        .split('/')
+                                        .map(str::to_owned)
+                                        .collect();
+        let prog_short = tvec.pop().unwrap();
+
+        // copy to target
+        let copy_result = procsrv::run("",
+                                       &self.config.adb_path,
+                                       None,
+                                       &[
+                                           "push".to_owned(),
+                                           args.prog.clone(),
+                                           self.config.adb_test_dir.clone()
+                                       ],
+                                       vec!(("".to_owned(), "".to_owned())),
+                                       Some("".to_owned()))
+            .expect(&format!("failed to exec `{}`", self.config.adb_path));
+
+        if self.config.verbose {
+            println!("push ({}) {} {} {}",
+                     self.config.target,
+                     args.prog,
+                     copy_result.out,
+                     copy_result.err);
+        }
+
+        logv(self.config, format!("executing ({}) {}", self.config.target, cmdline));
+
+        let mut runargs = Vec::new();
+
+        // run test via adb_run_wrapper
+        runargs.push("shell".to_owned());
+        for (key, val) in env {
+            runargs.push(format!("{}={}", key, val));
+        }
+        runargs.push(format!("{}/../adb_run_wrapper.sh", self.config.adb_test_dir));
+        runargs.push(format!("{}", self.config.adb_test_dir));
+        runargs.push(format!("{}", prog_short));
+
+        for tv in &args.args {
+            runargs.push(tv.to_owned());
+        }
+        procsrv::run("",
+                     &self.config.adb_path,
+                     None,
+                     &runargs,
+                     vec!(("".to_owned(), "".to_owned())), Some("".to_owned()))
+            .expect(&format!("failed to exec `{}`", self.config.adb_path));
+
+        // get exitcode of result
+        runargs = Vec::new();
+        runargs.push("shell".to_owned());
+        runargs.push("cat".to_owned());
+        runargs.push(format!("{}/{}.exitcode", self.config.adb_test_dir, prog_short));
+
+        let procsrv::Result{ out: exitcode_out, err: _, status: _ } =
+            procsrv::run("",
+                         &self.config.adb_path,
+                         None,
+                         &runargs,
+                         vec!(("".to_owned(), "".to_owned())),
+                         Some("".to_owned()))
+            .expect(&format!("failed to exec `{}`", self.config.adb_path));
+
+        let mut exitcode: i32 = 0;
+        for c in exitcode_out.chars() {
+            if !c.is_numeric() { break; }
+            exitcode = exitcode * 10 + match c {
+                '0' ... '9' => c as i32 - ('0' as i32),
+                _ => 101,
+            }
+        }
+
+        // get stdout of result
+        runargs = Vec::new();
+        runargs.push("shell".to_owned());
+        runargs.push("cat".to_owned());
+        runargs.push(format!("{}/{}.stdout", self.config.adb_test_dir, prog_short));
+
+        let procsrv::Result{ out: stdout_out, err: _, status: _ } =
+            procsrv::run("",
+                         &self.config.adb_path,
+                         None,
+                         &runargs,
+                         vec!(("".to_owned(), "".to_owned())),
+                         Some("".to_owned()))
+            .expect(&format!("failed to exec `{}`", self.config.adb_path));
+
+        // get stderr of result
+        runargs = Vec::new();
+        runargs.push("shell".to_owned());
+        runargs.push("cat".to_owned());
+        runargs.push(format!("{}/{}.stderr", self.config.adb_test_dir, prog_short));
+
+        let procsrv::Result{ out: stderr_out, err: _, status: _ } =
+            procsrv::run("",
+                         &self.config.adb_path,
+                         None,
+                         &runargs,
+                         vec!(("".to_owned(), "".to_owned())),
+                         Some("".to_owned()))
+            .expect(&format!("failed to exec `{}`", self.config.adb_path));
+
+        self.dump_output(&stdout_out, &stderr_out);
+
+        ProcRes {
+            status: Status::Parsed(exitcode),
+            stdout: stdout_out,
+            stderr: stderr_out,
+            cmdline: cmdline
+        }
+    }
+
+    fn _arm_push_aux_shared_library(&self) {
+        let tdir = self.aux_output_dir_name();
+
+        let dirs = fs::read_dir(&tdir).unwrap();
+        for file in dirs {
+            let file = file.unwrap().path();
+            if file.extension().and_then(|s| s.to_str()) == Some("so") {
+                // FIXME (#9639): This needs to handle non-utf8 paths
+                let copy_result = procsrv::run("",
+                                               &self.config.adb_path,
+                                               None,
+                                               &[
+                                                   "push".to_owned(),
+                                                   file.to_str()
+                                                       .unwrap()
+                                                       .to_owned(),
+                                                   self.config.adb_test_dir.to_owned(),
+                                               ],
+                                               vec!(("".to_owned(),
+                                                     "".to_owned())),
+                                               Some("".to_owned()))
+                    .expect(&format!("failed to exec `{}`", self.config.adb_path));
+
+                if self.config.verbose {
+                    println!("push ({}) {:?} {} {}",
+                             self.config.target, file.display(),
+                             copy_result.out, copy_result.err);
                 }
             }
         }
     }
 
-    // anything not yet found is a problem
-    for (index, expected_error) in expected_errors.iter().enumerate() {
-        if !found[index] {
-            error(revision,
-                  &format!("{}:{}: expected {} not found: {}",
-                           file_name,
-                           expected_error.line_num,
-                           expected_error.kind.as_ref()
-                                              .map_or("message".into(),
-                                                      |k| k.to_string()),
-                           expected_error.msg));
-            not_found += 1;
+    // codegen tests (using FileCheck)
+
+    fn compile_test_and_save_ir(&self) -> ProcRes {
+        let aux_dir = self.aux_output_dir_name();
+        // FIXME (#9639): This needs to handle non-utf8 paths
+        let mut link_args = vec!("-L".to_owned(),
+                                 aux_dir.to_str().unwrap().to_owned());
+        let llvm_args = vec!("--emit=llvm-ir".to_owned(),);
+        link_args.extend(llvm_args);
+        let args = self.make_compile_args(link_args,
+                                          &self.testpaths.file,
+                                          TargetLocation::ThisDirectory(
+                                              self.output_base_name().parent()
+                                                                     .unwrap()
+                                                                     .to_path_buf()));
+        self.compose_and_run_compiler(args, None)
+    }
+
+    fn check_ir_with_filecheck(&self) -> ProcRes {
+        let irfile = self.output_base_name().with_extension("ll");
+        let prog = self.config.llvm_filecheck.as_ref().unwrap();
+        let proc_args = ProcArgs {
+            // FIXME (#9639): This needs to handle non-utf8 paths
+            prog: prog.to_str().unwrap().to_owned(),
+            args: vec!(format!("-input-file={}", irfile.to_str().unwrap()),
+                       self.testpaths.file.to_str().unwrap().to_owned())
+        };
+        self.compose_and_run(proc_args, Vec::new(), "", None, None)
+    }
+
+    fn run_codegen_test(&self) {
+        assert!(self.revision.is_none(), "revisions not relevant here");
+
+        if self.config.llvm_filecheck.is_none() {
+            self.fatal("missing --llvm-filecheck");
+        }
+
+        let mut proc_res = self.compile_test_and_save_ir();
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("compilation failed!", &proc_res);
+        }
+
+        proc_res = self.check_ir_with_filecheck();
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("verification with 'FileCheck' failed", &proc_res);
         }
     }
 
-    if unexpected > 0 || not_found > 0 {
-        error(revision,
-              &format!("{} unexpected errors found, {} expected errors not found",
-                       unexpected, not_found));
-        print!("status: {}\ncommand: {}\n",
-               proc_res.status, proc_res.cmdline);
-        println!("actual errors (from JSON output): {:#?}\n", actual_errors);
-        println!("expected errors (from test file): {:#?}\n", expected_errors);
-        panic!();
+    fn charset() -> &'static str {
+        // FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset
+        if cfg!(target_os = "bitrig") {
+            "auto"
+        } else if cfg!(target_os = "freebsd") {
+            "ISO-8859-1"
+        } else {
+            "UTF-8"
+        }
     }
-}
 
-/// Returns true if we should report an error about `actual_error`,
-/// which did not match any of the expected error. We always require
-/// errors/warnings to be explicitly listed, but only require
-/// helps/notes if there are explicit helps/notes given.
-fn is_unexpected_compiler_message(actual_error: &Error,
-                                  expect_help: bool,
-                                  expect_note: bool)
-                                  -> bool {
-    match actual_error.kind {
-        Some(ErrorKind::Help) => expect_help,
-        Some(ErrorKind::Note) => expect_note,
-        Some(ErrorKind::Error) => true,
-        Some(ErrorKind::Warning) => true,
-        Some(ErrorKind::Suggestion) => false,
-        None => false
+    fn run_rustdoc_test(&self) {
+        assert!(self.revision.is_none(), "revisions not relevant here");
+
+        let out_dir = self.output_base_name();
+        let _ = fs::remove_dir_all(&out_dir);
+        self.create_dir_racy(&out_dir);
+
+        let proc_res = self.document(&out_dir);
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("rustdoc failed!", &proc_res);
+        }
+        let root = self.find_rust_src_root().unwrap();
+
+        let res = self.cmd2procres(Command::new(&self.config.docck_python)
+                                   .arg(root.join("src/etc/htmldocck.py"))
+                                   .arg(out_dir)
+                                   .arg(&self.testpaths.file));
+        if !res.status.success() {
+            self.fatal_proc_rec("htmldocck failed!", &res);
+        }
+    }
+
+    fn run_codegen_units_test(&self) {
+        assert!(self.revision.is_none(), "revisions not relevant here");
+
+        let proc_res = self.compile_test();
+
+        if !proc_res.status.success() {
+            self.fatal_proc_rec("compilation failed!", &proc_res);
+        }
+
+        self.check_no_compiler_crash(&proc_res);
+
+        const PREFIX: &'static str = "TRANS_ITEM ";
+        const CGU_MARKER: &'static str = "@@";
+
+        let actual: Vec<TransItem> = proc_res
+            .stdout
+            .lines()
+            .filter(|line| line.starts_with(PREFIX))
+            .map(str_to_trans_item)
+            .collect();
+
+        let expected: Vec<TransItem> = errors::load_errors(&self.testpaths.file, None)
+            .iter()
+            .map(|e| str_to_trans_item(&e.msg[..]))
+            .collect();
+
+        let mut missing = Vec::new();
+        let mut wrong_cgus = Vec::new();
+
+        for expected_item in &expected {
+            let actual_item_with_same_name = actual.iter()
+                                                   .find(|ti| ti.name == expected_item.name);
+
+            if let Some(actual_item) = actual_item_with_same_name {
+                if !expected_item.codegen_units.is_empty() {
+                    // Also check for codegen units
+                    if expected_item.codegen_units != actual_item.codegen_units {
+                        wrong_cgus.push((expected_item.clone(), actual_item.clone()));
+                    }
+                }
+            } else {
+                missing.push(expected_item.string.clone());
+            }
+        }
+
+        let unexpected: Vec<_> =
+            actual.iter()
+                  .filter(|acgu| !expected.iter().any(|ecgu| acgu.name == ecgu.name))
+                  .map(|acgu| acgu.string.clone())
+                  .collect();
+
+        if !missing.is_empty() {
+            missing.sort();
+
+            println!("\nThese items should have been contained but were not:\n");
+
+            for item in &missing {
+                println!("{}", item);
+            }
+
+            println!("\n");
+        }
+
+        if !unexpected.is_empty() {
+            let sorted = {
+                let mut sorted = unexpected.clone();
+                sorted.sort();
+                sorted
+            };
+
+            println!("\nThese items were contained but should not have been:\n");
+
+            for item in sorted {
+                println!("{}", item);
+            }
+
+            println!("\n");
+        }
+
+        if !wrong_cgus.is_empty() {
+            wrong_cgus.sort_by_key(|pair| pair.0.name.clone());
+            println!("\nThe following items were assigned to wrong codegen units:\n");
+
+            for &(ref expected_item, ref actual_item) in &wrong_cgus {
+                println!("{}", expected_item.name);
+                println!("  expected: {}", codegen_units_to_str(&expected_item.codegen_units));
+                println!("  actual:   {}", codegen_units_to_str(&actual_item.codegen_units));
+                println!("");
+            }
+        }
+
+        if !(missing.is_empty() && unexpected.is_empty() && wrong_cgus.is_empty())
+        {
+            panic!();
+        }
+
+        #[derive(Clone, Eq, PartialEq)]
+        struct TransItem {
+            name: String,
+            codegen_units: HashSet<String>,
+            string: String,
+        }
+
+        // [TRANS_ITEM] name [@@ (cgu)+]
+        fn str_to_trans_item(s: &str) -> TransItem {
+            let s = if s.starts_with(PREFIX) {
+                (&s[PREFIX.len()..]).trim()
+            } else {
+                s.trim()
+            };
+
+            let full_string = format!("{}{}", PREFIX, s.trim().to_owned());
+
+            let parts: Vec<&str> = s.split(CGU_MARKER)
+                                    .map(str::trim)
+                                    .filter(|s| !s.is_empty())
+                                    .collect();
+
+            let name = parts[0].trim();
+
+            let cgus = if parts.len() > 1 {
+                let cgus_str = parts[1];
+
+                cgus_str.split(" ")
+                        .map(str::trim)
+                        .filter(|s| !s.is_empty())
+                        .map(str::to_owned)
+                        .collect()
+            }
+            else {
+                HashSet::new()
+            };
+
+            TransItem {
+                name: name.to_owned(),
+                codegen_units: cgus,
+                string: full_string,
+            }
+        }
+
+        fn codegen_units_to_str(cgus: &HashSet<String>) -> String
+        {
+            let mut cgus: Vec<_> = cgus.iter().collect();
+            cgus.sort();
+
+            let mut string = String::new();
+            for cgu in cgus {
+                string.push_str(&cgu[..]);
+                string.push_str(" ");
+            }
+
+            string
+        }
+    }
+
+    fn init_incremental_test(&self) {
+        // (See `run_incremental_test` for an overview of how incremental tests work.)
+
+        // Before any of the revisions have executed, create the
+        // incremental workproduct directory.  Delete any old
+        // incremental work products that may be there from prior
+        // runs.
+        let incremental_dir = self.incremental_dir();
+        if incremental_dir.exists() {
+            fs::remove_dir_all(&incremental_dir).unwrap();
+        }
+        fs::create_dir_all(&incremental_dir).unwrap();
+
+        if self.config.verbose {
+            print!("init_incremental_test: incremental_dir={}", incremental_dir.display());
+        }
+    }
+
+    fn run_incremental_test(&self) {
+        // Basic plan for a test incremental/foo/bar.rs:
+        // - load list of revisions pass1, fail2, pass3
+        //   - each should begin with `rpass`, `rfail`, or `cfail`
+        //   - if `rpass`, expect compile and execution to succeed
+        //   - if `cfail`, expect compilation to fail
+        //   - if `rfail`, expect execution to fail
+        // - create a directory build/foo/bar.incremental
+        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass1
+        //   - because name of revision starts with "pass", expect success
+        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C fail2
+        //   - because name of revision starts with "fail", expect an error
+        //   - load expected errors as usual, but filter for those that end in `[fail2]`
+        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass3
+        //   - because name of revision starts with "pass", expect success
+        // - execute build/foo/bar.exe and save output
+        //
+        // FIXME -- use non-incremental mode as an oracle? That doesn't apply
+        // to #[rustc_dirty] and clean tests I guess
+
+        let revision = self.revision.expect("incremental tests require a list of revisions");
+
+        // Incremental workproduct directory should have already been created.
+        let incremental_dir = self.incremental_dir();
+        assert!(incremental_dir.exists(), "init_incremental_test failed to create incremental dir");
+
+        // Add an extra flag pointing at the incremental directory.
+        let mut revision_props = self.props.clone();
+        revision_props.compile_flags.extend(vec![
+            format!("-Z"),
+            format!("incremental={}", incremental_dir.display()),
+        ]);
+
+        let revision_cx = TestCx {
+            config: self.config,
+            props: &revision_props,
+            testpaths: self.testpaths,
+            revision: self.revision,
+        };
+
+        if self.config.verbose {
+            print!("revision={:?} revision_props={:#?}", revision, revision_props);
+        }
+
+        if revision.starts_with("rpass") {
+            revision_cx.run_rpass_test();
+        } else if revision.starts_with("rfail") {
+            revision_cx.run_rfail_test();
+        } else if revision.starts_with("cfail") {
+            revision_cx.run_cfail_test();
+        } else {
+            revision_cx.fatal(
+                "revision name must begin with rpass, rfail, or cfail");
+        }
+    }
+
+    /// Directory where incremental work products are stored.
+    fn incremental_dir(&self) -> PathBuf {
+        self.output_base_name().with_extension("incremental")
+    }
+
+    fn run_rmake_test(&self) {
+        // FIXME(#11094): we should fix these tests
+        if self.config.host != self.config.target {
+            return
+        }
+
+        let cwd = env::current_dir().unwrap();
+        let src_root = self.config.src_base.parent().unwrap()
+                                           .parent().unwrap()
+                                           .parent().unwrap();
+        let src_root = cwd.join(&src_root);
+
+        let tmpdir = cwd.join(self.output_base_name());
+        if tmpdir.exists() {
+            self.aggressive_rm_rf(&tmpdir).unwrap();
+        }
+        self.create_dir_racy(&tmpdir);
+
+        let mut cmd = Command::new("make");
+        cmd.current_dir(&self.testpaths.file)
+           .env("TARGET", &self.config.target)
+           .env("PYTHON", &self.config.docck_python)
+           .env("S", src_root)
+           .env("RUST_BUILD_STAGE", &self.config.stage_id)
+           .env("RUSTC", cwd.join(&self.config.rustc_path))
+           .env("RUSTDOC", cwd.join(&self.config.rustdoc_path))
+           .env("TMPDIR", &tmpdir)
+           .env("LD_LIB_PATH_ENVVAR", procsrv::dylib_env_var())
+           .env("HOST_RPATH_DIR", cwd.join(&self.config.compile_lib_path))
+           .env("TARGET_RPATH_DIR", cwd.join(&self.config.run_lib_path))
+           .env("LLVM_COMPONENTS", &self.config.llvm_components)
+           .env("LLVM_CXXFLAGS", &self.config.llvm_cxxflags);
+
+        if self.config.target.contains("msvc") {
+            // We need to pass a path to `lib.exe`, so assume that `cc` is `cl.exe`
+            // and that `lib.exe` lives next to it.
+            let lib = Path::new(&self.config.cc).parent().unwrap().join("lib.exe");
+
+            // MSYS doesn't like passing flags of the form `/foo` as it thinks it's
+            // a path and instead passes `C:\msys64\foo`, so convert all
+            // `/`-arguments to MSVC here to `-` arguments.
+            let cflags = self.config.cflags.split(' ').map(|s| s.replace("/", "-"))
+                                                 .collect::<Vec<_>>().join(" ");
+
+            cmd.env("IS_MSVC", "1")
+               .env("MSVC_LIB", format!("'{}' -nologo", lib.display()))
+               .env("CC", format!("'{}' {}", self.config.cc, cflags))
+               .env("CXX", &self.config.cxx);
+        } else {
+            cmd.env("CC", format!("{} {}", self.config.cc, self.config.cflags))
+               .env("CXX", format!("{} {}", self.config.cxx, self.config.cflags));
+        }
+
+        let output = cmd.output().expect("failed to spawn `make`");
+        if !output.status.success() {
+            let res = ProcRes {
+                status: Status::Normal(output.status),
+                stdout: String::from_utf8_lossy(&output.stdout).into_owned(),
+                stderr: String::from_utf8_lossy(&output.stderr).into_owned(),
+                cmdline: format!("{:?}", cmd),
+            };
+            self.fatal_proc_rec("make failed", &res);
+        }
+    }
+
+    fn aggressive_rm_rf(&self, path: &Path) -> io::Result<()> {
+        for e in try!(path.read_dir()) {
+            let entry = try!(e);
+            let path = entry.path();
+            if try!(entry.file_type()).is_dir() {
+                try!(self.aggressive_rm_rf(&path));
+            } else {
+                // Remove readonly files as well on windows (by default we can't)
+                try!(fs::remove_file(&path).or_else(|e| {
+                    if cfg!(windows) && e.kind() == io::ErrorKind::PermissionDenied {
+                        let mut meta = try!(entry.metadata()).permissions();
+                        meta.set_readonly(false);
+                        try!(fs::set_permissions(&path, meta));
+                        fs::remove_file(&path)
+                    } else {
+                        Err(e)
+                    }
+                }))
+            }
+        }
+        fs::remove_dir(path)
     }
 }
 
@@ -1150,1025 +2127,8 @@ impl fmt::Display for Status {
     }
 }
 
-fn compile_test(config: &Config, props: &TestProps,
-                testpaths: &TestPaths) -> ProcRes {
-    let aux_dir = aux_output_dir_name(config, testpaths);
-    // FIXME (#9639): This needs to handle non-utf8 paths
-    let link_args = vec!("-L".to_owned(),
-                         aux_dir.to_str().unwrap().to_owned());
-    let args = make_compile_args(config,
-                                 props,
-                                 link_args,
-                                 &testpaths.file,
-                                 TargetLocation::ThisFile(make_exe_name(config, testpaths)));
-    compose_and_run_compiler(config, props, testpaths, args, None)
-}
-
-fn document(config: &Config,
-            props: &TestProps,
-            testpaths: &TestPaths,
-            out_dir: &Path)
-            -> ProcRes {
-    if props.build_aux_docs {
-        for rel_ab in &props.aux_builds {
-            let aux_testpaths = compute_aux_test_paths(config, testpaths, rel_ab);
-            let aux_props = TestProps::from_file(&aux_testpaths.file);
-            let auxres = document(config, &aux_props, &aux_testpaths, out_dir);
-            if !auxres.status.success() {
-                return auxres;
-            }
-        }
-    }
-
-    let aux_dir = aux_output_dir_name(config, testpaths);
-    let mut args = vec!["-L".to_owned(),
-                        aux_dir.to_str().unwrap().to_owned(),
-                        "-o".to_owned(),
-                        out_dir.to_str().unwrap().to_owned(),
-                        testpaths.file.to_str().unwrap().to_owned()];
-    args.extend(props.compile_flags.iter().cloned());
-    let args = ProcArgs {
-        prog: config.rustdoc_path.to_str().unwrap().to_owned(),
-        args: args,
-    };
-    compose_and_run_compiler(config, props, testpaths, args, None)
-}
-
-fn exec_compiled_test(config: &Config, props: &TestProps,
-                      testpaths: &TestPaths) -> ProcRes {
-
-    let env = props.exec_env.clone();
-
-    match &*config.target {
-
-        "arm-linux-androideabi" | "aarch64-linux-android" => {
-            _arm_exec_compiled_test(config, props, testpaths, env)
-        }
-
-        _=> {
-            let aux_dir = aux_output_dir_name(config, testpaths);
-            compose_and_run(config,
-                            testpaths,
-                            make_run_args(config, props, testpaths),
-                            env,
-                            config.run_lib_path.to_str().unwrap(),
-                            Some(aux_dir.to_str().unwrap()),
-                            None)
-        }
-    }
-}
-
-fn compute_aux_test_paths(config: &Config,
-                          testpaths: &TestPaths,
-                          rel_ab: &str)
-                          -> TestPaths
-{
-    let abs_ab = config.aux_base.join(rel_ab);
-    TestPaths {
-        file: abs_ab,
-        base: testpaths.base.clone(),
-        relative_dir: Path::new(rel_ab).parent()
-                                       .map(|p| p.to_path_buf())
-                                       .unwrap_or_else(|| PathBuf::new())
-    }
-}
-
-fn compose_and_run_compiler(config: &Config, props: &TestProps,
-                            testpaths: &TestPaths, args: ProcArgs,
-                            input: Option<String>) -> ProcRes {
-    if !props.aux_builds.is_empty() {
-        create_dir_racy(&aux_output_dir_name(config, testpaths));
-    }
-
-    let aux_dir = aux_output_dir_name(config, testpaths);
-    // FIXME (#9639): This needs to handle non-utf8 paths
-    let extra_link_args = vec!["-L".to_owned(),
-                               aux_dir.to_str().unwrap().to_owned()];
-
-    for rel_ab in &props.aux_builds {
-        let aux_testpaths = compute_aux_test_paths(config, testpaths, rel_ab);
-        let aux_props = TestProps::from_file(&aux_testpaths.file);
-        let mut crate_type = if aux_props.no_prefer_dynamic {
-            Vec::new()
-        } else {
-            // We primarily compile all auxiliary libraries as dynamic libraries
-            // to avoid code size bloat and large binaries as much as possible
-            // for the test suite (otherwise including libstd statically in all
-            // executables takes up quite a bit of space).
-            //
-            // For targets like MUSL or Emscripten, however, there is no support for
-            // dynamic libraries so we just go back to building a normal library. Note,
-            // however, that for MUSL if the library is built with `force_host` then
-            // it's ok to be a dylib as the host should always support dylibs.
-            if (config.target.contains("musl") && !aux_props.force_host) ||
-                config.target.contains("emscripten")
-            {
-                vec!("--crate-type=lib".to_owned())
-            } else {
-                vec!("--crate-type=dylib".to_owned())
-            }
-        };
-        crate_type.extend(extra_link_args.clone());
-        let aux_output = {
-            let f = make_lib_name(config, &testpaths.file, testpaths);
-            let parent = f.parent().unwrap();
-            TargetLocation::ThisDirectory(parent.to_path_buf())
-        };
-        let aux_args =
-            make_compile_args(config,
-                              &aux_props,
-                              crate_type,
-                              &aux_testpaths.file,
-                              aux_output);
-        let auxres = compose_and_run(config,
-                                     &aux_testpaths,
-                                     aux_args,
-                                     Vec::new(),
-                                     config.compile_lib_path.to_str().unwrap(),
-                                     Some(aux_dir.to_str().unwrap()),
-                                     None);
-        if !auxres.status.success() {
-            fatal_proc_rec(
-                None,
-                &format!("auxiliary build of {:?} failed to compile: ",
-                        aux_testpaths.file.display()),
-                &auxres);
-        }
-
-        match &*config.target {
-            "arm-linux-androideabi"  | "aarch64-linux-android" => {
-                _arm_push_aux_shared_library(config, testpaths);
-            }
-            _ => {}
-        }
-    }
-
-    compose_and_run(config,
-                    testpaths,
-                    args,
-                    props.rustc_env.clone(),
-                    config.compile_lib_path.to_str().unwrap(),
-                    Some(aux_dir.to_str().unwrap()),
-                    input)
-}
-
-fn compose_and_run(config: &Config,
-                   testpaths: &TestPaths,
-                   ProcArgs{ args, prog }: ProcArgs,
-                   procenv: Vec<(String, String)> ,
-                   lib_path: &str,
-                   aux_path: Option<&str>,
-                   input: Option<String>) -> ProcRes {
-    return program_output(config, testpaths, lib_path,
-                          prog, aux_path, args, procenv, input);
-}
-
 enum TargetLocation {
     ThisFile(PathBuf),
     ThisDirectory(PathBuf),
 }
 
-fn make_compile_args(config: &Config,
-                     props: &TestProps,
-                     extras: Vec<String> ,
-                     input_file: &Path,
-                     output_file: TargetLocation)
-                     -> ProcArgs
-{
-    let target = if props.force_host {
-        &*config.host
-    } else {
-        &*config.target
-    };
-
-    // FIXME (#9639): This needs to handle non-utf8 paths
-    let mut args = vec!(input_file.to_str().unwrap().to_owned(),
-                        "-L".to_owned(),
-                        config.build_base.to_str().unwrap().to_owned(),
-                        format!("--target={}", target));
-
-    match config.mode {
-        CompileFail |
-        ParseFail |
-        Incremental => {
-            // If we are extracting and matching errors in the new
-            // fashion, then you want JSON mode. Old-skool error
-            // patterns still match the raw compiler output.
-            if props.error_patterns.is_empty() {
-                args.extend(["--error-format",
-                             "json",
-                             "-Z",
-                             "unstable-options"]
-                            .iter()
-                            .map(|s| s.to_string()));
-            }
-        }
-
-        RunFail |
-        RunPass |
-        RunPassValgrind |
-        Pretty |
-        DebugInfoGdb |
-        DebugInfoLldb |
-        Codegen |
-        Rustdoc |
-        RunMake |
-        CodegenUnits => {
-            // do not use JSON output
-        }
-    }
-
-    args.extend_from_slice(&extras);
-    if !props.no_prefer_dynamic {
-        args.push("-C".to_owned());
-        args.push("prefer-dynamic".to_owned());
-    }
-    let path = match output_file {
-        TargetLocation::ThisFile(path) => {
-            args.push("-o".to_owned());
-            path
-        }
-        TargetLocation::ThisDirectory(path) => {
-            args.push("--out-dir".to_owned());
-            path
-        }
-    };
-    args.push(path.to_str().unwrap().to_owned());
-    if props.force_host {
-        args.extend(split_maybe_args(&config.host_rustcflags));
-    } else {
-        args.extend(split_maybe_args(&config.target_rustcflags));
-    }
-    args.extend(props.compile_flags.iter().cloned());
-    return ProcArgs {
-        prog: config.rustc_path.to_str().unwrap().to_owned(),
-        args: args,
-    };
-}
-
-fn make_lib_name(config: &Config, auxfile: &Path, testpaths: &TestPaths) -> PathBuf {
-    // what we return here is not particularly important, as it
-    // happens; rustc ignores everything except for the directory.
-    let auxname = output_testname(auxfile);
-    aux_output_dir_name(config, testpaths).join(&auxname)
-}
-
-fn make_exe_name(config: &Config, testpaths: &TestPaths) -> PathBuf {
-    let mut f = output_base_name(config, testpaths);
-    // FIXME: This is using the host architecture exe suffix, not target!
-    if config.target == "asmjs-unknown-emscripten" {
-        let mut fname = f.file_name().unwrap().to_os_string();
-        fname.push(".js");
-        f.set_file_name(&fname);
-    } else if !env::consts::EXE_SUFFIX.is_empty() {
-        let mut fname = f.file_name().unwrap().to_os_string();
-        fname.push(env::consts::EXE_SUFFIX);
-        f.set_file_name(&fname);
-    }
-    f
-}
-
-fn make_run_args(config: &Config, props: &TestProps, testpaths: &TestPaths)
-                 -> ProcArgs {
-    // If we've got another tool to run under (valgrind),
-    // then split apart its command
-    let mut args = split_maybe_args(&config.runtool);
-
-    // If this is emscripten, then run tests under nodejs
-    if config.target == "asmjs-unknown-emscripten" {
-        args.push("nodejs".to_owned());
-    }
-
-    let exe_file = make_exe_name(config, testpaths);
-
-    // FIXME (#9639): This needs to handle non-utf8 paths
-    args.push(exe_file.to_str().unwrap().to_owned());
-
-    // Add the arguments in the run_flags directive
-    args.extend(split_maybe_args(&props.run_flags));
-
-    let prog = args.remove(0);
-    return ProcArgs {
-        prog: prog,
-        args: args,
-    };
-}
-
-fn split_maybe_args(argstr: &Option<String>) -> Vec<String> {
-    match *argstr {
-        Some(ref s) => {
-            s
-             .split(' ')
-             .filter_map(|s| {
-                 if s.chars().all(|c| c.is_whitespace()) {
-                     None
-                 } else {
-                     Some(s.to_owned())
-                 }
-             }).collect()
-        }
-        None => Vec::new()
-    }
-}
-
-fn program_output(config: &Config, testpaths: &TestPaths, lib_path: &str, prog: String,
-                  aux_path: Option<&str>, args: Vec<String>,
-                  env: Vec<(String, String)>,
-                  input: Option<String>) -> ProcRes {
-    let cmdline =
-        {
-            let cmdline = make_cmdline(lib_path,
-                                       &prog,
-                                       &args);
-            logv(config, format!("executing {}", cmdline));
-            cmdline
-        };
-    let procsrv::Result {
-        out,
-        err,
-        status
-    } = procsrv::run(lib_path,
-                     &prog,
-                     aux_path,
-                     &args,
-                     env,
-                     input).expect(&format!("failed to exec `{}`", prog));
-    dump_output(config, testpaths, &out, &err);
-    return ProcRes {
-        status: Status::Normal(status),
-        stdout: out,
-        stderr: err,
-        cmdline: cmdline,
-    };
-}
-
-fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
-    use util;
-
-    // Linux and mac don't require adjusting the library search path
-    if cfg!(unix) {
-        format!("{} {}", prog, args.join(" "))
-    } else {
-        // Build the LD_LIBRARY_PATH variable as it would be seen on the command line
-        // for diagnostic purposes
-        fn lib_path_cmd_prefix(path: &str) -> String {
-            format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
-        }
-
-        format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.join(" "))
-    }
-}
-
-fn dump_output(config: &Config, testpaths: &TestPaths, out: &str, err: &str) {
-    create_dir_racy(output_base_name(config, testpaths).parent().unwrap());
-    dump_output_file(config, testpaths, out, "out");
-    dump_output_file(config, testpaths, err, "err");
-    maybe_dump_to_stdout(config, out, err);
-}
-
-fn dump_output_file(config: &Config,
-                    testpaths: &TestPaths,
-                    out: &str,
-                    extension: &str) {
-    let outfile = make_out_name(config, testpaths, extension);
-    File::create(&outfile).unwrap().write_all(out.as_bytes()).unwrap();
-}
-
-fn make_out_name(config: &Config, testpaths: &TestPaths, extension: &str) -> PathBuf {
-    output_base_name(config, testpaths).with_extension(extension)
-}
-
-fn aux_output_dir_name(config: &Config, testpaths: &TestPaths) -> PathBuf {
-    let f = output_base_name(config, testpaths);
-    let mut fname = f.file_name().unwrap().to_os_string();
-    fname.push(&format!(".{}.libaux", config.mode));
-    f.with_file_name(&fname)
-}
-
-fn output_testname(filepath: &Path) -> PathBuf {
-    PathBuf::from(filepath.file_stem().unwrap())
-}
-
-/// Given a test path like `compile-fail/foo/bar.rs` Returns a name like
-///
-///     <output>/foo/bar-stage1
-fn output_base_name(config: &Config, testpaths: &TestPaths) -> PathBuf {
-    let dir = config.build_base.join(&testpaths.relative_dir);
-
-    // Note: The directory `dir` is created during `collect_tests_from_dir`
-    dir
-        .join(&output_testname(&testpaths.file))
-        .with_extension(&config.stage_id)
-}
-
-fn maybe_dump_to_stdout(config: &Config, out: &str, err: &str) {
-    if config.verbose {
-        println!("------{}------------------------------", "stdout");
-        println!("{}", out);
-        println!("------{}------------------------------", "stderr");
-        println!("{}", err);
-        println!("------------------------------------------");
-    }
-}
-
-fn error(revision: Option<&str>, err: &str) {
-    match revision {
-        Some(rev) => println!("\nerror in revision `{}`: {}", rev, err),
-        None => println!("\nerror: {}", err)
-    }
-}
-
-fn fatal(revision: Option<&str>, err: &str) -> ! {
-    error(revision, err); panic!();
-}
-
-fn fatal_proc_rec(revision: Option<&str>, err: &str, proc_res: &ProcRes) -> ! {
-    error(revision, err);
-    print!("\
-status: {}\n\
-command: {}\n\
-stdout:\n\
-------------------------------------------\n\
-{}\n\
-------------------------------------------\n\
-stderr:\n\
-------------------------------------------\n\
-{}\n\
-------------------------------------------\n\
-\n",
-             proc_res.status, proc_res.cmdline, proc_res.stdout,
-             proc_res.stderr);
-    panic!();
-}
-
-fn _arm_exec_compiled_test(config: &Config,
-                           props: &TestProps,
-                           testpaths: &TestPaths,
-                           env: Vec<(String, String)>)
-                           -> ProcRes {
-    let args = make_run_args(config, props, testpaths);
-    let cmdline = make_cmdline("",
-                               &args.prog,
-                               &args.args);
-
-    // get bare program string
-    let mut tvec: Vec<String> = args.prog
-                                    .split('/')
-                                    .map(str::to_owned)
-                                    .collect();
-    let prog_short = tvec.pop().unwrap();
-
-    // copy to target
-    let copy_result = procsrv::run("",
-                                   &config.adb_path,
-                                   None,
-                                   &[
-                                    "push".to_owned(),
-                                    args.prog.clone(),
-                                    config.adb_test_dir.clone()
-                                   ],
-                                   vec!(("".to_owned(), "".to_owned())),
-                                   Some("".to_owned()))
-        .expect(&format!("failed to exec `{}`", config.adb_path));
-
-    if config.verbose {
-        println!("push ({}) {} {} {}",
-                 config.target,
-                 args.prog,
-                 copy_result.out,
-                 copy_result.err);
-    }
-
-    logv(config, format!("executing ({}) {}", config.target, cmdline));
-
-    let mut runargs = Vec::new();
-
-    // run test via adb_run_wrapper
-    runargs.push("shell".to_owned());
-    for (key, val) in env {
-        runargs.push(format!("{}={}", key, val));
-    }
-    runargs.push(format!("{}/../adb_run_wrapper.sh", config.adb_test_dir));
-    runargs.push(format!("{}", config.adb_test_dir));
-    runargs.push(format!("{}", prog_short));
-
-    for tv in &args.args {
-        runargs.push(tv.to_owned());
-    }
-    procsrv::run("",
-                 &config.adb_path,
-                 None,
-                 &runargs,
-                 vec!(("".to_owned(), "".to_owned())), Some("".to_owned()))
-        .expect(&format!("failed to exec `{}`", config.adb_path));
-
-    // get exitcode of result
-    runargs = Vec::new();
-    runargs.push("shell".to_owned());
-    runargs.push("cat".to_owned());
-    runargs.push(format!("{}/{}.exitcode", config.adb_test_dir, prog_short));
-
-    let procsrv::Result{ out: exitcode_out, err: _, status: _ } =
-        procsrv::run("",
-                     &config.adb_path,
-                     None,
-                     &runargs,
-                     vec!(("".to_owned(), "".to_owned())),
-                     Some("".to_owned()))
-        .expect(&format!("failed to exec `{}`", config.adb_path));
-
-    let mut exitcode: i32 = 0;
-    for c in exitcode_out.chars() {
-        if !c.is_numeric() { break; }
-        exitcode = exitcode * 10 + match c {
-            '0' ... '9' => c as i32 - ('0' as i32),
-            _ => 101,
-        }
-    }
-
-    // get stdout of result
-    runargs = Vec::new();
-    runargs.push("shell".to_owned());
-    runargs.push("cat".to_owned());
-    runargs.push(format!("{}/{}.stdout", config.adb_test_dir, prog_short));
-
-    let procsrv::Result{ out: stdout_out, err: _, status: _ } =
-        procsrv::run("",
-                     &config.adb_path,
-                     None,
-                     &runargs,
-                     vec!(("".to_owned(), "".to_owned())),
-                     Some("".to_owned()))
-        .expect(&format!("failed to exec `{}`", config.adb_path));
-
-    // get stderr of result
-    runargs = Vec::new();
-    runargs.push("shell".to_owned());
-    runargs.push("cat".to_owned());
-    runargs.push(format!("{}/{}.stderr", config.adb_test_dir, prog_short));
-
-    let procsrv::Result{ out: stderr_out, err: _, status: _ } =
-        procsrv::run("",
-                     &config.adb_path,
-                     None,
-                     &runargs,
-                     vec!(("".to_owned(), "".to_owned())),
-                     Some("".to_owned()))
-        .expect(&format!("failed to exec `{}`", config.adb_path));
-
-    dump_output(config,
-                testpaths,
-                &stdout_out,
-                &stderr_out);
-
-    ProcRes {
-        status: Status::Parsed(exitcode),
-        stdout: stdout_out,
-        stderr: stderr_out,
-        cmdline: cmdline
-    }
-}
-
-fn _arm_push_aux_shared_library(config: &Config, testpaths: &TestPaths) {
-    let tdir = aux_output_dir_name(config, testpaths);
-
-    let dirs = fs::read_dir(&tdir).unwrap();
-    for file in dirs {
-        let file = file.unwrap().path();
-        if file.extension().and_then(|s| s.to_str()) == Some("so") {
-            // FIXME (#9639): This needs to handle non-utf8 paths
-            let copy_result = procsrv::run("",
-                                           &config.adb_path,
-                                           None,
-                                           &[
-                                            "push".to_owned(),
-                                            file.to_str()
-                                                .unwrap()
-                                                .to_owned(),
-                                            config.adb_test_dir.to_owned(),
-                                           ],
-                                           vec!(("".to_owned(),
-                                                 "".to_owned())),
-                                           Some("".to_owned()))
-                .expect(&format!("failed to exec `{}`", config.adb_path));
-
-            if config.verbose {
-                println!("push ({}) {:?} {} {}",
-                    config.target, file.display(),
-                    copy_result.out, copy_result.err);
-            }
-        }
-    }
-}
-
-// codegen tests (using FileCheck)
-
-fn compile_test_and_save_ir(config: &Config, props: &TestProps,
-                                 testpaths: &TestPaths) -> ProcRes {
-    let aux_dir = aux_output_dir_name(config, testpaths);
-    // FIXME (#9639): This needs to handle non-utf8 paths
-    let mut link_args = vec!("-L".to_owned(),
-                             aux_dir.to_str().unwrap().to_owned());
-    let llvm_args = vec!("--emit=llvm-ir".to_owned(),);
-    link_args.extend(llvm_args);
-    let args = make_compile_args(config,
-                                 props,
-                                 link_args,
-                                 &testpaths.file,
-                                 TargetLocation::ThisDirectory(
-                                     output_base_name(config, testpaths).parent()
-                                                                        .unwrap()
-                                                                        .to_path_buf()));
-    compose_and_run_compiler(config, props, testpaths, args, None)
-}
-
-fn check_ir_with_filecheck(config: &Config, testpaths: &TestPaths) -> ProcRes {
-    let irfile = output_base_name(config, testpaths).with_extension("ll");
-    let prog = config.llvm_filecheck.as_ref().unwrap();
-    let proc_args = ProcArgs {
-        // FIXME (#9639): This needs to handle non-utf8 paths
-        prog: prog.to_str().unwrap().to_owned(),
-        args: vec!(format!("-input-file={}", irfile.to_str().unwrap()),
-                   testpaths.file.to_str().unwrap().to_owned())
-    };
-    compose_and_run(config, testpaths, proc_args, Vec::new(), "", None, None)
-}
-
-fn run_codegen_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    assert!(props.revisions.is_empty(), "revisions not relevant here");
-
-    if config.llvm_filecheck.is_none() {
-        fatal(None, "missing --llvm-filecheck");
-    }
-
-    let mut proc_res = compile_test_and_save_ir(config, props, testpaths);
-    if !proc_res.status.success() {
-        fatal_proc_rec(None, "compilation failed!", &proc_res);
-    }
-
-    proc_res = check_ir_with_filecheck(config, testpaths);
-    if !proc_res.status.success() {
-        fatal_proc_rec(None,
-                       "verification with 'FileCheck' failed",
-                       &proc_res);
-    }
-}
-
-fn charset() -> &'static str {
-    // FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset
-    if cfg!(target_os = "bitrig") {
-        "auto"
-    } else if cfg!(target_os = "freebsd") {
-        "ISO-8859-1"
-    } else {
-        "UTF-8"
-    }
-}
-
-fn run_rustdoc_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    assert!(props.revisions.is_empty(), "revisions not relevant here");
-
-    let out_dir = output_base_name(config, testpaths);
-    let _ = fs::remove_dir_all(&out_dir);
-    create_dir_racy(&out_dir);
-
-    let proc_res = document(config, props, testpaths, &out_dir);
-    if !proc_res.status.success() {
-        fatal_proc_rec(None, "rustdoc failed!", &proc_res);
-    }
-    let root = find_rust_src_root(config).unwrap();
-
-    let res = cmd2procres(config,
-                          testpaths,
-                          Command::new(&config.docck_python)
-                                  .arg(root.join("src/etc/htmldocck.py"))
-                                  .arg(out_dir)
-                                  .arg(&testpaths.file));
-    if !res.status.success() {
-        fatal_proc_rec(None, "htmldocck failed!", &res);
-    }
-}
-
-fn run_codegen_units_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-
-    assert!(props.revisions.is_empty(), "revisions not relevant here");
-
-    let proc_res = compile_test(config, props, testpaths);
-
-    if !proc_res.status.success() {
-        fatal_proc_rec(None, "compilation failed!", &proc_res);
-    }
-
-    check_no_compiler_crash(None, &proc_res);
-
-    const PREFIX: &'static str = "TRANS_ITEM ";
-    const CGU_MARKER: &'static str = "@@";
-
-    let actual: Vec<TransItem> = proc_res
-        .stdout
-        .lines()
-        .filter(|line| line.starts_with(PREFIX))
-        .map(str_to_trans_item)
-        .collect();
-
-    let expected: Vec<TransItem> = errors::load_errors(&testpaths.file, None)
-        .iter()
-        .map(|e| str_to_trans_item(&e.msg[..]))
-        .collect();
-
-    let mut missing = Vec::new();
-    let mut wrong_cgus = Vec::new();
-
-    for expected_item in &expected {
-        let actual_item_with_same_name = actual.iter()
-                                               .find(|ti| ti.name == expected_item.name);
-
-        if let Some(actual_item) = actual_item_with_same_name {
-            if !expected_item.codegen_units.is_empty() {
-                // Also check for codegen units
-                if expected_item.codegen_units != actual_item.codegen_units {
-                    wrong_cgus.push((expected_item.clone(), actual_item.clone()));
-                }
-            }
-        } else {
-            missing.push(expected_item.string.clone());
-        }
-    }
-
-    let unexpected: Vec<_> =
-        actual.iter()
-              .filter(|acgu| !expected.iter().any(|ecgu| acgu.name == ecgu.name))
-              .map(|acgu| acgu.string.clone())
-              .collect();
-
-    if !missing.is_empty() {
-        missing.sort();
-
-        println!("\nThese items should have been contained but were not:\n");
-
-        for item in &missing {
-            println!("{}", item);
-        }
-
-        println!("\n");
-    }
-
-    if !unexpected.is_empty() {
-        let sorted = {
-            let mut sorted = unexpected.clone();
-            sorted.sort();
-            sorted
-        };
-
-        println!("\nThese items were contained but should not have been:\n");
-
-        for item in sorted {
-            println!("{}", item);
-        }
-
-        println!("\n");
-    }
-
-    if !wrong_cgus.is_empty() {
-        wrong_cgus.sort_by_key(|pair| pair.0.name.clone());
-        println!("\nThe following items were assigned to wrong codegen units:\n");
-
-        for &(ref expected_item, ref actual_item) in &wrong_cgus {
-            println!("{}", expected_item.name);
-            println!("  expected: {}", codegen_units_to_str(&expected_item.codegen_units));
-            println!("  actual:   {}", codegen_units_to_str(&actual_item.codegen_units));
-            println!("");
-        }
-    }
-
-    if !(missing.is_empty() && unexpected.is_empty() && wrong_cgus.is_empty())
-    {
-        panic!();
-    }
-
-    #[derive(Clone, Eq, PartialEq)]
-    struct TransItem {
-        name: String,
-        codegen_units: HashSet<String>,
-        string: String,
-    }
-
-    // [TRANS_ITEM] name [@@ (cgu)+]
-    fn str_to_trans_item(s: &str) -> TransItem {
-        let s = if s.starts_with(PREFIX) {
-            (&s[PREFIX.len()..]).trim()
-        } else {
-            s.trim()
-        };
-
-        let full_string = format!("{}{}", PREFIX, s.trim().to_owned());
-
-        let parts: Vec<&str> = s.split(CGU_MARKER)
-                                .map(str::trim)
-                                .filter(|s| !s.is_empty())
-                                .collect();
-
-        let name = parts[0].trim();
-
-        let cgus = if parts.len() > 1 {
-            let cgus_str = parts[1];
-
-            cgus_str.split(" ")
-                    .map(str::trim)
-                    .filter(|s| !s.is_empty())
-                    .map(str::to_owned)
-                    .collect()
-        }
-        else {
-            HashSet::new()
-        };
-
-        TransItem {
-            name: name.to_owned(),
-            codegen_units: cgus,
-            string: full_string,
-        }
-    }
-
-    fn codegen_units_to_str(cgus: &HashSet<String>) -> String
-    {
-        let mut cgus: Vec<_> = cgus.iter().collect();
-        cgus.sort();
-
-        let mut string = String::new();
-        for cgu in cgus {
-            string.push_str(&cgu[..]);
-            string.push_str(" ");
-        }
-
-        string
-    }
-}
-
-fn run_incremental_test(config: &Config, props: &TestProps, testpaths: &TestPaths) {
-    // Basic plan for a test incremental/foo/bar.rs:
-    // - load list of revisions pass1, fail2, pass3
-    //   - each should begin with `rpass`, `rfail`, or `cfail`
-    //   - if `rpass`, expect compile and execution to succeed
-    //   - if `cfail`, expect compilation to fail
-    //   - if `rfail`, expect execution to fail
-    // - create a directory build/foo/bar.incremental
-    // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass1
-    //   - because name of revision starts with "pass", expect success
-    // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C fail2
-    //   - because name of revision starts with "fail", expect an error
-    //   - load expected errors as usual, but filter for those that end in `[fail2]`
-    // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass3
-    //   - because name of revision starts with "pass", expect success
-    // - execute build/foo/bar.exe and save output
-    //
-    // FIXME -- use non-incremental mode as an oracle? That doesn't apply
-    // to #[rustc_dirty] and clean tests I guess
-
-    assert!(!props.revisions.is_empty(), "incremental tests require a list of revisions");
-
-    let output_base_name = output_base_name(config, testpaths);
-
-    // Create the incremental workproduct directory.
-    let incremental_dir = output_base_name.with_extension("incremental");
-    if incremental_dir.exists() {
-        fs::remove_dir_all(&incremental_dir).unwrap();
-    }
-    create_dir_racy(&incremental_dir);
-
-    if config.verbose {
-        print!("incremental_dir={}", incremental_dir.display());
-    }
-
-    for revision in &props.revisions {
-        let mut revision_props = props.clone();
-        revision_props.load_from(&testpaths.file, Some(&revision));
-
-        revision_props.compile_flags.extend(vec![
-            format!("-Z"),
-            format!("incremental={}", incremental_dir.display()),
-            format!("--cfg"),
-            format!("{}", revision),
-        ]);
-
-        if config.verbose {
-            print!("revision={:?} revision_props={:#?}", revision, revision_props);
-        }
-
-        if revision.starts_with("rpass") {
-            run_rpass_test_revision(config, &revision_props, testpaths, Some(&revision));
-        } else if revision.starts_with("rfail") {
-            run_rfail_test_revision(config, &revision_props, testpaths, Some(&revision));
-        } else if revision.starts_with("cfail") {
-            run_cfail_test_revision(config, &revision_props, testpaths, Some(&revision));
-        } else {
-            fatal(
-                Some(revision),
-                "revision name must begin with rpass, rfail, or cfail");
-        }
-    }
-}
-
-fn run_rmake_test(config: &Config, _props: &TestProps, testpaths: &TestPaths) {
-    // FIXME(#11094): we should fix these tests
-    if config.host != config.target {
-        return
-    }
-
-    let cwd = env::current_dir().unwrap();
-    let src_root = config.src_base.parent().unwrap().parent().unwrap()
-                                  .parent().unwrap();
-    let src_root = cwd.join(&src_root);
-
-    let tmpdir = cwd.join(output_base_name(config, testpaths));
-    if tmpdir.exists() {
-        aggressive_rm_rf(&tmpdir).unwrap();
-    }
-    create_dir_racy(&tmpdir);
-
-    let mut cmd = Command::new("make");
-    cmd.current_dir(&testpaths.file)
-       .env("TARGET", &config.target)
-       .env("PYTHON", &config.docck_python)
-       .env("S", src_root)
-       .env("RUST_BUILD_STAGE", &config.stage_id)
-       .env("RUSTC", cwd.join(&config.rustc_path))
-       .env("RUSTDOC", cwd.join(&config.rustdoc_path))
-       .env("TMPDIR", &tmpdir)
-       .env("LD_LIB_PATH_ENVVAR", procsrv::dylib_env_var())
-       .env("HOST_RPATH_DIR", cwd.join(&config.compile_lib_path))
-       .env("TARGET_RPATH_DIR", cwd.join(&config.run_lib_path))
-       .env("LLVM_COMPONENTS", &config.llvm_components)
-       .env("LLVM_CXXFLAGS", &config.llvm_cxxflags);
-
-    if config.target.contains("msvc") {
-        // We need to pass a path to `lib.exe`, so assume that `cc` is `cl.exe`
-        // and that `lib.exe` lives next to it.
-        let lib = Path::new(&config.cc).parent().unwrap().join("lib.exe");
-
-        // MSYS doesn't like passing flags of the form `/foo` as it thinks it's
-        // a path and instead passes `C:\msys64\foo`, so convert all
-        // `/`-arguments to MSVC here to `-` arguments.
-        let cflags = config.cflags.split(' ').map(|s| s.replace("/", "-"))
-                           .collect::<Vec<_>>().join(" ");
-
-        cmd.env("IS_MSVC", "1")
-           .env("MSVC_LIB", format!("'{}' -nologo", lib.display()))
-           .env("CC", format!("'{}' {}", config.cc, cflags))
-           .env("CXX", &config.cxx);
-    } else {
-        cmd.env("CC", format!("{} {}", config.cc, config.cflags))
-           .env("CXX", format!("{} {}", config.cxx, config.cflags));
-    }
-
-    let output = cmd.output().expect("failed to spawn `make`");
-    if !output.status.success() {
-        let res = ProcRes {
-            status: Status::Normal(output.status),
-            stdout: String::from_utf8_lossy(&output.stdout).into_owned(),
-            stderr: String::from_utf8_lossy(&output.stderr).into_owned(),
-            cmdline: format!("{:?}", cmd),
-        };
-        fatal_proc_rec(None, "make failed", &res);
-    }
-}
-
-fn aggressive_rm_rf(path: &Path) -> io::Result<()> {
-    for e in try!(path.read_dir()) {
-        let entry = try!(e);
-        let path = entry.path();
-        if try!(entry.file_type()).is_dir() {
-            try!(aggressive_rm_rf(&path));
-        } else {
-            // Remove readonly files as well on windows (by default we can't)
-            try!(fs::remove_file(&path).or_else(|e| {
-                if cfg!(windows) && e.kind() == io::ErrorKind::PermissionDenied {
-                    let mut meta = try!(entry.metadata()).permissions();
-                    meta.set_readonly(false);
-                    try!(fs::set_permissions(&path, meta));
-                    fs::remove_file(&path)
-                } else {
-                    Err(e)
-                }
-            }))
-        }
-    }
-    fs::remove_dir(path)
-}
-
-// Like std::fs::create_dir_all, except handles concurrent calls among multiple
-// threads or processes.
-fn create_dir_racy(path: &Path) {
-    match fs::create_dir(path) {
-        Ok(()) => return,
-        Err(ref e) if e.kind() == io::ErrorKind::AlreadyExists => return,
-        Err(ref e) if e.kind() == io::ErrorKind::NotFound => {}
-        Err(e) => panic!("failed to create dir {:?}: {}", path, e),
-    }
-    create_dir_racy(path.parent().unwrap());
-    match fs::create_dir(path) {
-        Ok(()) => {}
-        Err(ref e) if e.kind() == io::ErrorKind::AlreadyExists => {}
-        Err(e) => panic!("failed to create dir {:?}: {}", path, e),
-    }
-}

From 77ae7591a88a87f901cfd1e6a8a9e77a944a49b4 Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Mon, 25 Apr 2016 18:07:15 -0400
Subject: [PATCH 04/10] tweak incremental comment

---
 src/tools/compiletest/src/runtest.rs | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 14a4c74bcd4..98dfdb08a7f 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1937,19 +1937,19 @@ actual:\n\
 
     fn run_incremental_test(&self) {
         // Basic plan for a test incremental/foo/bar.rs:
-        // - load list of revisions pass1, fail2, pass3
-        //   - each should begin with `rpass`, `rfail`, or `cfail`
+        // - load list of revisions rpass1, cfail2, rpass3
+        //   - each should begin with `rpass`, `cfail`, or `cfail`
         //   - if `rpass`, expect compile and execution to succeed
         //   - if `cfail`, expect compilation to fail
         //   - if `rfail`, expect execution to fail
         // - create a directory build/foo/bar.incremental
-        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass1
-        //   - because name of revision starts with "pass", expect success
-        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C fail2
-        //   - because name of revision starts with "fail", expect an error
-        //   - load expected errors as usual, but filter for those that end in `[fail2]`
-        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C pass3
-        //   - because name of revision starts with "pass", expect success
+        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C rpass1
+        //   - because name of revision starts with "rpass", expect success
+        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C cfail2
+        //   - because name of revision starts with "cfail", expect an error
+        //   - load expected errors as usual, but filter for those that end in `[rfail2]`
+        // - compile foo/bar.rs with -Z incremental=.../foo/bar.incremental and -C rpass3
+        //   - because name of revision starts with "rpass", expect success
         // - execute build/foo/bar.exe and save output
         //
         // FIXME -- use non-incremental mode as an oracle? That doesn't apply

From fbc082dcc65d5bb37a4af09b731b01e860b8c5bf Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Tue, 26 Apr 2016 10:51:14 -0700
Subject: [PATCH 05/10] move auxiliary builds to a test-relative `aux`

Instead of finding aux-build files in `auxiliary`, we now search for an
`aux` directory relative to the test. So if your test is
`compile-fail/foo.rs`, we would look in `compile-fail/aux`.  Similarly,
we ignore the `aux` directory when searching for tets.
---
 .../aux/cgu_export_trait_method.rs            |  34 ++++
 .../aux/cgu_extern_closures.rs                |  33 ++++
 .../aux/cgu_generic_function.rs               |  37 ++++
 .../partitioning/aux/cgu_explicit_inlining.rs |  20 ++
 .../partitioning/aux/cgu_extern_drop_glue.rs  |  17 ++
 .../partitioning/aux/cgu_generic_function.rs  |  37 ++++
 .../aux/attr_plugin_test.rs                   |  31 +++
 .../aux/lint_for_crate.rs                     |  47 +++++
 .../aux/lint_group_plugin_test.rs             |  51 +++++
 .../aux/lint_plugin_test.rs                   |  48 +++++
 .../aux/macro_crate_MacroRulesTT.rs           |  26 +++
 .../aux/macro_crate_test.rs                   | 141 ++++++++++++++
 .../aux/macro_reexport_1.rs                   |  15 ++
 .../aux/rlib_crate_test.rs                    |  22 +++
 .../aux/use_from_trait_xc.rs                  |  41 ++++
 src/test/compile-fail/aux/allocator-dylib.rs  |  15 ++
 src/test/compile-fail/aux/allocator-dylib2.rs |  12 ++
 src/test/compile-fail/aux/allocator1.rs       |  16 ++
 src/test/compile-fail/aux/allocator2.rs       |  16 ++
 src/test/compile-fail/aux/allocator3.rs       |  19 ++
 src/test/compile-fail/aux/ambig_impl_2_lib.rs |  14 ++
 src/test/compile-fail/aux/cci_class.rs        |  24 +++
 src/test/compile-fail/aux/cci_class_5.rs      |  27 +++
 .../compile-fail/aux/changing-crates-a1.rs    |  13 ++
 .../compile-fail/aux/changing-crates-a2.rs    |  13 ++
 .../compile-fail/aux/changing-crates-b.rs     |  15 ++
 .../aux/coherence_copy_like_lib.rs            |  20 ++
 .../aux/coherence_inherent_cc_lib.rs          |  21 ++
 src/test/compile-fail/aux/coherence_lib.rs    |  25 +++
 .../compile-fail/aux/coherence_orphan_lib.rs  |  13 ++
 src/test/compile-fail/aux/const_fn_lib.rs     |  16 ++
 src/test/compile-fail/aux/crate_a1.rs         |  21 ++
 src/test/compile-fail/aux/crate_a2.rs         |  17 ++
 src/test/compile-fail/aux/crateresolve1-1.rs  |  15 ++
 src/test/compile-fail/aux/crateresolve1-2.rs  |  15 ++
 src/test/compile-fail/aux/crateresolve1-3.rs  |  15 ++
 .../aux/default_ty_param_cross_crate_crate.rs |  20 ++
 src/test/compile-fail/aux/deprecation-lint.rs |  90 +++++++++
 src/test/compile-fail/aux/empty-struct.rs     |  17 ++
 src/test/compile-fail/aux/go_trait.rs         |  53 ++++++
 .../compile-fail/aux/inherited_stability.rs   |  56 ++++++
 .../compile-fail/aux/internal_unstable.rs     | 102 ++++++++++
 src/test/compile-fail/aux/issue-19163.rs      |  16 ++
 src/test/compile-fail/aux/issue-21221-3.rs    |  29 +++
 src/test/compile-fail/aux/issue-21221-4.rs    |  22 +++
 src/test/compile-fail/aux/issue-29181.rs      |  15 ++
 src/test/compile-fail/aux/issue-30535.rs      |  15 ++
 src/test/compile-fail/aux/issue_11680.rs      |  19 ++
 src/test/compile-fail/aux/issue_12612_1.rs    |  13 ++
 src/test/compile-fail/aux/issue_16725.rs      |  13 ++
 .../aux/issue_17718_const_privacy.rs          |  18 ++
 src/test/compile-fail/aux/issue_21202.rs      |  16 ++
 src/test/compile-fail/aux/issue_30123_aux.rs  |  33 ++++
 src/test/compile-fail/aux/issue_3907.rs       |  13 ++
 src/test/compile-fail/aux/issue_5844_aux.rs   |  17 ++
 .../lifetime_bound_will_change_warning_lib.rs |  21 ++
 .../compile-fail/aux/lint_output_format.rs    |  30 +++
 src/test/compile-fail/aux/lint_stability.rs   | 179 ++++++++++++++++++
 .../compile-fail/aux/lint_stability_fields.rs |  61 ++++++
 .../aux/lint_unused_extern_crate.rs           |  11 ++
 .../aux/macro_crate_nonterminal.rs            |  22 +++
 .../compile-fail/aux/macro_non_reexport_2.rs  |  19 ++
 src/test/compile-fail/aux/macro_reexport_1.rs |  15 ++
 src/test/compile-fail/aux/namespaced_enums.rs |  20 ++
 src/test/compile-fail/aux/needs_allocator.rs  |  16 ++
 .../aux/no_method_suggested_traits.rs         |  46 +++++
 src/test/compile-fail/aux/noexporttypelib.rs  |  12 ++
 .../aux/orphan_check_diagnostics.rs           |  11 ++
 .../compile-fail/aux/privacy_tuple_struct.rs  |  14 ++
 src/test/compile-fail/aux/private_trait_xc.rs |  11 ++
 src/test/compile-fail/aux/pub_static_array.rs |  11 ++
 .../compile-fail/aux/rbmtp_cross_crate_lib.rs |  42 ++++
 .../aux/stability_attribute_issue.rs          |  19 ++
 src/test/compile-fail/aux/stability_cfg1.rs   |  13 ++
 src/test/compile-fail/aux/stability_cfg2.rs   |  15 ++
 .../aux/static_priv_by_default.rs             |  61 ++++++
 .../compile-fail/aux/struct_field_privacy.rs  |  19 ++
 .../aux/struct_variant_privacy.rs             |  13 ++
 src/test/compile-fail/aux/svh-a-base.rs       |  35 ++++
 src/test/compile-fail/aux/svh-a-change-lit.rs |  35 ++++
 .../aux/svh-a-change-significant-cfg.rs       |  37 ++++
 .../aux/svh-a-change-trait-bound.rs           |  35 ++++
 .../compile-fail/aux/svh-a-change-type-arg.rs |  35 ++++
 .../compile-fail/aux/svh-a-change-type-ret.rs |  35 ++++
 .../aux/svh-a-change-type-static.rs           |  36 ++++
 src/test/compile-fail/aux/svh-b.rs            |  23 +++
 src/test/compile-fail/aux/svh-uta-base.rs     |  32 ++++
 .../aux/svh-uta-change-use-trait.rs           |  32 ++++
 src/test/compile-fail/aux/svh-utb.rs          |  22 +++
 .../compile-fail/aux/tdticc_coherence_lib.rs  |  17 ++
 .../trait_bounds_on_structs_and_enums_xc.rs   |  23 +++
 .../compile-fail/aux/trait_impl_conflict.rs   |  15 ++
 src/test/compile-fail/aux/trait_safety_lib.rs |  19 ++
 .../aux/trait_superkinds_in_metadata.rs       |  18 ++
 src/test/compile-fail/aux/two_macros.rs       |  15 ++
 .../compile-fail/aux/unreachable_variant.rs   |  15 ++
 .../compile-fail/aux/use_from_trait_xc.rs     |  41 ++++
 .../compile-fail/aux/variant-namespacing.rs   |  15 ++
 src/test/compile-fail/aux/weak-lang-items.rs  |  32 ++++
 .../compile-fail/aux/xc_private_method_lib.rs |  43 +++++
 .../compile-fail/aux/xcrate_unit_struct.rs    |  38 ++++
 .../privacy/restricted/aux/pub_restricted.rs  |  23 +++
 .../cross_crate_debuginfo_type_uniquing.rs    |  26 +++
 src/test/debuginfo/aux/cross_crate_spans.rs   |  29 +++
 src/test/debuginfo/aux/issue13213aux.rs       |  29 +++
 .../aux/custom_derive_plugin.rs               |  78 ++++++++
 .../aux/custom_derive_plugin_attr.rs          |  91 +++++++++
 .../run-pass-fulldeps/aux/dummy_mir_pass.rs   |  55 ++++++
 .../run-pass-fulldeps/aux/issue-13560-1.rs    |  13 ++
 .../run-pass-fulldeps/aux/issue-13560-2.rs    |  13 ++
 .../run-pass-fulldeps/aux/issue-13560-3.rs    |  16 ++
 src/test/run-pass-fulldeps/aux/issue-16822.rs |  30 +++
 src/test/run-pass-fulldeps/aux/issue-18502.rs |  31 +++
 .../issue_16723_multiple_items_syntax_ext.rs  |  36 ++++
 .../aux/linkage-visibility.rs                 |  45 +++++
 .../run-pass-fulldeps/aux/lint_for_crate.rs   |  47 +++++
 .../aux/lint_group_plugin_test.rs             |  51 +++++
 .../run-pass-fulldeps/aux/lint_plugin_test.rs |  48 +++++
 .../run-pass-fulldeps/aux/llvm_pass_plugin.rs |  29 +++
 .../aux/logging_right_crate.rs                |  18 ++
 .../aux/lto-syntax-extension-lib.rs           |  15 ++
 .../aux/lto-syntax-extension-plugin.rs        |  22 +++
 .../run-pass-fulldeps/aux/macro_crate_test.rs | 141 ++++++++++++++
 src/test/run-pass-fulldeps/aux/plugin_args.rs |  52 +++++
 .../plugin_crate_outlive_expansion_phase.rs   |  35 ++++
 .../aux/plugin_with_plugin_lib.rs             |  23 +++
 .../aux/procedural_mbe_matching.rs            |  70 +++++++
 .../run-pass-fulldeps/aux/roman_numerals.rs   |  79 ++++++++
 .../aux/syntax_extension_with_dll_deps_1.rs   |  17 ++
 .../aux/syntax_extension_with_dll_deps_2.rs   |  35 ++++
 src/test/run-pass/aux/allocator-dummy.rs      |  55 ++++++
 .../aux/anon-extern-mod-cross-crate-1.rs      |  19 ++
 .../aux/anon_trait_static_method_lib.rs       |  19 ++
 .../run-pass/aux/associated-const-cc-lib.rs   |  46 +++++
 .../run-pass/aux/associated-types-cc-lib.rs   |  26 +++
 .../run-pass/aux/augmented_assignments.rs     |  18 ++
 .../blind-item-mixed-crate-use-item-foo.rs    |  13 ++
 .../blind-item-mixed-crate-use-item-foo2.rs   |  13 ++
 src/test/run-pass/aux/cci_borrow_lib.rs       |  13 ++
 src/test/run-pass/aux/cci_capture_clause.rs   |  20 ++
 src/test/run-pass/aux/cci_class.rs            |  24 +++
 src/test/run-pass/aux/cci_class_2.rs          |  29 +++
 src/test/run-pass/aux/cci_class_3.rs          |  29 +++
 src/test/run-pass/aux/cci_class_4.rs          |  51 +++++
 src/test/run-pass/aux/cci_class_6.rs          |  35 ++++
 src/test/run-pass/aux/cci_class_cast.rs       |  60 ++++++
 src/test/run-pass/aux/cci_class_trait.rs      |  15 ++
 src/test/run-pass/aux/cci_const.rs            |  16 ++
 src/test/run-pass/aux/cci_const_block.rs      |  16 ++
 src/test/run-pass/aux/cci_impl_lib.rs         |  26 +++
 src/test/run-pass/aux/cci_intrinsic.rs        |  24 +++
 src/test/run-pass/aux/cci_iter_lib.rs         |  21 ++
 src/test/run-pass/aux/cci_nested_lib.rs       |  63 ++++++
 src/test/run-pass/aux/cci_no_inline_lib.rs    |  22 +++
 src/test/run-pass/aux/cfg_inner_static.rs     |  17 ++
 src/test/run-pass/aux/cgu_test.rs             |  16 ++
 src/test/run-pass/aux/cgu_test_a.rs           |  25 +++
 src/test/run-pass/aux/cgu_test_b.rs           |  25 +++
 .../check_static_recursion_foreign_helper.rs  |  21 ++
 .../run-pass/aux/coherence_copy_like_lib.rs   |  20 ++
 src/test/run-pass/aux/coherence_lib.rs        |  25 +++
 src/test/run-pass/aux/const_fn_lib.rs         |  16 ++
 .../aux/crate-attributes-using-cfg_attr.rs    |  16 ++
 .../aux/crate-method-reexport-grrrrrrr2.rs    |  41 ++++
 .../run-pass/aux/default_type_params_xc.rs    |  15 ++
 src/test/run-pass/aux/derive-no-std.rs        |  40 ++++
 src/test/run-pass/aux/empty-struct.rs         |  17 ++
 src/test/run-pass/aux/explicit_self_xcrate.rs |  25 +++
 .../run-pass/aux/extern-crosscrate-source.rs  |  41 ++++
 src/test/run-pass/aux/extern-take-value.rs    |  15 ++
 .../run-pass/aux/extern_calling_convention.rs |  36 ++++
 .../run-pass/aux/extern_mod_ordering_lib.rs   |  15 ++
 src/test/run-pass/aux/fat_drop.rs             |  23 +++
 src/test/run-pass/aux/fn-abi.rs               |  12 ++
 src/test/run-pass/aux/foreign_lib.rs          |  48 +++++
 src/test/run-pass/aux/go_trait.rs             |  53 ++++++
 src/test/run-pass/aux/i8.rs                   |  13 ++
 src/test/run-pass/aux/impl_privacy_xc_1.rs    |  19 ++
 src/test/run-pass/aux/impl_privacy_xc_2.rs    |  23 +++
 src/test/run-pass/aux/inline_dtor.rs          |  18 ++
 src/test/run-pass/aux/inner_static.rs         |  61 ++++++
 src/test/run-pass/aux/iss.rs                  |  22 +++
 src/test/run-pass/aux/issue-10028.rs          |  22 +++
 src/test/run-pass/aux/issue-11224.rs          |  26 +++
 src/test/run-pass/aux/issue-11225-1.rs        |  28 +++
 src/test/run-pass/aux/issue-11225-2.rs        |  38 ++++
 src/test/run-pass/aux/issue-11225-3.rs        |  38 ++++
 src/test/run-pass/aux/issue-11508.rs          |  20 ++
 src/test/run-pass/aux/issue-11529.rs          |  11 ++
 src/test/run-pass/aux/issue-12133-dylib.rs    |  11 ++
 src/test/run-pass/aux/issue-12133-dylib2.rs   |  16 ++
 src/test/run-pass/aux/issue-12133-rlib.rs     |  13 ++
 src/test/run-pass/aux/issue-12660-aux.rs      |  21 ++
 src/test/run-pass/aux/issue-13620-1.rs        |  19 ++
 src/test/run-pass/aux/issue-13620-2.rs        |  13 ++
 src/test/run-pass/aux/issue-13872-1.rs        |  11 ++
 src/test/run-pass/aux/issue-13872-2.rs        |  13 ++
 src/test/run-pass/aux/issue-13872-3.rs        |  19 ++
 src/test/run-pass/aux/issue-14344-1.rs        |  15 ++
 src/test/run-pass/aux/issue-14344-2.rs        |  13 ++
 src/test/run-pass/aux/issue-14421.rs          |  35 ++++
 src/test/run-pass/aux/issue-14422.rs          |  35 ++++
 src/test/run-pass/aux/issue-15562.rs          |  15 ++
 src/test/run-pass/aux/issue-16643.rs          |  29 +++
 src/test/run-pass/aux/issue-17662.rs          |  22 +++
 src/test/run-pass/aux/issue-17718-aux.rs      |  24 +++
 src/test/run-pass/aux/issue-18501.rs          |  27 +++
 src/test/run-pass/aux/issue-18514.rs          |  27 +++
 src/test/run-pass/aux/issue-18711.rs          |  16 ++
 src/test/run-pass/aux/issue-18913-1.rs        |  16 ++
 src/test/run-pass/aux/issue-18913-2.rs        |  16 ++
 src/test/run-pass/aux/issue-19340-1.rs        |  13 ++
 src/test/run-pass/aux/issue-2380.rs           |  26 +++
 src/test/run-pass/aux/issue-2414-a.rs         |  22 +++
 src/test/run-pass/aux/issue-2414-b.rs         |  15 ++
 src/test/run-pass/aux/issue-25185-1.rs        |  21 ++
 src/test/run-pass/aux/issue-25185-2.rs        |  13 ++
 src/test/run-pass/aux/issue-2526.rs           |  54 ++++++
 src/test/run-pass/aux/issue-25467.rs          |  20 ++
 src/test/run-pass/aux/issue-2631-a.rs         |  24 +++
 src/test/run-pass/aux/issue-29485.rs          |  26 +++
 src/test/run-pass/aux/issue-3012-1.rs         |  33 ++++
 src/test/run-pass/aux/issue-31702-1.rs        |  26 +++
 src/test/run-pass/aux/issue-31702-2.rs        |  30 +++
 src/test/run-pass/aux/issue-4208-cc.rs        |  20 ++
 src/test/run-pass/aux/issue-4545.rs           |  12 ++
 src/test/run-pass/aux/issue-5518.rs           |  14 ++
 src/test/run-pass/aux/issue-5521.rs           |  14 ++
 src/test/run-pass/aux/issue-7178.rs           |  17 ++
 src/test/run-pass/aux/issue-7899.rs           |  11 ++
 src/test/run-pass/aux/issue-8044.rs           |  25 +++
 src/test/run-pass/aux/issue-8259.rs           |  15 ++
 src/test/run-pass/aux/issue-9906.rs           |  25 +++
 src/test/run-pass/aux/issue-9968.rs           |  32 ++++
 src/test/run-pass/aux/issue13507.rs           |  99 ++++++++++
 src/test/run-pass/aux/issue2170lib.rs         |  28 +++
 src/test/run-pass/aux/issue_10031_aux.rs      |  11 ++
 src/test/run-pass/aux/issue_12612_1.rs        |  13 ++
 src/test/run-pass/aux/issue_12612_2.rs        |  11 ++
 src/test/run-pass/aux/issue_19293.rs          |  14 ++
 src/test/run-pass/aux/issue_20389.rs          |  14 ++
 src/test/run-pass/aux/issue_2316_a.rs         |  13 ++
 src/test/run-pass/aux/issue_2316_b.rs         |  21 ++
 src/test/run-pass/aux/issue_2472_b.rs         |  24 +++
 src/test/run-pass/aux/issue_2723_a.rs         |  14 ++
 src/test/run-pass/aux/issue_3136_a.rc         |  13 ++
 src/test/run-pass/aux/issue_3136_a.rs         |  24 +++
 src/test/run-pass/aux/issue_3979_traits.rs    |  25 +++
 src/test/run-pass/aux/issue_8401.rs           |  26 +++
 src/test/run-pass/aux/issue_9123.rs           |  19 ++
 src/test/run-pass/aux/issue_9155.rs           |  17 ++
 src/test/run-pass/aux/issue_9188.rs           |  23 +++
 src/test/run-pass/aux/kinds_in_metadata.rs    |  18 ++
 src/test/run-pass/aux/linkage1.rs             |  14 ++
 src/test/run-pass/aux/macro_crate_def_only.rs |  14 ++
 .../run-pass/aux/macro_crate_nonterminal.rs   |  22 +++
 .../run-pass/aux/macro_export_inner_module.rs |  16 ++
 src/test/run-pass/aux/macro_reexport_1.rs     |  15 ++
 src/test/run-pass/aux/macro_reexport_2.rs     |  16 ++
 .../run-pass/aux/macro_reexport_2_no_use.rs   |  16 ++
 src/test/run-pass/aux/macro_with_super_1.rs   |  26 +++
 src/test/run-pass/aux/method_self_arg1.rs     |  48 +++++
 src/test/run-pass/aux/method_self_arg2.rs     |  65 +++++++
 src/test/run-pass/aux/mir_external_refs.rs    |  28 +++
 .../run-pass/aux/moves_based_on_type_lib.rs   |  27 +++
 src/test/run-pass/aux/msvc-data-only-lib.rs   |  15 ++
 .../aux/namespaced_enum_emulate_flat.rs       |  35 ++++
 src/test/run-pass/aux/namespaced_enums.rs     |  20 ++
 src/test/run-pass/aux/nested_item.rs          |  40 ++++
 src/test/run-pass/aux/newtype_struct_xc.rs    |  13 ++
 .../run-pass/aux/overloaded_autoderef_xc.rs   |  40 ++++
 src/test/run-pass/aux/packed.rs               |  15 ++
 src/test/run-pass/aux/priv-impl-prim-ty.rs    |  19 ++
 src/test/run-pass/aux/privacy_reexport.rs     |  16 ++
 src/test/run-pass/aux/pub_use_mods_xcrate.rs  |  20 ++
 src/test/run-pass/aux/pub_use_xcrate1.rs      |  13 ++
 src/test/run-pass/aux/pub_use_xcrate2.rs      |  13 ++
 .../aux/reachable-unnameable-items.rs         | 116 ++++++++++++
 .../aux/reexport-should-still-link.rs         |  15 ++
 .../run-pass/aux/reexported_static_methods.rs |  53 ++++++
 src/test/run-pass/aux/sepcomp-extern-lib.rs   |  14 ++
 src/test/run-pass/aux/sepcomp_cci_lib.rs      |  16 ++
 src/test/run-pass/aux/sepcomp_lib.rs          |  31 +++
 .../aux/static-function-pointer-aux.rs        |  15 ++
 src/test/run-pass/aux/static-methods-crate.rs |  39 ++++
 .../run-pass/aux/static_fn_inline_xc_aux.rs   |  23 +++
 .../run-pass/aux/static_fn_trait_xc_aux.rs    |  21 ++
 src/test/run-pass/aux/static_mut_xc.rs        |  11 ++
 .../aux/struct_destructuring_cross_crate.rs   |  16 ++
 .../run-pass/aux/struct_variant_xc_aux.rs     |  18 ++
 src/test/run-pass/aux/svh-a-base.rs           |  35 ++++
 src/test/run-pass/aux/svh-a-comment.rs        |  36 ++++
 src/test/run-pass/aux/svh-a-doc.rs            |  38 ++++
 src/test/run-pass/aux/svh-a-macro.rs          |  37 ++++
 src/test/run-pass/aux/svh-a-no-change.rs      |  35 ++++
 src/test/run-pass/aux/svh-a-redundant-cfg.rs  |  37 ++++
 src/test/run-pass/aux/svh-a-whitespace.rs     |  37 ++++
 src/test/run-pass/aux/svh-b.rs                |  23 +++
 .../aux/thread-local-extern-static.rs         |  17 ++
 .../aux/trait_default_method_xc_aux.rs        |  50 +++++
 .../aux/trait_default_method_xc_aux_2.rs      |  27 +++
 .../aux/trait_inheritance_auto_xc_2_aux.rs    |  19 ++
 .../aux/trait_inheritance_auto_xc_aux.rs      |  17 ++
 ...ait_inheritance_cross_trait_call_xc_aux.rs |  22 +++
 .../aux/trait_inheritance_overloading_xc.rs   |  48 +++++
 src/test/run-pass/aux/trait_safety_lib.rs     |  19 ++
 .../aux/trait_superkinds_in_metadata.rs       |  18 ++
 src/test/run-pass/aux/traitimpl.rs            |  17 ++
 src/test/run-pass/aux/two_macros.rs           |  15 ++
 .../run-pass/aux/typeid-intrinsic-aux1.rs     |  34 ++++
 .../run-pass/aux/typeid-intrinsic-aux2.rs     |  34 ++++
 .../aux/unboxed-closures-cross-crate.rs       |  28 +++
 src/test/run-pass/aux/weak-lang-items.rs      |  32 ++++
 src/test/run-pass/aux/where_clauses_xc.rs     |  29 +++
 .../aux/xcrate-trait-lifetime-param.rs        |  13 ++
 .../aux/xcrate_address_insignificant.rs       |  18 ++
 .../aux/xcrate_associated_type_defaults.rs    |  22 +++
 .../run-pass/aux/xcrate_static_addresses.rs   |  27 +++
 .../run-pass/aux/xcrate_struct_aliases.rs     |  16 ++
 src/test/run-pass/aux/xcrate_unit_struct.rs   |  38 ++++
 .../aux/crate_with_invalid_spans.rs           |  30 +++
 .../aux}/crate_with_invalid_spans_macros.rs   |   0
 .../main.rs}                                  |   0
 .../aux/issue24687_lib.rs                     |  20 ++
 .../aux}/issue24687_mbcs_in_comments.rs       |   0
 .../main.rs}                                  |   0
 .../run-pass/specialization/aux/go_trait.rs   |  53 ++++++
 .../aux/specialization_cross_crate.rs         |  82 ++++++++
 .../specialization_cross_crate_defaults.rs    |  49 +++++
 src/test/rustdoc/aux/empty.rs                 |   9 +
 .../rustdoc/aux/inline-default-methods.rs     |  16 ++
 src/test/rustdoc/aux/issue-13698.rs           |  18 ++
 src/test/rustdoc/aux/issue-15318.rs           |  17 ++
 src/test/rustdoc/aux/issue-17476.rs           |  17 ++
 src/test/rustdoc/aux/issue-19190-3.rs         |  33 ++++
 src/test/rustdoc/aux/issue-20646.rs           |  17 ++
 src/test/rustdoc/aux/issue-20727.rs           |  40 ++++
 src/test/rustdoc/aux/issue-21092.rs           |  22 +++
 src/test/rustdoc/aux/issue-21801.rs           |  19 ++
 src/test/rustdoc/aux/issue-22025.rs           |  20 ++
 src/test/rustdoc/aux/issue-23207-1.rs         |  13 ++
 src/test/rustdoc/aux/issue-23207-2.rs         |  16 ++
 src/test/rustdoc/aux/issue-26606-macro.rs     |  14 ++
 src/test/rustdoc/aux/issue-27362.rs           |  22 +++
 src/test/rustdoc/aux/issue-28927-1.rs         |  12 ++
 src/test/rustdoc/aux/issue-28927-2.rs         |  11 ++
 src/test/rustdoc/aux/issue-29584.rs           |  20 ++
 src/test/rustdoc/aux/issue-30109-1.rs         |  11 ++
 src/test/rustdoc/aux/reexp_stripped.rs        |  21 ++
 src/test/rustdoc/aux/rustdoc-default-impl.rs  |  36 ++++
 .../aux/rustdoc-extern-default-method.rs      |  21 ++
 src/test/rustdoc/aux/rustdoc-extern-method.rs |  17 ++
 src/test/rustdoc/aux/rustdoc-ffi.rs           |  16 ++
 .../aux/rustdoc-impl-parts-crosscrate.rs      |  15 ++
 src/test/rustdoc/aux/variant-struct.rs        |  15 ++
 .../inline_cross/aux/rustdoc-hidden-sig.rs    |  22 +++
 .../aux/rustdoc-nonreachable-impls.rs         |  44 +++++
 src/tools/compiletest/src/header.rs           |   4 +-
 src/tools/compiletest/src/main.rs             |  78 ++++----
 src/tools/compiletest/src/runtest.rs          |  23 ++-
 360 files changed, 9641 insertions(+), 44 deletions(-)
 create mode 100644 src/test/codegen-units/item-collection/aux/cgu_export_trait_method.rs
 create mode 100644 src/test/codegen-units/item-collection/aux/cgu_extern_closures.rs
 create mode 100644 src/test/codegen-units/item-collection/aux/cgu_generic_function.rs
 create mode 100644 src/test/codegen-units/partitioning/aux/cgu_explicit_inlining.rs
 create mode 100644 src/test/codegen-units/partitioning/aux/cgu_extern_drop_glue.rs
 create mode 100644 src/test/codegen-units/partitioning/aux/cgu_generic_function.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/attr_plugin_test.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/lint_for_crate.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/lint_group_plugin_test.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/lint_plugin_test.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/macro_crate_MacroRulesTT.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/macro_crate_test.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/macro_reexport_1.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/rlib_crate_test.rs
 create mode 100644 src/test/compile-fail-fulldeps/aux/use_from_trait_xc.rs
 create mode 100644 src/test/compile-fail/aux/allocator-dylib.rs
 create mode 100644 src/test/compile-fail/aux/allocator-dylib2.rs
 create mode 100644 src/test/compile-fail/aux/allocator1.rs
 create mode 100644 src/test/compile-fail/aux/allocator2.rs
 create mode 100644 src/test/compile-fail/aux/allocator3.rs
 create mode 100644 src/test/compile-fail/aux/ambig_impl_2_lib.rs
 create mode 100644 src/test/compile-fail/aux/cci_class.rs
 create mode 100644 src/test/compile-fail/aux/cci_class_5.rs
 create mode 100644 src/test/compile-fail/aux/changing-crates-a1.rs
 create mode 100644 src/test/compile-fail/aux/changing-crates-a2.rs
 create mode 100644 src/test/compile-fail/aux/changing-crates-b.rs
 create mode 100644 src/test/compile-fail/aux/coherence_copy_like_lib.rs
 create mode 100644 src/test/compile-fail/aux/coherence_inherent_cc_lib.rs
 create mode 100644 src/test/compile-fail/aux/coherence_lib.rs
 create mode 100644 src/test/compile-fail/aux/coherence_orphan_lib.rs
 create mode 100644 src/test/compile-fail/aux/const_fn_lib.rs
 create mode 100644 src/test/compile-fail/aux/crate_a1.rs
 create mode 100644 src/test/compile-fail/aux/crate_a2.rs
 create mode 100644 src/test/compile-fail/aux/crateresolve1-1.rs
 create mode 100644 src/test/compile-fail/aux/crateresolve1-2.rs
 create mode 100644 src/test/compile-fail/aux/crateresolve1-3.rs
 create mode 100644 src/test/compile-fail/aux/default_ty_param_cross_crate_crate.rs
 create mode 100644 src/test/compile-fail/aux/deprecation-lint.rs
 create mode 100644 src/test/compile-fail/aux/empty-struct.rs
 create mode 100644 src/test/compile-fail/aux/go_trait.rs
 create mode 100644 src/test/compile-fail/aux/inherited_stability.rs
 create mode 100644 src/test/compile-fail/aux/internal_unstable.rs
 create mode 100644 src/test/compile-fail/aux/issue-19163.rs
 create mode 100644 src/test/compile-fail/aux/issue-21221-3.rs
 create mode 100644 src/test/compile-fail/aux/issue-21221-4.rs
 create mode 100644 src/test/compile-fail/aux/issue-29181.rs
 create mode 100644 src/test/compile-fail/aux/issue-30535.rs
 create mode 100644 src/test/compile-fail/aux/issue_11680.rs
 create mode 100644 src/test/compile-fail/aux/issue_12612_1.rs
 create mode 100644 src/test/compile-fail/aux/issue_16725.rs
 create mode 100644 src/test/compile-fail/aux/issue_17718_const_privacy.rs
 create mode 100644 src/test/compile-fail/aux/issue_21202.rs
 create mode 100644 src/test/compile-fail/aux/issue_30123_aux.rs
 create mode 100644 src/test/compile-fail/aux/issue_3907.rs
 create mode 100644 src/test/compile-fail/aux/issue_5844_aux.rs
 create mode 100644 src/test/compile-fail/aux/lifetime_bound_will_change_warning_lib.rs
 create mode 100644 src/test/compile-fail/aux/lint_output_format.rs
 create mode 100644 src/test/compile-fail/aux/lint_stability.rs
 create mode 100644 src/test/compile-fail/aux/lint_stability_fields.rs
 create mode 100644 src/test/compile-fail/aux/lint_unused_extern_crate.rs
 create mode 100644 src/test/compile-fail/aux/macro_crate_nonterminal.rs
 create mode 100644 src/test/compile-fail/aux/macro_non_reexport_2.rs
 create mode 100644 src/test/compile-fail/aux/macro_reexport_1.rs
 create mode 100644 src/test/compile-fail/aux/namespaced_enums.rs
 create mode 100644 src/test/compile-fail/aux/needs_allocator.rs
 create mode 100644 src/test/compile-fail/aux/no_method_suggested_traits.rs
 create mode 100644 src/test/compile-fail/aux/noexporttypelib.rs
 create mode 100644 src/test/compile-fail/aux/orphan_check_diagnostics.rs
 create mode 100644 src/test/compile-fail/aux/privacy_tuple_struct.rs
 create mode 100644 src/test/compile-fail/aux/private_trait_xc.rs
 create mode 100644 src/test/compile-fail/aux/pub_static_array.rs
 create mode 100644 src/test/compile-fail/aux/rbmtp_cross_crate_lib.rs
 create mode 100644 src/test/compile-fail/aux/stability_attribute_issue.rs
 create mode 100644 src/test/compile-fail/aux/stability_cfg1.rs
 create mode 100644 src/test/compile-fail/aux/stability_cfg2.rs
 create mode 100644 src/test/compile-fail/aux/static_priv_by_default.rs
 create mode 100644 src/test/compile-fail/aux/struct_field_privacy.rs
 create mode 100644 src/test/compile-fail/aux/struct_variant_privacy.rs
 create mode 100644 src/test/compile-fail/aux/svh-a-base.rs
 create mode 100644 src/test/compile-fail/aux/svh-a-change-lit.rs
 create mode 100644 src/test/compile-fail/aux/svh-a-change-significant-cfg.rs
 create mode 100644 src/test/compile-fail/aux/svh-a-change-trait-bound.rs
 create mode 100644 src/test/compile-fail/aux/svh-a-change-type-arg.rs
 create mode 100644 src/test/compile-fail/aux/svh-a-change-type-ret.rs
 create mode 100644 src/test/compile-fail/aux/svh-a-change-type-static.rs
 create mode 100644 src/test/compile-fail/aux/svh-b.rs
 create mode 100644 src/test/compile-fail/aux/svh-uta-base.rs
 create mode 100644 src/test/compile-fail/aux/svh-uta-change-use-trait.rs
 create mode 100644 src/test/compile-fail/aux/svh-utb.rs
 create mode 100644 src/test/compile-fail/aux/tdticc_coherence_lib.rs
 create mode 100644 src/test/compile-fail/aux/trait_bounds_on_structs_and_enums_xc.rs
 create mode 100644 src/test/compile-fail/aux/trait_impl_conflict.rs
 create mode 100644 src/test/compile-fail/aux/trait_safety_lib.rs
 create mode 100644 src/test/compile-fail/aux/trait_superkinds_in_metadata.rs
 create mode 100644 src/test/compile-fail/aux/two_macros.rs
 create mode 100644 src/test/compile-fail/aux/unreachable_variant.rs
 create mode 100644 src/test/compile-fail/aux/use_from_trait_xc.rs
 create mode 100644 src/test/compile-fail/aux/variant-namespacing.rs
 create mode 100644 src/test/compile-fail/aux/weak-lang-items.rs
 create mode 100644 src/test/compile-fail/aux/xc_private_method_lib.rs
 create mode 100644 src/test/compile-fail/aux/xcrate_unit_struct.rs
 create mode 100644 src/test/compile-fail/privacy/restricted/aux/pub_restricted.rs
 create mode 100644 src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs
 create mode 100644 src/test/debuginfo/aux/cross_crate_spans.rs
 create mode 100644 src/test/debuginfo/aux/issue13213aux.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/custom_derive_plugin.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/custom_derive_plugin_attr.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/dummy_mir_pass.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/issue-13560-1.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/issue-13560-2.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/issue-13560-3.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/issue-16822.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/issue-18502.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/issue_16723_multiple_items_syntax_ext.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/linkage-visibility.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/lint_for_crate.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/lint_group_plugin_test.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/lint_plugin_test.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/llvm_pass_plugin.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/logging_right_crate.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/lto-syntax-extension-lib.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/lto-syntax-extension-plugin.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/macro_crate_test.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/plugin_args.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/plugin_crate_outlive_expansion_phase.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/plugin_with_plugin_lib.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/procedural_mbe_matching.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/roman_numerals.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_1.rs
 create mode 100644 src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_2.rs
 create mode 100644 src/test/run-pass/aux/allocator-dummy.rs
 create mode 100644 src/test/run-pass/aux/anon-extern-mod-cross-crate-1.rs
 create mode 100644 src/test/run-pass/aux/anon_trait_static_method_lib.rs
 create mode 100644 src/test/run-pass/aux/associated-const-cc-lib.rs
 create mode 100644 src/test/run-pass/aux/associated-types-cc-lib.rs
 create mode 100644 src/test/run-pass/aux/augmented_assignments.rs
 create mode 100644 src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo.rs
 create mode 100644 src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo2.rs
 create mode 100644 src/test/run-pass/aux/cci_borrow_lib.rs
 create mode 100644 src/test/run-pass/aux/cci_capture_clause.rs
 create mode 100644 src/test/run-pass/aux/cci_class.rs
 create mode 100644 src/test/run-pass/aux/cci_class_2.rs
 create mode 100644 src/test/run-pass/aux/cci_class_3.rs
 create mode 100644 src/test/run-pass/aux/cci_class_4.rs
 create mode 100644 src/test/run-pass/aux/cci_class_6.rs
 create mode 100644 src/test/run-pass/aux/cci_class_cast.rs
 create mode 100644 src/test/run-pass/aux/cci_class_trait.rs
 create mode 100644 src/test/run-pass/aux/cci_const.rs
 create mode 100644 src/test/run-pass/aux/cci_const_block.rs
 create mode 100644 src/test/run-pass/aux/cci_impl_lib.rs
 create mode 100644 src/test/run-pass/aux/cci_intrinsic.rs
 create mode 100644 src/test/run-pass/aux/cci_iter_lib.rs
 create mode 100644 src/test/run-pass/aux/cci_nested_lib.rs
 create mode 100644 src/test/run-pass/aux/cci_no_inline_lib.rs
 create mode 100644 src/test/run-pass/aux/cfg_inner_static.rs
 create mode 100644 src/test/run-pass/aux/cgu_test.rs
 create mode 100644 src/test/run-pass/aux/cgu_test_a.rs
 create mode 100644 src/test/run-pass/aux/cgu_test_b.rs
 create mode 100644 src/test/run-pass/aux/check_static_recursion_foreign_helper.rs
 create mode 100644 src/test/run-pass/aux/coherence_copy_like_lib.rs
 create mode 100644 src/test/run-pass/aux/coherence_lib.rs
 create mode 100644 src/test/run-pass/aux/const_fn_lib.rs
 create mode 100644 src/test/run-pass/aux/crate-attributes-using-cfg_attr.rs
 create mode 100644 src/test/run-pass/aux/crate-method-reexport-grrrrrrr2.rs
 create mode 100644 src/test/run-pass/aux/default_type_params_xc.rs
 create mode 100644 src/test/run-pass/aux/derive-no-std.rs
 create mode 100644 src/test/run-pass/aux/empty-struct.rs
 create mode 100644 src/test/run-pass/aux/explicit_self_xcrate.rs
 create mode 100644 src/test/run-pass/aux/extern-crosscrate-source.rs
 create mode 100644 src/test/run-pass/aux/extern-take-value.rs
 create mode 100644 src/test/run-pass/aux/extern_calling_convention.rs
 create mode 100644 src/test/run-pass/aux/extern_mod_ordering_lib.rs
 create mode 100644 src/test/run-pass/aux/fat_drop.rs
 create mode 100644 src/test/run-pass/aux/fn-abi.rs
 create mode 100644 src/test/run-pass/aux/foreign_lib.rs
 create mode 100644 src/test/run-pass/aux/go_trait.rs
 create mode 100644 src/test/run-pass/aux/i8.rs
 create mode 100644 src/test/run-pass/aux/impl_privacy_xc_1.rs
 create mode 100644 src/test/run-pass/aux/impl_privacy_xc_2.rs
 create mode 100644 src/test/run-pass/aux/inline_dtor.rs
 create mode 100644 src/test/run-pass/aux/inner_static.rs
 create mode 100644 src/test/run-pass/aux/iss.rs
 create mode 100644 src/test/run-pass/aux/issue-10028.rs
 create mode 100644 src/test/run-pass/aux/issue-11224.rs
 create mode 100644 src/test/run-pass/aux/issue-11225-1.rs
 create mode 100644 src/test/run-pass/aux/issue-11225-2.rs
 create mode 100644 src/test/run-pass/aux/issue-11225-3.rs
 create mode 100644 src/test/run-pass/aux/issue-11508.rs
 create mode 100644 src/test/run-pass/aux/issue-11529.rs
 create mode 100644 src/test/run-pass/aux/issue-12133-dylib.rs
 create mode 100644 src/test/run-pass/aux/issue-12133-dylib2.rs
 create mode 100644 src/test/run-pass/aux/issue-12133-rlib.rs
 create mode 100644 src/test/run-pass/aux/issue-12660-aux.rs
 create mode 100644 src/test/run-pass/aux/issue-13620-1.rs
 create mode 100644 src/test/run-pass/aux/issue-13620-2.rs
 create mode 100644 src/test/run-pass/aux/issue-13872-1.rs
 create mode 100644 src/test/run-pass/aux/issue-13872-2.rs
 create mode 100644 src/test/run-pass/aux/issue-13872-3.rs
 create mode 100644 src/test/run-pass/aux/issue-14344-1.rs
 create mode 100644 src/test/run-pass/aux/issue-14344-2.rs
 create mode 100644 src/test/run-pass/aux/issue-14421.rs
 create mode 100644 src/test/run-pass/aux/issue-14422.rs
 create mode 100644 src/test/run-pass/aux/issue-15562.rs
 create mode 100644 src/test/run-pass/aux/issue-16643.rs
 create mode 100644 src/test/run-pass/aux/issue-17662.rs
 create mode 100644 src/test/run-pass/aux/issue-17718-aux.rs
 create mode 100644 src/test/run-pass/aux/issue-18501.rs
 create mode 100644 src/test/run-pass/aux/issue-18514.rs
 create mode 100644 src/test/run-pass/aux/issue-18711.rs
 create mode 100644 src/test/run-pass/aux/issue-18913-1.rs
 create mode 100644 src/test/run-pass/aux/issue-18913-2.rs
 create mode 100644 src/test/run-pass/aux/issue-19340-1.rs
 create mode 100644 src/test/run-pass/aux/issue-2380.rs
 create mode 100644 src/test/run-pass/aux/issue-2414-a.rs
 create mode 100644 src/test/run-pass/aux/issue-2414-b.rs
 create mode 100644 src/test/run-pass/aux/issue-25185-1.rs
 create mode 100644 src/test/run-pass/aux/issue-25185-2.rs
 create mode 100644 src/test/run-pass/aux/issue-2526.rs
 create mode 100644 src/test/run-pass/aux/issue-25467.rs
 create mode 100644 src/test/run-pass/aux/issue-2631-a.rs
 create mode 100644 src/test/run-pass/aux/issue-29485.rs
 create mode 100644 src/test/run-pass/aux/issue-3012-1.rs
 create mode 100644 src/test/run-pass/aux/issue-31702-1.rs
 create mode 100644 src/test/run-pass/aux/issue-31702-2.rs
 create mode 100644 src/test/run-pass/aux/issue-4208-cc.rs
 create mode 100644 src/test/run-pass/aux/issue-4545.rs
 create mode 100644 src/test/run-pass/aux/issue-5518.rs
 create mode 100644 src/test/run-pass/aux/issue-5521.rs
 create mode 100644 src/test/run-pass/aux/issue-7178.rs
 create mode 100644 src/test/run-pass/aux/issue-7899.rs
 create mode 100644 src/test/run-pass/aux/issue-8044.rs
 create mode 100644 src/test/run-pass/aux/issue-8259.rs
 create mode 100644 src/test/run-pass/aux/issue-9906.rs
 create mode 100644 src/test/run-pass/aux/issue-9968.rs
 create mode 100644 src/test/run-pass/aux/issue13507.rs
 create mode 100644 src/test/run-pass/aux/issue2170lib.rs
 create mode 100644 src/test/run-pass/aux/issue_10031_aux.rs
 create mode 100644 src/test/run-pass/aux/issue_12612_1.rs
 create mode 100644 src/test/run-pass/aux/issue_12612_2.rs
 create mode 100644 src/test/run-pass/aux/issue_19293.rs
 create mode 100644 src/test/run-pass/aux/issue_20389.rs
 create mode 100644 src/test/run-pass/aux/issue_2316_a.rs
 create mode 100644 src/test/run-pass/aux/issue_2316_b.rs
 create mode 100644 src/test/run-pass/aux/issue_2472_b.rs
 create mode 100644 src/test/run-pass/aux/issue_2723_a.rs
 create mode 100644 src/test/run-pass/aux/issue_3136_a.rc
 create mode 100644 src/test/run-pass/aux/issue_3136_a.rs
 create mode 100644 src/test/run-pass/aux/issue_3979_traits.rs
 create mode 100644 src/test/run-pass/aux/issue_8401.rs
 create mode 100644 src/test/run-pass/aux/issue_9123.rs
 create mode 100644 src/test/run-pass/aux/issue_9155.rs
 create mode 100644 src/test/run-pass/aux/issue_9188.rs
 create mode 100644 src/test/run-pass/aux/kinds_in_metadata.rs
 create mode 100644 src/test/run-pass/aux/linkage1.rs
 create mode 100644 src/test/run-pass/aux/macro_crate_def_only.rs
 create mode 100644 src/test/run-pass/aux/macro_crate_nonterminal.rs
 create mode 100644 src/test/run-pass/aux/macro_export_inner_module.rs
 create mode 100644 src/test/run-pass/aux/macro_reexport_1.rs
 create mode 100644 src/test/run-pass/aux/macro_reexport_2.rs
 create mode 100644 src/test/run-pass/aux/macro_reexport_2_no_use.rs
 create mode 100644 src/test/run-pass/aux/macro_with_super_1.rs
 create mode 100644 src/test/run-pass/aux/method_self_arg1.rs
 create mode 100644 src/test/run-pass/aux/method_self_arg2.rs
 create mode 100644 src/test/run-pass/aux/mir_external_refs.rs
 create mode 100644 src/test/run-pass/aux/moves_based_on_type_lib.rs
 create mode 100644 src/test/run-pass/aux/msvc-data-only-lib.rs
 create mode 100644 src/test/run-pass/aux/namespaced_enum_emulate_flat.rs
 create mode 100644 src/test/run-pass/aux/namespaced_enums.rs
 create mode 100644 src/test/run-pass/aux/nested_item.rs
 create mode 100644 src/test/run-pass/aux/newtype_struct_xc.rs
 create mode 100644 src/test/run-pass/aux/overloaded_autoderef_xc.rs
 create mode 100644 src/test/run-pass/aux/packed.rs
 create mode 100644 src/test/run-pass/aux/priv-impl-prim-ty.rs
 create mode 100644 src/test/run-pass/aux/privacy_reexport.rs
 create mode 100644 src/test/run-pass/aux/pub_use_mods_xcrate.rs
 create mode 100644 src/test/run-pass/aux/pub_use_xcrate1.rs
 create mode 100644 src/test/run-pass/aux/pub_use_xcrate2.rs
 create mode 100644 src/test/run-pass/aux/reachable-unnameable-items.rs
 create mode 100644 src/test/run-pass/aux/reexport-should-still-link.rs
 create mode 100644 src/test/run-pass/aux/reexported_static_methods.rs
 create mode 100644 src/test/run-pass/aux/sepcomp-extern-lib.rs
 create mode 100644 src/test/run-pass/aux/sepcomp_cci_lib.rs
 create mode 100644 src/test/run-pass/aux/sepcomp_lib.rs
 create mode 100644 src/test/run-pass/aux/static-function-pointer-aux.rs
 create mode 100644 src/test/run-pass/aux/static-methods-crate.rs
 create mode 100644 src/test/run-pass/aux/static_fn_inline_xc_aux.rs
 create mode 100644 src/test/run-pass/aux/static_fn_trait_xc_aux.rs
 create mode 100644 src/test/run-pass/aux/static_mut_xc.rs
 create mode 100644 src/test/run-pass/aux/struct_destructuring_cross_crate.rs
 create mode 100644 src/test/run-pass/aux/struct_variant_xc_aux.rs
 create mode 100644 src/test/run-pass/aux/svh-a-base.rs
 create mode 100644 src/test/run-pass/aux/svh-a-comment.rs
 create mode 100644 src/test/run-pass/aux/svh-a-doc.rs
 create mode 100644 src/test/run-pass/aux/svh-a-macro.rs
 create mode 100644 src/test/run-pass/aux/svh-a-no-change.rs
 create mode 100644 src/test/run-pass/aux/svh-a-redundant-cfg.rs
 create mode 100644 src/test/run-pass/aux/svh-a-whitespace.rs
 create mode 100644 src/test/run-pass/aux/svh-b.rs
 create mode 100644 src/test/run-pass/aux/thread-local-extern-static.rs
 create mode 100644 src/test/run-pass/aux/trait_default_method_xc_aux.rs
 create mode 100644 src/test/run-pass/aux/trait_default_method_xc_aux_2.rs
 create mode 100644 src/test/run-pass/aux/trait_inheritance_auto_xc_2_aux.rs
 create mode 100644 src/test/run-pass/aux/trait_inheritance_auto_xc_aux.rs
 create mode 100644 src/test/run-pass/aux/trait_inheritance_cross_trait_call_xc_aux.rs
 create mode 100644 src/test/run-pass/aux/trait_inheritance_overloading_xc.rs
 create mode 100644 src/test/run-pass/aux/trait_safety_lib.rs
 create mode 100644 src/test/run-pass/aux/trait_superkinds_in_metadata.rs
 create mode 100644 src/test/run-pass/aux/traitimpl.rs
 create mode 100644 src/test/run-pass/aux/two_macros.rs
 create mode 100644 src/test/run-pass/aux/typeid-intrinsic-aux1.rs
 create mode 100644 src/test/run-pass/aux/typeid-intrinsic-aux2.rs
 create mode 100644 src/test/run-pass/aux/unboxed-closures-cross-crate.rs
 create mode 100644 src/test/run-pass/aux/weak-lang-items.rs
 create mode 100644 src/test/run-pass/aux/where_clauses_xc.rs
 create mode 100644 src/test/run-pass/aux/xcrate-trait-lifetime-param.rs
 create mode 100644 src/test/run-pass/aux/xcrate_address_insignificant.rs
 create mode 100644 src/test/run-pass/aux/xcrate_associated_type_defaults.rs
 create mode 100644 src/test/run-pass/aux/xcrate_static_addresses.rs
 create mode 100644 src/test/run-pass/aux/xcrate_struct_aliases.rs
 create mode 100644 src/test/run-pass/aux/xcrate_unit_struct.rs
 create mode 100644 src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans.rs
 rename src/test/{auxiliary => run-pass/import-crate-with-invalid-spans/aux}/crate_with_invalid_spans_macros.rs (100%)
 rename src/test/run-pass/{import-crate-with-invalid-spans.rs => import-crate-with-invalid-spans/main.rs} (100%)
 create mode 100644 src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_lib.rs
 rename src/test/{auxiliary => run-pass/issue24687-embed-debuginfo/aux}/issue24687_mbcs_in_comments.rs (100%)
 rename src/test/run-pass/{issue24687-embed-debuginfo.rs => issue24687-embed-debuginfo/main.rs} (100%)
 create mode 100644 src/test/run-pass/specialization/aux/go_trait.rs
 create mode 100644 src/test/run-pass/specialization/aux/specialization_cross_crate.rs
 create mode 100644 src/test/run-pass/specialization/aux/specialization_cross_crate_defaults.rs
 create mode 100644 src/test/rustdoc/aux/empty.rs
 create mode 100644 src/test/rustdoc/aux/inline-default-methods.rs
 create mode 100644 src/test/rustdoc/aux/issue-13698.rs
 create mode 100644 src/test/rustdoc/aux/issue-15318.rs
 create mode 100644 src/test/rustdoc/aux/issue-17476.rs
 create mode 100644 src/test/rustdoc/aux/issue-19190-3.rs
 create mode 100644 src/test/rustdoc/aux/issue-20646.rs
 create mode 100644 src/test/rustdoc/aux/issue-20727.rs
 create mode 100644 src/test/rustdoc/aux/issue-21092.rs
 create mode 100644 src/test/rustdoc/aux/issue-21801.rs
 create mode 100644 src/test/rustdoc/aux/issue-22025.rs
 create mode 100644 src/test/rustdoc/aux/issue-23207-1.rs
 create mode 100644 src/test/rustdoc/aux/issue-23207-2.rs
 create mode 100644 src/test/rustdoc/aux/issue-26606-macro.rs
 create mode 100644 src/test/rustdoc/aux/issue-27362.rs
 create mode 100644 src/test/rustdoc/aux/issue-28927-1.rs
 create mode 100644 src/test/rustdoc/aux/issue-28927-2.rs
 create mode 100644 src/test/rustdoc/aux/issue-29584.rs
 create mode 100644 src/test/rustdoc/aux/issue-30109-1.rs
 create mode 100644 src/test/rustdoc/aux/reexp_stripped.rs
 create mode 100644 src/test/rustdoc/aux/rustdoc-default-impl.rs
 create mode 100644 src/test/rustdoc/aux/rustdoc-extern-default-method.rs
 create mode 100644 src/test/rustdoc/aux/rustdoc-extern-method.rs
 create mode 100644 src/test/rustdoc/aux/rustdoc-ffi.rs
 create mode 100644 src/test/rustdoc/aux/rustdoc-impl-parts-crosscrate.rs
 create mode 100644 src/test/rustdoc/aux/variant-struct.rs
 create mode 100644 src/test/rustdoc/inline_cross/aux/rustdoc-hidden-sig.rs
 create mode 100644 src/test/rustdoc/inline_cross/aux/rustdoc-nonreachable-impls.rs

diff --git a/src/test/codegen-units/item-collection/aux/cgu_export_trait_method.rs b/src/test/codegen-units/item-collection/aux/cgu_export_trait_method.rs
new file mode 100644
index 00000000000..49b8e43836e
--- /dev/null
+++ b/src/test/codegen-units/item-collection/aux/cgu_export_trait_method.rs
@@ -0,0 +1,34 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub trait Trait : Sized {
+    fn without_self() -> u32;
+    fn without_self_default() -> u32 { 0 }
+
+    fn with_default_impl(self) -> Self { self }
+    fn with_default_impl_generic<T>(self, x: T) -> (Self, T) { (self, x) }
+
+    fn without_default_impl(x: u32) -> (Self, u32);
+    fn without_default_impl_generic<T>(x: T) -> (Self, T);
+}
+
+impl Trait for char {
+    fn without_self() -> u32 { 2 }
+    fn without_default_impl(x: u32) -> (Self, u32) { ('c', x) }
+    fn without_default_impl_generic<T>(x: T) -> (Self, T) { ('c', x) }
+}
+
+impl Trait for u32 {
+    fn without_self() -> u32 { 1 }
+    fn without_default_impl(x: u32) -> (Self, u32) { (0, x) }
+    fn without_default_impl_generic<T>(x: T) -> (Self, T) { (0, x) }
+}
diff --git a/src/test/codegen-units/item-collection/aux/cgu_extern_closures.rs b/src/test/codegen-units/item-collection/aux/cgu_extern_closures.rs
new file mode 100644
index 00000000000..944d85db508
--- /dev/null
+++ b/src/test/codegen-units/item-collection/aux/cgu_extern_closures.rs
@@ -0,0 +1,33 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+#[inline]
+pub fn inlined_fn(x: i32, y: i32) -> i32 {
+
+    let closure = |a, b| { a + b };
+
+    closure(x, y)
+}
+
+pub fn inlined_fn_generic<T>(x: i32, y: i32, z: T) -> (i32, T) {
+
+    let closure = |a, b| { a + b };
+
+    (closure(x, y), z)
+}
+
+pub fn non_inlined_fn(x: i32, y: i32) -> i32 {
+
+    let closure = |a, b| { a + b };
+
+    closure(x, y)
+}
diff --git a/src/test/codegen-units/item-collection/aux/cgu_generic_function.rs b/src/test/codegen-units/item-collection/aux/cgu_generic_function.rs
new file mode 100644
index 00000000000..04c68748eca
--- /dev/null
+++ b/src/test/codegen-units/item-collection/aux/cgu_generic_function.rs
@@ -0,0 +1,37 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+struct Struct(u32);
+
+#[inline(never)]
+pub fn foo<T>(x: T) -> (T, u32, i8) {
+    let (x, Struct(y)) = bar(x);
+    (x, y, 2)
+}
+
+#[inline(never)]
+fn bar<T>(x: T) -> (T, Struct) {
+    let _ = not_exported_and_not_generic(0);
+    (x, Struct(1))
+}
+
+// These should not contribute to the codegen items of other crates.
+#[inline(never)]
+pub fn exported_but_not_generic(x: i32) -> i64 {
+    x as i64
+}
+
+#[inline(never)]
+fn not_exported_and_not_generic(x: u32) -> u64 {
+    x as u64
+}
+
diff --git a/src/test/codegen-units/partitioning/aux/cgu_explicit_inlining.rs b/src/test/codegen-units/partitioning/aux/cgu_explicit_inlining.rs
new file mode 100644
index 00000000000..e4ba9fae412
--- /dev/null
+++ b/src/test/codegen-units/partitioning/aux/cgu_explicit_inlining.rs
@@ -0,0 +1,20 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+#[inline]
+pub fn inlined() {}
+
+#[inline(always)]
+pub fn always_inlined() {}
+
+#[inline(never)]
+pub fn never_inlined() {}
diff --git a/src/test/codegen-units/partitioning/aux/cgu_extern_drop_glue.rs b/src/test/codegen-units/partitioning/aux/cgu_extern_drop_glue.rs
new file mode 100644
index 00000000000..049bdb46579
--- /dev/null
+++ b/src/test/codegen-units/partitioning/aux/cgu_extern_drop_glue.rs
@@ -0,0 +1,17 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub struct Struct(pub u32);
+
+impl Drop for Struct {
+    fn drop(&mut self) {}
+}
diff --git a/src/test/codegen-units/partitioning/aux/cgu_generic_function.rs b/src/test/codegen-units/partitioning/aux/cgu_generic_function.rs
new file mode 100644
index 00000000000..04c68748eca
--- /dev/null
+++ b/src/test/codegen-units/partitioning/aux/cgu_generic_function.rs
@@ -0,0 +1,37 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+struct Struct(u32);
+
+#[inline(never)]
+pub fn foo<T>(x: T) -> (T, u32, i8) {
+    let (x, Struct(y)) = bar(x);
+    (x, y, 2)
+}
+
+#[inline(never)]
+fn bar<T>(x: T) -> (T, Struct) {
+    let _ = not_exported_and_not_generic(0);
+    (x, Struct(1))
+}
+
+// These should not contribute to the codegen items of other crates.
+#[inline(never)]
+pub fn exported_but_not_generic(x: i32) -> i64 {
+    x as i64
+}
+
+#[inline(never)]
+fn not_exported_and_not_generic(x: u32) -> u64 {
+    x as u64
+}
+
diff --git a/src/test/compile-fail-fulldeps/aux/attr_plugin_test.rs b/src/test/compile-fail-fulldeps/aux/attr_plugin_test.rs
new file mode 100644
index 00000000000..bab3721a313
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/attr_plugin_test.rs
@@ -0,0 +1,31 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(rustc_private)]
+
+extern crate syntax;
+
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::feature_gate::AttributeType;
+use rustc_plugin::Registry;
+
+
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_attribute("foo".to_owned(), AttributeType::Normal);
+    reg.register_attribute("bar".to_owned(), AttributeType::CrateLevel);
+    reg.register_attribute("baz".to_owned(), AttributeType::Whitelisted);
+}
diff --git a/src/test/compile-fail-fulldeps/aux/lint_for_crate.rs b/src/test/compile-fail-fulldeps/aux/lint_for_crate.rs
new file mode 100644
index 00000000000..a424517da12
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/lint_for_crate.rs
@@ -0,0 +1,47 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, rustc_private)]
+#![feature(box_syntax)]
+
+#[macro_use] extern crate rustc;
+extern crate rustc_plugin;
+extern crate syntax;
+
+use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPassObject, LintArray};
+use rustc_plugin::Registry;
+use rustc::hir;
+use syntax::attr;
+
+declare_lint!(CRATE_NOT_OKAY, Warn, "crate not marked with #![crate_okay]");
+
+struct Pass;
+
+impl LintPass for Pass {
+    fn get_lints(&self) -> LintArray {
+        lint_array!(CRATE_NOT_OKAY)
+    }
+}
+
+impl LateLintPass for Pass {
+    fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) {
+        if !attr::contains_name(&krate.attrs, "crate_okay") {
+            cx.span_lint(CRATE_NOT_OKAY, krate.span,
+                         "crate is not marked with #![crate_okay]");
+        }
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_late_lint_pass(box Pass as LateLintPassObject);
+}
diff --git a/src/test/compile-fail-fulldeps/aux/lint_group_plugin_test.rs b/src/test/compile-fail-fulldeps/aux/lint_group_plugin_test.rs
new file mode 100644
index 00000000000..1e9a77724a8
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/lint_group_plugin_test.rs
@@ -0,0 +1,51 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax, rustc_private)]
+
+// Load rustc as a plugin to get macros
+#[macro_use]
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc::hir;
+use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPassObject, LintArray};
+use rustc_plugin::Registry;
+
+declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
+
+declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
+
+struct Pass;
+
+impl LintPass for Pass {
+    fn get_lints(&self) -> LintArray {
+        lint_array!(TEST_LINT, PLEASE_LINT)
+    }
+}
+
+impl LateLintPass for Pass {
+    fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
+        match &*it.name.as_str() {
+            "lintme" => cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"),
+            "pleaselintme" => cx.span_lint(PLEASE_LINT, it.span, "item is named 'pleaselintme'"),
+            _ => {}
+        }
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_late_lint_pass(box Pass as LateLintPassObject);
+    reg.register_lint_group("lint_me", vec![TEST_LINT, PLEASE_LINT]);
+}
diff --git a/src/test/compile-fail-fulldeps/aux/lint_plugin_test.rs b/src/test/compile-fail-fulldeps/aux/lint_plugin_test.rs
new file mode 100644
index 00000000000..8ea131da338
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/lint_plugin_test.rs
@@ -0,0 +1,48 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax, rustc_private)]
+
+extern crate syntax;
+
+// Load rustc as a plugin to get macros
+#[macro_use]
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass,
+                  EarlyLintPassObject, LintArray};
+use rustc_plugin::Registry;
+use syntax::ast;
+declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
+
+struct Pass;
+
+impl LintPass for Pass {
+    fn get_lints(&self) -> LintArray {
+        lint_array!(TEST_LINT)
+    }
+}
+
+impl EarlyLintPass for Pass {
+    fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
+        if it.ident.name.as_str() == "lintme" {
+            cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
+        }
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_early_lint_pass(box Pass as EarlyLintPassObject);
+}
diff --git a/src/test/compile-fail-fulldeps/aux/macro_crate_MacroRulesTT.rs b/src/test/compile-fail-fulldeps/aux/macro_crate_MacroRulesTT.rs
new file mode 100644
index 00000000000..9e693fcc564
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/macro_crate_MacroRulesTT.rs
@@ -0,0 +1,26 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, rustc_private)]
+
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::parse::token;
+use syntax::ext::base::MacroRulesTT;
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_syntax_extension(token::intern("bogus"), MacroRulesTT);
+}
diff --git a/src/test/compile-fail-fulldeps/aux/macro_crate_test.rs b/src/test/compile-fail-fulldeps/aux/macro_crate_test.rs
new file mode 100644
index 00000000000..3516f566e8a
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/macro_crate_test.rs
@@ -0,0 +1,141 @@
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, quote, rustc_private)]
+
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::ast::{self, TokenTree, Item, MetaItem, ImplItem, TraitItem, ItemKind};
+use syntax::codemap::Span;
+use syntax::ext::base::*;
+use syntax::parse::{self, token};
+use syntax::ptr::P;
+use rustc_plugin::Registry;
+
+#[macro_export]
+macro_rules! exported_macro { () => (2) }
+macro_rules! unexported_macro { () => (3) }
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_macro("make_a_1", expand_make_a_1);
+    reg.register_macro("identity", expand_identity);
+    reg.register_syntax_extension(
+        token::intern("into_multi_foo"),
+        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
+        MultiModifier(Box::new(expand_into_foo_multi)));
+    reg.register_syntax_extension(
+        token::intern("duplicate"),
+        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
+        MultiDecorator(Box::new(expand_duplicate)));
+}
+
+fn expand_make_a_1(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
+                   -> Box<MacResult+'static> {
+    if !tts.is_empty() {
+        cx.span_fatal(sp, "make_a_1 takes no arguments");
+    }
+    MacEager::expr(quote_expr!(cx, 1))
+}
+
+// See Issue #15750
+fn expand_identity(cx: &mut ExtCtxt, _span: Span, tts: &[TokenTree])
+                   -> Box<MacResult+'static> {
+    // Parse an expression and emit it unchanged.
+    let mut parser = parse::new_parser_from_tts(cx.parse_sess(),
+        cx.cfg(), tts.to_vec());
+    let expr = parser.parse_expr().unwrap();
+    MacEager::expr(quote_expr!(&mut *cx, $expr))
+}
+
+fn expand_into_foo_multi(cx: &mut ExtCtxt,
+                         sp: Span,
+                         attr: &MetaItem,
+                         it: Annotatable) -> Annotatable {
+    match it {
+        Annotatable::Item(it) => {
+            Annotatable::Item(P(Item {
+                attrs: it.attrs.clone(),
+                ..(*quote_item!(cx, enum Foo2 { Bar2, Baz2 }).unwrap()).clone()
+            }))
+        }
+        Annotatable::ImplItem(it) => {
+            quote_item!(cx, impl X { fn foo(&self) -> i32 { 42 } }).unwrap().and_then(|i| {
+                match i.node {
+                    ItemKind::Impl(_, _, _, _, _, mut items) => {
+                        Annotatable::ImplItem(P(items.pop().expect("impl method not found")))
+                    }
+                    _ => unreachable!("impl parsed to something other than impl")
+                }
+            })
+        }
+        Annotatable::TraitItem(it) => {
+            quote_item!(cx, trait X { fn foo(&self) -> i32 { 0 } }).unwrap().and_then(|i| {
+                match i.node {
+                    ItemKind::Trait(_, _, _, mut items) => {
+                        Annotatable::TraitItem(P(items.pop().expect("trait method not found")))
+                    }
+                    _ => unreachable!("trait parsed to something other than trait")
+                }
+            })
+        }
+    }
+}
+
+// Create a duplicate of the annotatable, based on the MetaItem
+fn expand_duplicate(cx: &mut ExtCtxt,
+                    sp: Span,
+                    mi: &MetaItem,
+                    it: &Annotatable,
+                    push: &mut FnMut(Annotatable))
+{
+    let copy_name = match mi.node {
+        ast::MetaItemKind::List(_, ref xs) => {
+            if let ast::MetaItemKind::Word(ref w) = xs[0].node {
+                token::str_to_ident(&w)
+            } else {
+                cx.span_err(mi.span, "Expected word");
+                return;
+            }
+        }
+        _ => {
+            cx.span_err(mi.span, "Expected list");
+            return;
+        }
+    };
+
+    // Duplicate the item but replace its ident by the MetaItem
+    match it.clone() {
+        Annotatable::Item(it) => {
+            let mut new_it = (*it).clone();
+            new_it.attrs.clear();
+            new_it.ident = copy_name;
+            push(Annotatable::Item(P(new_it)));
+        }
+        Annotatable::ImplItem(it) => {
+            let mut new_it = (*it).clone();
+            new_it.attrs.clear();
+            new_it.ident = copy_name;
+            push(Annotatable::ImplItem(P(new_it)));
+        }
+        Annotatable::TraitItem(tt) => {
+            let mut new_it = (*tt).clone();
+            new_it.attrs.clear();
+            new_it.ident = copy_name;
+            push(Annotatable::TraitItem(P(new_it)));
+        }
+    }
+}
+
+pub fn foo() {}
diff --git a/src/test/compile-fail-fulldeps/aux/macro_reexport_1.rs b/src/test/compile-fail-fulldeps/aux/macro_reexport_1.rs
new file mode 100644
index 00000000000..aaeccc6e898
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/macro_reexport_1.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
+#[macro_export]
+macro_rules! reexported {
+    () => ( 3 )
+}
diff --git a/src/test/compile-fail-fulldeps/aux/rlib_crate_test.rs b/src/test/compile-fail-fulldeps/aux/rlib_crate_test.rs
new file mode 100644
index 00000000000..ae1568b2f88
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/rlib_crate_test.rs
@@ -0,0 +1,22 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+#![feature(plugin_registrar, rustc_private)]
+
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/compile-fail-fulldeps/aux/use_from_trait_xc.rs b/src/test/compile-fail-fulldeps/aux/use_from_trait_xc.rs
new file mode 100644
index 00000000000..7024c9dad7c
--- /dev/null
+++ b/src/test/compile-fail-fulldeps/aux/use_from_trait_xc.rs
@@ -0,0 +1,41 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(associated_consts)]
+
+pub use self::sub::{Bar, Baz};
+
+pub trait Trait {
+    fn foo(&self);
+    type Assoc;
+    const CONST: u32;
+}
+
+struct Foo;
+
+impl Foo {
+    pub fn new() {}
+
+    pub const C: u32 = 0;
+}
+
+mod sub {
+    pub struct Bar;
+
+    impl Bar {
+        pub fn new() {}
+    }
+
+    pub enum Baz {}
+
+    impl Baz {
+        pub fn new() {}
+    }
+}
diff --git a/src/test/compile-fail/aux/allocator-dylib.rs b/src/test/compile-fail/aux/allocator-dylib.rs
new file mode 100644
index 00000000000..568b247ecdb
--- /dev/null
+++ b/src/test/compile-fail/aux/allocator-dylib.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "dylib"]
+
+pub fn foo() {}
diff --git a/src/test/compile-fail/aux/allocator-dylib2.rs b/src/test/compile-fail/aux/allocator-dylib2.rs
new file mode 100644
index 00000000000..0d76c0e5eb8
--- /dev/null
+++ b/src/test/compile-fail/aux/allocator-dylib2.rs
@@ -0,0 +1,12 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn foo() {}
+
diff --git a/src/test/compile-fail/aux/allocator1.rs b/src/test/compile-fail/aux/allocator1.rs
new file mode 100644
index 00000000000..b24784838d0
--- /dev/null
+++ b/src/test/compile-fail/aux/allocator1.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![feature(allocator)]
+#![allocator]
+#![crate_type = "rlib"]
+#![no_std]
diff --git a/src/test/compile-fail/aux/allocator2.rs b/src/test/compile-fail/aux/allocator2.rs
new file mode 100644
index 00000000000..b24784838d0
--- /dev/null
+++ b/src/test/compile-fail/aux/allocator2.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![feature(allocator)]
+#![allocator]
+#![crate_type = "rlib"]
+#![no_std]
diff --git a/src/test/compile-fail/aux/allocator3.rs b/src/test/compile-fail/aux/allocator3.rs
new file mode 100644
index 00000000000..d3eb1f6f7ab
--- /dev/null
+++ b/src/test/compile-fail/aux/allocator3.rs
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![feature(allocator)]
+#![no_std]
+#![allocator]
+#![crate_type = "rlib"]
+
+extern crate needs_allocator;
+
diff --git a/src/test/compile-fail/aux/ambig_impl_2_lib.rs b/src/test/compile-fail/aux/ambig_impl_2_lib.rs
new file mode 100644
index 00000000000..4ba0ccdba9b
--- /dev/null
+++ b/src/test/compile-fail/aux/ambig_impl_2_lib.rs
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait me {
+    fn me(&self) -> usize;
+}
+impl me for usize { fn me(&self) -> usize { *self } }
diff --git a/src/test/compile-fail/aux/cci_class.rs b/src/test/compile-fail/aux/cci_class.rs
new file mode 100644
index 00000000000..08a13fd8bcc
--- /dev/null
+++ b/src/test/compile-fail/aux/cci_class.rs
@@ -0,0 +1,24 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitties {
+    pub struct cat {
+      meows : usize,
+
+      pub how_hungry : isize,
+    }
+
+    pub fn cat(in_x : usize, in_y : isize) -> cat  {
+        cat {
+            meows: in_x,
+            how_hungry: in_y
+        }
+    }
+}
diff --git a/src/test/compile-fail/aux/cci_class_5.rs b/src/test/compile-fail/aux/cci_class_5.rs
new file mode 100644
index 00000000000..7fe608f1634
--- /dev/null
+++ b/src/test/compile-fail/aux/cci_class_5.rs
@@ -0,0 +1,27 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitties {
+    pub struct cat {
+        meows : usize,
+        pub how_hungry : isize,
+    }
+
+    impl cat {
+        fn nap(&self) {}
+    }
+
+    pub fn cat(in_x : usize, in_y : isize) -> cat {
+        cat {
+            meows: in_x,
+            how_hungry: in_y
+        }
+    }
+}
diff --git a/src/test/compile-fail/aux/changing-crates-a1.rs b/src/test/compile-fail/aux/changing-crates-a1.rs
new file mode 100644
index 00000000000..18162c5f756
--- /dev/null
+++ b/src/test/compile-fail/aux/changing-crates-a1.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name = "a"]
+
+pub fn foo<T>() {}
diff --git a/src/test/compile-fail/aux/changing-crates-a2.rs b/src/test/compile-fail/aux/changing-crates-a2.rs
new file mode 100644
index 00000000000..28eae023d68
--- /dev/null
+++ b/src/test/compile-fail/aux/changing-crates-a2.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name = "a"]
+
+pub fn foo<T>() { println!("hello!"); }
diff --git a/src/test/compile-fail/aux/changing-crates-b.rs b/src/test/compile-fail/aux/changing-crates-b.rs
new file mode 100644
index 00000000000..7b1190fc085
--- /dev/null
+++ b/src/test/compile-fail/aux/changing-crates-b.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name = "b"]
+
+extern crate a;
+
+pub fn foo() { a::foo::<isize>(); }
diff --git a/src/test/compile-fail/aux/coherence_copy_like_lib.rs b/src/test/compile-fail/aux/coherence_copy_like_lib.rs
new file mode 100644
index 00000000000..d3d389c6a8b
--- /dev/null
+++ b/src/test/compile-fail/aux/coherence_copy_like_lib.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "rlib"]
+#![feature(fundamental)]
+
+pub trait MyCopy { }
+impl MyCopy for i32 { }
+
+pub struct MyStruct<T>(T);
+
+#[fundamental]
+pub struct MyFundamentalStruct<T>(T);
diff --git a/src/test/compile-fail/aux/coherence_inherent_cc_lib.rs b/src/test/compile-fail/aux/coherence_inherent_cc_lib.rs
new file mode 100644
index 00000000000..0458636a401
--- /dev/null
+++ b/src/test/compile-fail/aux/coherence_inherent_cc_lib.rs
@@ -0,0 +1,21 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// See coherence_inherent_cc.rs
+
+pub trait TheTrait {
+    fn the_fn(&self);
+}
+
+pub struct TheStruct;
+
+impl TheTrait for TheStruct {
+    fn the_fn(&self) {}
+}
diff --git a/src/test/compile-fail/aux/coherence_lib.rs b/src/test/compile-fail/aux/coherence_lib.rs
new file mode 100644
index 00000000000..daa123849e4
--- /dev/null
+++ b/src/test/compile-fail/aux/coherence_lib.rs
@@ -0,0 +1,25 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub trait Remote {
+    fn foo(&self) { }
+}
+
+pub trait Remote1<T> {
+    fn foo(&self, t: T) { }
+}
+
+pub trait Remote2<T, U> {
+    fn foo(&self, t: T, u: U) { }
+}
+
+pub struct Pair<T,U>(T,U);
diff --git a/src/test/compile-fail/aux/coherence_orphan_lib.rs b/src/test/compile-fail/aux/coherence_orphan_lib.rs
new file mode 100644
index 00000000000..b22d12300c7
--- /dev/null
+++ b/src/test/compile-fail/aux/coherence_orphan_lib.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait TheTrait<T> {
+    fn the_fn(&self);
+}
diff --git a/src/test/compile-fail/aux/const_fn_lib.rs b/src/test/compile-fail/aux/const_fn_lib.rs
new file mode 100644
index 00000000000..b0d5a6b1272
--- /dev/null
+++ b/src/test/compile-fail/aux/const_fn_lib.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Crate that exports a const fn. Used for testing cross-crate.
+
+#![crate_type="rlib"]
+#![feature(const_fn)]
+
+pub const fn foo() -> usize { 22 } //~ ERROR const fn is unstable
diff --git a/src/test/compile-fail/aux/crate_a1.rs b/src/test/compile-fail/aux/crate_a1.rs
new file mode 100644
index 00000000000..70f7cac94de
--- /dev/null
+++ b/src/test/compile-fail/aux/crate_a1.rs
@@ -0,0 +1,21 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo;
+
+pub trait Bar{}
+
+pub fn bar() -> Box<Bar> {
+    unimplemented!()
+}
+
+
+pub fn try_foo(x: Foo){}
+pub fn try_bar(x: Box<Bar>){}
diff --git a/src/test/compile-fail/aux/crate_a2.rs b/src/test/compile-fail/aux/crate_a2.rs
new file mode 100644
index 00000000000..d801f25ba2e
--- /dev/null
+++ b/src/test/compile-fail/aux/crate_a2.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo;
+
+pub trait Bar{}
+
+pub fn bar() -> Box<Bar> {
+    unimplemented!()
+}
diff --git a/src/test/compile-fail/aux/crateresolve1-1.rs b/src/test/compile-fail/aux/crateresolve1-1.rs
new file mode 100644
index 00000000000..050f2fe7329
--- /dev/null
+++ b/src/test/compile-fail/aux/crateresolve1-1.rs
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags:-C extra-filename=-1
+#![crate_name = "crateresolve1"]
+#![crate_type = "lib"]
+
+pub fn f() -> isize { 10 }
diff --git a/src/test/compile-fail/aux/crateresolve1-2.rs b/src/test/compile-fail/aux/crateresolve1-2.rs
new file mode 100644
index 00000000000..d19b3bafba5
--- /dev/null
+++ b/src/test/compile-fail/aux/crateresolve1-2.rs
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags:-C extra-filename=-2
+#![crate_name = "crateresolve1"]
+#![crate_type = "lib"]
+
+pub fn f() -> isize { 20 }
diff --git a/src/test/compile-fail/aux/crateresolve1-3.rs b/src/test/compile-fail/aux/crateresolve1-3.rs
new file mode 100644
index 00000000000..c5096ac49a8
--- /dev/null
+++ b/src/test/compile-fail/aux/crateresolve1-3.rs
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags:-C extra-filename=-3
+#![crate_name = "crateresolve1"]
+#![crate_type = "lib"]
+
+pub fn f() -> isize { 30 }
diff --git a/src/test/compile-fail/aux/default_ty_param_cross_crate_crate.rs b/src/test/compile-fail/aux/default_ty_param_cross_crate_crate.rs
new file mode 100644
index 00000000000..4bd8ecacb96
--- /dev/null
+++ b/src/test/compile-fail/aux/default_ty_param_cross_crate_crate.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+#![crate_name = "default_param_test"]
+#![feature(default_type_parameter_fallback)]
+
+use std::marker::PhantomData;
+
+pub struct Foo<A, B>(PhantomData<(A, B)>);
+
+pub fn bleh<A=i32, X=char>() -> Foo<A, X> { Foo(PhantomData) }
+
diff --git a/src/test/compile-fail/aux/deprecation-lint.rs b/src/test/compile-fail/aux/deprecation-lint.rs
new file mode 100644
index 00000000000..ff872efb7bd
--- /dev/null
+++ b/src/test/compile-fail/aux/deprecation-lint.rs
@@ -0,0 +1,90 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(deprecated)]
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub fn deprecated() {}
+#[deprecated(since = "1.0.0", note = "text")]
+pub fn deprecated_text() {}
+
+pub struct MethodTester;
+
+impl MethodTester {
+    #[deprecated(since = "1.0.0", note = "text")]
+    pub fn method_deprecated(&self) {}
+    #[deprecated(since = "1.0.0", note = "text")]
+    pub fn method_deprecated_text(&self) {}
+}
+
+pub trait Trait {
+    #[deprecated(since = "1.0.0", note = "text")]
+    fn trait_deprecated(&self) {}
+    #[deprecated(since = "1.0.0", note = "text")]
+    fn trait_deprecated_text(&self) {}
+}
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub trait DeprecatedTrait { fn dummy(&self) { } }
+
+impl Trait for MethodTester {}
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub struct DeprecatedStruct {
+    pub i: isize
+}
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub struct DeprecatedUnitStruct;
+
+pub enum Enum {
+    #[deprecated(since = "1.0.0", note = "text")]
+    DeprecatedVariant,
+}
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub struct DeprecatedTupleStruct(pub isize);
+
+pub struct Stable {
+    #[deprecated(since = "1.0.0", note = "text")]
+    pub override2: u8,
+}
+
+pub struct Stable2(pub u8, pub u8, #[deprecated(since = "1.0.0", note = "text")] pub u8);
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub struct Deprecated {
+    pub inherit: u8,
+}
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub struct Deprecated2(pub u8,
+                       pub u8,
+                       pub u8);
+
+#[deprecated(since = "1.0.0", note = "text")]
+pub mod deprecated_mod {
+    pub fn deprecated() {}
+}
+
+#[macro_export]
+macro_rules! macro_test {
+    () => (deprecated());
+}
+
+#[macro_export]
+macro_rules! macro_test_arg {
+    ($func:expr) => ($func);
+}
+
+#[macro_export]
+macro_rules! macro_test_arg_nested {
+    ($func:ident) => (macro_test_arg!($func()));
+}
diff --git a/src/test/compile-fail/aux/empty-struct.rs b/src/test/compile-fail/aux/empty-struct.rs
new file mode 100644
index 00000000000..22f65c2b0d8
--- /dev/null
+++ b/src/test/compile-fail/aux/empty-struct.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct XEmpty1 {}
+pub struct XEmpty2;
+
+pub enum XE {
+    XEmpty3 {},
+    XEmpty4,
+}
diff --git a/src/test/compile-fail/aux/go_trait.rs b/src/test/compile-fail/aux/go_trait.rs
new file mode 100644
index 00000000000..044bb606b40
--- /dev/null
+++ b/src/test/compile-fail/aux/go_trait.rs
@@ -0,0 +1,53 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(specialization)]
+
+// Common code used for tests that model the Fn/FnMut/FnOnce hierarchy.
+
+pub trait Go {
+    fn go(&self, arg: isize);
+}
+
+pub fn go<G:Go>(this: &G, arg: isize) {
+    this.go(arg)
+}
+
+pub trait GoMut {
+    fn go_mut(&mut self, arg: isize);
+}
+
+pub fn go_mut<G:GoMut>(this: &mut G, arg: isize) {
+    this.go_mut(arg)
+}
+
+pub trait GoOnce {
+    fn go_once(self, arg: isize);
+}
+
+pub fn go_once<G:GoOnce>(this: G, arg: isize) {
+    this.go_once(arg)
+}
+
+impl<G> GoMut for G
+    where G : Go
+{
+    default fn go_mut(&mut self, arg: isize) {
+        go(&*self, arg)
+    }
+}
+
+impl<G> GoOnce for G
+    where G : GoMut
+{
+    default fn go_once(mut self, arg: isize) {
+        go_mut(&mut self, arg)
+    }
+}
diff --git a/src/test/compile-fail/aux/inherited_stability.rs b/src/test/compile-fail/aux/inherited_stability.rs
new file mode 100644
index 00000000000..0b1aee68f44
--- /dev/null
+++ b/src/test/compile-fail/aux/inherited_stability.rs
@@ -0,0 +1,56 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+#![crate_name="inherited_stability"]
+#![crate_type = "lib"]
+#![unstable(feature = "test_feature", issue = "0")]
+#![feature(staged_api)]
+
+pub fn unstable() {}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub fn stable() {}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub mod stable_mod {
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub fn unstable() {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn stable() {}
+}
+
+#[unstable(feature = "test_feature", issue = "0")]
+pub mod unstable_mod {
+    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn deprecated() {}
+
+    pub fn unstable() {}
+}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub trait Stable {
+    #[unstable(feature = "test_feature", issue = "0")]
+    fn unstable(&self);
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    fn stable(&self);
+}
+
+impl Stable for usize {
+    fn unstable(&self) {}
+    fn stable(&self) {}
+}
+
+pub enum Unstable {
+    UnstableVariant,
+    #[stable(feature = "rust1", since = "1.0.0")]
+    StableVariant
+}
diff --git a/src/test/compile-fail/aux/internal_unstable.rs b/src/test/compile-fail/aux/internal_unstable.rs
new file mode 100644
index 00000000000..a4cd487eb65
--- /dev/null
+++ b/src/test/compile-fail/aux/internal_unstable.rs
@@ -0,0 +1,102 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(staged_api, allow_internal_unstable)]
+#![stable(feature = "stable", since = "1.0.0")]
+
+#[unstable(feature = "function", issue = "0")]
+pub fn unstable() {}
+
+
+#[stable(feature = "stable", since = "1.0.0")]
+pub struct Foo {
+    #[unstable(feature = "struct_field", issue = "0")]
+    pub x: u8
+}
+
+impl Foo {
+    #[unstable(feature = "method", issue = "0")]
+    pub fn method(&self) {}
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+pub struct Bar {
+    #[unstable(feature = "struct2_field", issue = "0")]
+    pub x: u8
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[allow_internal_unstable]
+#[macro_export]
+macro_rules! call_unstable_allow {
+    () => { $crate::unstable() }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[allow_internal_unstable]
+#[macro_export]
+macro_rules! construct_unstable_allow {
+    ($e: expr) => {
+        $crate::Foo { x: $e }
+    }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[allow_internal_unstable]
+#[macro_export]
+macro_rules! call_method_allow {
+    ($e: expr) => { $e.method() }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[allow_internal_unstable]
+#[macro_export]
+macro_rules! access_field_allow {
+    ($e: expr) => { $e.x }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[allow_internal_unstable]
+#[macro_export]
+macro_rules! pass_through_allow {
+    ($e: expr) => { $e }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[macro_export]
+macro_rules! call_unstable_noallow {
+    () => { $crate::unstable() }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[macro_export]
+macro_rules! construct_unstable_noallow {
+    ($e: expr) => {
+        $crate::Foo { x: $e }
+    }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[macro_export]
+macro_rules! call_method_noallow {
+    ($e: expr) => { $e.method() }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[macro_export]
+macro_rules! access_field_noallow {
+    ($e: expr) => { $e.x }
+}
+
+#[stable(feature = "stable", since = "1.0.0")]
+#[macro_export]
+macro_rules! pass_through_noallow {
+    ($e: expr) => { $e }
+}
diff --git a/src/test/compile-fail/aux/issue-19163.rs b/src/test/compile-fail/aux/issue-19163.rs
new file mode 100644
index 00000000000..76c5cdafd7c
--- /dev/null
+++ b/src/test/compile-fail/aux/issue-19163.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+#[macro_export]
+macro_rules! mywrite {
+    ($dst:expr, $($arg:tt)*) => ($dst.write_fmt(format_args!($($arg)*)))
+}
diff --git a/src/test/compile-fail/aux/issue-21221-3.rs b/src/test/compile-fail/aux/issue-21221-3.rs
new file mode 100644
index 00000000000..fae0fe16a26
--- /dev/null
+++ b/src/test/compile-fail/aux/issue-21221-3.rs
@@ -0,0 +1,29 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// testing whether the lookup mechanism picks up types
+// defined in the outside crate
+
+#![crate_type="lib"]
+
+pub mod outer {
+    // should suggest this
+    pub trait OuterTrait {}
+
+    // should not suggest this since the module is private
+    mod private_module {
+        pub trait OuterTrait {}
+    }
+
+    // should not suggest since the trait is private
+    pub mod public_module {
+        trait OuterTrait {}
+    }
+}
diff --git a/src/test/compile-fail/aux/issue-21221-4.rs b/src/test/compile-fail/aux/issue-21221-4.rs
new file mode 100644
index 00000000000..fffe060ee24
--- /dev/null
+++ b/src/test/compile-fail/aux/issue-21221-4.rs
@@ -0,0 +1,22 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// testing whether the lookup mechanism picks up types
+// defined in the outside crate
+
+#![crate_type="lib"]
+
+mod foo {
+    // should not be suggested => foo is private
+    pub trait T {}
+}
+
+// should be suggested
+pub use foo::T;
diff --git a/src/test/compile-fail/aux/issue-29181.rs b/src/test/compile-fail/aux/issue-29181.rs
new file mode 100644
index 00000000000..361f1ea5509
--- /dev/null
+++ b/src/test/compile-fail/aux/issue-29181.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub mod foo {
+    pub use super::*;
+}
diff --git a/src/test/compile-fail/aux/issue-30535.rs b/src/test/compile-fail/aux/issue-30535.rs
new file mode 100644
index 00000000000..8d44e8d1016
--- /dev/null
+++ b/src/test/compile-fail/aux/issue-30535.rs
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub enum Foo {
+    FooV { data: () }
+}
diff --git a/src/test/compile-fail/aux/issue_11680.rs b/src/test/compile-fail/aux/issue_11680.rs
new file mode 100644
index 00000000000..18f78750b15
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_11680.rs
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Foo {
+    Bar(isize)
+}
+
+pub mod test {
+    enum Foo {
+        Bar(isize)
+    }
+}
diff --git a/src/test/compile-fail/aux/issue_12612_1.rs b/src/test/compile-fail/aux/issue_12612_1.rs
new file mode 100644
index 00000000000..a0234c1185a
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_12612_1.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod bar {
+    pub fn foo() {}
+}
diff --git a/src/test/compile-fail/aux/issue_16725.rs b/src/test/compile-fail/aux/issue_16725.rs
new file mode 100644
index 00000000000..b3b04b4a5ac
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_16725.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern {
+    fn bar();
+}
diff --git a/src/test/compile-fail/aux/issue_17718_const_privacy.rs b/src/test/compile-fail/aux/issue_17718_const_privacy.rs
new file mode 100644
index 00000000000..3901d73382f
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_17718_const_privacy.rs
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use foo::FOO2;
+
+pub const FOO: usize = 3;
+const BAR: usize = 3;
+
+mod foo {
+    pub const FOO2: usize = 3;
+}
diff --git a/src/test/compile-fail/aux/issue_21202.rs b/src/test/compile-fail/aux/issue_21202.rs
new file mode 100644
index 00000000000..afdbf78aa82
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_21202.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod A {
+    pub struct Foo;
+    impl Foo {
+        fn foo(&self) { }
+    }
+}
diff --git a/src/test/compile-fail/aux/issue_30123_aux.rs b/src/test/compile-fail/aux/issue_30123_aux.rs
new file mode 100644
index 00000000000..f60311a9400
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_30123_aux.rs
@@ -0,0 +1,33 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::marker::PhantomData;
+
+pub struct Directed;
+pub struct Undirected;
+
+pub struct Graph<N, E, Ty = Directed> {
+    nodes: Vec<PhantomData<N>>,
+    edges: Vec<PhantomData<E>>,
+    ty: PhantomData<Ty>,
+}
+
+
+impl<N, E> Graph<N, E, Directed> {
+    pub fn new() -> Self {
+        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
+    }
+}
+
+impl<N, E> Graph<N, E, Undirected> {
+    pub fn new_undirected() -> Self {
+        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
+    }
+}
diff --git a/src/test/compile-fail/aux/issue_3907.rs b/src/test/compile-fail/aux/issue_3907.rs
new file mode 100644
index 00000000000..6472c08c222
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_3907.rs
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Foo {
+    fn bar();
+}
diff --git a/src/test/compile-fail/aux/issue_5844_aux.rs b/src/test/compile-fail/aux/issue_5844_aux.rs
new file mode 100644
index 00000000000..5c878b1e667
--- /dev/null
+++ b/src/test/compile-fail/aux/issue_5844_aux.rs
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(libc)]
+
+extern crate libc;
+
+extern "C" {
+    pub fn rand() -> libc::c_int;
+}
diff --git a/src/test/compile-fail/aux/lifetime_bound_will_change_warning_lib.rs b/src/test/compile-fail/aux/lifetime_bound_will_change_warning_lib.rs
new file mode 100644
index 00000000000..95f8b39c487
--- /dev/null
+++ b/src/test/compile-fail/aux/lifetime_bound_will_change_warning_lib.rs
@@ -0,0 +1,21 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "rlib"]
+
+// Helper for testing that we get suitable warnings when lifetime
+// bound change will cause breakage.
+
+pub fn just_ref(x: &Fn()) {
+}
+
+pub fn ref_obj(x: &Box<Fn()>) {
+    // this will change to &Box<Fn()+'static>...
+}
diff --git a/src/test/compile-fail/aux/lint_output_format.rs b/src/test/compile-fail/aux/lint_output_format.rs
new file mode 100644
index 00000000000..0553b4a49b7
--- /dev/null
+++ b/src/test/compile-fail/aux/lint_output_format.rs
@@ -0,0 +1,30 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="lint_output_format"]
+#![crate_type = "lib"]
+#![feature(staged_api)]
+#![unstable(feature = "test_feature", issue = "0")]
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn foo() -> usize {
+    20
+}
+
+#[unstable(feature = "test_feature", issue = "0")]
+pub fn bar() -> usize {
+    40
+}
+
+#[unstable(feature = "test_feature", issue = "0")]
+pub fn baz() -> usize {
+    30
+}
diff --git a/src/test/compile-fail/aux/lint_stability.rs b/src/test/compile-fail/aux/lint_stability.rs
new file mode 100644
index 00000000000..3100aba4b72
--- /dev/null
+++ b/src/test/compile-fail/aux/lint_stability.rs
@@ -0,0 +1,179 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+#![crate_name="lint_stability"]
+#![crate_type = "lib"]
+#![feature(staged_api)]
+#![stable(feature = "lint_stability", since = "1.0.0")]
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated() {}
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated_text() {}
+
+#[unstable(feature = "test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated_unstable() {}
+#[unstable(feature = "test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub fn deprecated_unstable_text() {}
+
+#[unstable(feature = "test_feature", issue = "0")]
+pub fn unstable() {}
+#[unstable(feature = "test_feature", reason = "text", issue = "0")]
+pub fn unstable_text() {}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub fn stable() {}
+#[stable(feature = "rust1", since = "1.0.0")]
+pub fn stable_text() {}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct MethodTester;
+
+impl MethodTester {
+    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated(&self) {}
+    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated_text(&self) {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated_unstable(&self) {}
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    pub fn method_deprecated_unstable_text(&self) {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub fn method_unstable(&self) {}
+    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    pub fn method_unstable_text(&self) {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn method_stable(&self) {}
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub fn method_stable_text(&self) {}
+}
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+pub trait Trait {
+    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated(&self) {}
+    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated_text(&self) {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated_unstable(&self) {}
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    fn trait_deprecated_unstable_text(&self) {}
+
+    #[unstable(feature = "test_feature", issue = "0")]
+    fn trait_unstable(&self) {}
+    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    fn trait_unstable_text(&self) {}
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    fn trait_stable(&self) {}
+    #[stable(feature = "rust1", since = "1.0.0")]
+    fn trait_stable_text(&self) {}
+}
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+impl Trait for MethodTester {}
+
+#[unstable(feature = "test_feature", issue = "0")]
+pub trait UnstableTrait { fn dummy(&self) { } }
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub trait DeprecatedTrait {
+    #[stable(feature = "test_feature", since = "1.0.0")] fn dummy(&self) { }
+}
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedStruct {
+    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+}
+#[unstable(feature = "test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnstableStruct {
+    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+}
+#[unstable(feature = "test_feature", issue = "0")]
+pub struct UnstableStruct {
+    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+}
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct StableStruct {
+    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+}
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnitStruct;
+#[unstable(feature = "test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnstableUnitStruct;
+#[unstable(feature = "test_feature", issue = "0")]
+pub struct UnstableUnitStruct;
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct StableUnitStruct;
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+pub enum Enum {
+    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    DeprecatedVariant,
+    #[unstable(feature = "test_feature", issue = "0")]
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    DeprecatedUnstableVariant,
+    #[unstable(feature = "test_feature", issue = "0")]
+    UnstableVariant,
+
+    #[stable(feature = "rust1", since = "1.0.0")]
+    StableVariant,
+}
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+#[unstable(feature = "test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+#[unstable(feature = "test_feature", issue = "0")]
+pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[macro_export]
+macro_rules! macro_test {
+    () => (deprecated());
+}
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[macro_export]
+macro_rules! macro_test_arg {
+    ($func:expr) => ($func);
+}
+
+#[stable(feature = "test_feature", since = "1.0.0")]
+#[macro_export]
+macro_rules! macro_test_arg_nested {
+    ($func:ident) => (macro_test_arg!($func()));
+}
diff --git a/src/test/compile-fail/aux/lint_stability_fields.rs b/src/test/compile-fail/aux/lint_stability_fields.rs
new file mode 100644
index 00000000000..8c6b98ab510
--- /dev/null
+++ b/src/test/compile-fail/aux/lint_stability_fields.rs
@@ -0,0 +1,61 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(staged_api)]
+#![stable(feature = "rust1", since = "1.0.0")]
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct Stable {
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub inherit: u8, // it's a lie (stable doesn't inherit)
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub override1: u8,
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub override2: u8,
+}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+pub struct Stable2(#[stable(feature = "rust1", since = "1.0.0")] pub u8,
+                   #[unstable(feature = "test_feature", issue = "0")] pub u8,
+                   #[unstable(feature = "test_feature", issue = "0")]
+                   #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
+
+#[unstable(feature = "test_feature", issue = "0")]
+pub struct Unstable {
+    pub inherit: u8,
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub override1: u8,
+    #[rustc_deprecated(since = "1.0.0", reason = "text")]
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub override2: u8,
+}
+
+#[unstable(feature = "test_feature", issue = "0")]
+pub struct Unstable2(pub u8,
+                     #[stable(feature = "rust1", since = "1.0.0")] pub u8,
+                     #[unstable(feature = "test_feature", issue = "0")]
+                     #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
+
+#[unstable(feature = "test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct Deprecated {
+    pub inherit: u8,
+    #[stable(feature = "rust1", since = "1.0.0")]
+    pub override1: u8,
+    #[unstable(feature = "test_feature", issue = "0")]
+    pub override2: u8,
+}
+
+#[unstable(feature = "test_feature", issue = "0")]
+#[rustc_deprecated(since = "1.0.0", reason = "text")]
+pub struct Deprecated2(pub u8,
+                       #[stable(feature = "rust1", since = "1.0.0")] pub u8,
+                       #[unstable(feature = "test_feature", issue = "0")] pub u8);
diff --git a/src/test/compile-fail/aux/lint_unused_extern_crate.rs b/src/test/compile-fail/aux/lint_unused_extern_crate.rs
new file mode 100644
index 00000000000..2661b1f4eb4
--- /dev/null
+++ b/src/test/compile-fail/aux/lint_unused_extern_crate.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn foo() {}
diff --git a/src/test/compile-fail/aux/macro_crate_nonterminal.rs b/src/test/compile-fail/aux/macro_crate_nonterminal.rs
new file mode 100644
index 00000000000..4f75e2b5d75
--- /dev/null
+++ b/src/test/compile-fail/aux/macro_crate_nonterminal.rs
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn increment(x: usize) -> usize {
+    x + 1
+}
+
+#[macro_export]
+macro_rules! increment {
+    ($x:expr) => ($crate::increment($x))
+}
+
+pub fn check_local() {
+    assert_eq!(increment!(3), 4);
+}
diff --git a/src/test/compile-fail/aux/macro_non_reexport_2.rs b/src/test/compile-fail/aux/macro_non_reexport_2.rs
new file mode 100644
index 00000000000..910fcd2e367
--- /dev/null
+++ b/src/test/compile-fail/aux/macro_non_reexport_2.rs
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
+
+// Since we load a serialized macro with all its attributes, accidentally
+// re-exporting a `#[macro_export] macro_rules!` is something of a concern!
+//
+// We avoid it at the moment only because of the order in which we do things.
+
+#[macro_use] #[no_link]
+extern crate macro_reexport_1;
diff --git a/src/test/compile-fail/aux/macro_reexport_1.rs b/src/test/compile-fail/aux/macro_reexport_1.rs
new file mode 100644
index 00000000000..aaeccc6e898
--- /dev/null
+++ b/src/test/compile-fail/aux/macro_reexport_1.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
+#[macro_export]
+macro_rules! reexported {
+    () => ( 3 )
+}
diff --git a/src/test/compile-fail/aux/namespaced_enums.rs b/src/test/compile-fail/aux/namespaced_enums.rs
new file mode 100644
index 00000000000..3bf39b788db
--- /dev/null
+++ b/src/test/compile-fail/aux/namespaced_enums.rs
@@ -0,0 +1,20 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub enum Foo {
+    A,
+    B(isize),
+    C { a: isize },
+}
+
+impl Foo {
+    pub fn foo() {}
+    pub fn bar(&self) {}
+}
diff --git a/src/test/compile-fail/aux/needs_allocator.rs b/src/test/compile-fail/aux/needs_allocator.rs
new file mode 100644
index 00000000000..51003160427
--- /dev/null
+++ b/src/test/compile-fail/aux/needs_allocator.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![feature(needs_allocator)]
+#![no_std]
+#![needs_allocator]
+#![crate_type = "rlib"]
diff --git a/src/test/compile-fail/aux/no_method_suggested_traits.rs b/src/test/compile-fail/aux/no_method_suggested_traits.rs
new file mode 100644
index 00000000000..20cebb9be17
--- /dev/null
+++ b/src/test/compile-fail/aux/no_method_suggested_traits.rs
@@ -0,0 +1,46 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use reexport::Reexported;
+
+pub struct Foo;
+pub enum Bar { X }
+
+pub mod foo {
+    pub trait PubPub {
+        fn method(&self) {}
+
+        fn method3(&self) {}
+    }
+
+    impl PubPub for u32 {}
+    impl PubPub for i32 {}
+}
+pub mod bar {
+    trait PubPriv {
+        fn method(&self);
+    }
+}
+mod qux {
+    pub trait PrivPub {
+        fn method(&self);
+    }
+}
+mod quz {
+    trait PrivPriv {
+        fn method(&self);
+    }
+}
+
+mod reexport {
+    pub trait Reexported {
+        fn method(&self);
+    }
+}
diff --git a/src/test/compile-fail/aux/noexporttypelib.rs b/src/test/compile-fail/aux/noexporttypelib.rs
new file mode 100644
index 00000000000..5ae8e0d298e
--- /dev/null
+++ b/src/test/compile-fail/aux/noexporttypelib.rs
@@ -0,0 +1,12 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub type oint = Option<isize>;
+pub fn foo() -> oint { Some(3) }
diff --git a/src/test/compile-fail/aux/orphan_check_diagnostics.rs b/src/test/compile-fail/aux/orphan_check_diagnostics.rs
new file mode 100644
index 00000000000..cf3e9903b5a
--- /dev/null
+++ b/src/test/compile-fail/aux/orphan_check_diagnostics.rs
@@ -0,0 +1,11 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait RemoteTrait { fn dummy(&self) { } }
diff --git a/src/test/compile-fail/aux/privacy_tuple_struct.rs b/src/test/compile-fail/aux/privacy_tuple_struct.rs
new file mode 100644
index 00000000000..141b6bdd604
--- /dev/null
+++ b/src/test/compile-fail/aux/privacy_tuple_struct.rs
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct A(());
+pub struct B(isize);
+pub struct C(pub isize, isize);
+pub struct D(pub isize);
diff --git a/src/test/compile-fail/aux/private_trait_xc.rs b/src/test/compile-fail/aux/private_trait_xc.rs
new file mode 100644
index 00000000000..37ee10c8d37
--- /dev/null
+++ b/src/test/compile-fail/aux/private_trait_xc.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait Foo {}
diff --git a/src/test/compile-fail/aux/pub_static_array.rs b/src/test/compile-fail/aux/pub_static_array.rs
new file mode 100644
index 00000000000..4419a5ae83c
--- /dev/null
+++ b/src/test/compile-fail/aux/pub_static_array.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub static ARRAY: &'static [u8] = &[1];
diff --git a/src/test/compile-fail/aux/rbmtp_cross_crate_lib.rs b/src/test/compile-fail/aux/rbmtp_cross_crate_lib.rs
new file mode 100644
index 00000000000..f49ac4fc8e4
--- /dev/null
+++ b/src/test/compile-fail/aux/rbmtp_cross_crate_lib.rs
@@ -0,0 +1,42 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Check that method bounds declared on traits/impls in a cross-crate
+// scenario work. This is the library portion of the test.
+
+pub enum MaybeOwned<'a> {
+    Owned(isize),
+    Borrowed(&'a isize)
+}
+
+pub struct Inv<'a> { // invariant w/r/t 'a
+    x: &'a mut &'a isize
+}
+
+// I encountered a bug at some point with encoding the IntoMaybeOwned
+// trait, so I'll use that as the template for this test.
+pub trait IntoMaybeOwned<'a> {
+    fn into_maybe_owned(self) -> MaybeOwned<'a>;
+
+    // Note: without this `into_inv` method, the trait is
+    // contravariant w/r/t `'a`, since if you look strictly at the
+    // interface, it only returns `'a`. This complicates the
+    // downstream test since it wants invariance to force an error.
+    // Hence we add this method.
+    fn into_inv(self) -> Inv<'a>;
+
+    fn bigger_region<'b:'a>(self, b: Inv<'b>);
+}
+
+impl<'a> IntoMaybeOwned<'a> for Inv<'a> {
+    fn into_maybe_owned(self) -> MaybeOwned<'a> { panic!() }
+    fn into_inv(self) -> Inv<'a> { panic!() }
+    fn bigger_region<'b:'a>(self, b: Inv<'b>) { panic!() }
+}
diff --git a/src/test/compile-fail/aux/stability_attribute_issue.rs b/src/test/compile-fail/aux/stability_attribute_issue.rs
new file mode 100644
index 00000000000..22c13f69af9
--- /dev/null
+++ b/src/test/compile-fail/aux/stability_attribute_issue.rs
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(staged_api)]
+#![stable(feature = "foo", since = "1.2.0")]
+
+
+#[unstable(feature = "foo", issue = "1")]
+pub fn unstable() {}
+
+#[unstable(feature = "foo", reason = "message", issue = "2")]
+pub fn unstable_msg() {}
diff --git a/src/test/compile-fail/aux/stability_cfg1.rs b/src/test/compile-fail/aux/stability_cfg1.rs
new file mode 100644
index 00000000000..c839993b047
--- /dev/null
+++ b/src/test/compile-fail/aux/stability_cfg1.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![cfg_attr(foo, experimental)]
+#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
+#![feature(staged_api)]
diff --git a/src/test/compile-fail/aux/stability_cfg2.rs b/src/test/compile-fail/aux/stability_cfg2.rs
new file mode 100644
index 00000000000..c1e2b1d1bfe
--- /dev/null
+++ b/src/test/compile-fail/aux/stability_cfg2.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags:--cfg foo
+
+#![cfg_attr(foo, unstable(feature = "test_feature", issue = "0"))]
+#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
+#![feature(staged_api)]
diff --git a/src/test/compile-fail/aux/static_priv_by_default.rs b/src/test/compile-fail/aux/static_priv_by_default.rs
new file mode 100644
index 00000000000..859f38e809f
--- /dev/null
+++ b/src/test/compile-fail/aux/static_priv_by_default.rs
@@ -0,0 +1,61 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+static private: isize = 0;
+pub static public: isize = 0;
+
+pub struct A(());
+
+impl A {
+    fn foo() {}
+}
+
+mod foo {
+    pub static a: isize = 0;
+    pub fn b() {}
+    pub struct c;
+    pub enum d {}
+    pub type e = isize;
+
+    pub struct A(());
+
+    impl A {
+        fn foo() {}
+    }
+
+    // these are public so the parent can reexport them.
+    pub static reexported_a: isize = 0;
+    pub fn reexported_b() {}
+    pub struct reexported_c;
+    pub enum reexported_d {}
+    pub type reexported_e = isize;
+}
+
+pub mod bar {
+    pub use foo::reexported_a as e;
+    pub use foo::reexported_b as f;
+    pub use foo::reexported_c as g;
+    pub use foo::reexported_d as h;
+    pub use foo::reexported_e as i;
+}
+
+pub static a: isize = 0;
+pub fn b() {}
+pub struct c;
+pub enum d {}
+pub type e = isize;
+
+static j: isize = 0;
+fn k() {}
+struct l;
+enum m {}
+type n = isize;
diff --git a/src/test/compile-fail/aux/struct_field_privacy.rs b/src/test/compile-fail/aux/struct_field_privacy.rs
new file mode 100644
index 00000000000..5fea97da03e
--- /dev/null
+++ b/src/test/compile-fail/aux/struct_field_privacy.rs
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct A {
+    a: isize,
+    pub b: isize,
+}
+
+pub struct B {
+    pub a: isize,
+    b: isize,
+}
diff --git a/src/test/compile-fail/aux/struct_variant_privacy.rs b/src/test/compile-fail/aux/struct_variant_privacy.rs
new file mode 100644
index 00000000000..40868fa3f70
--- /dev/null
+++ b/src/test/compile-fail/aux/struct_variant_privacy.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Bar {
+    Baz { a: isize }
+}
diff --git a/src/test/compile-fail/aux/svh-a-base.rs b/src/test/compile-fail/aux/svh-a-base.rs
new file mode 100644
index 00000000000..31a97f695f0
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-a-base.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/compile-fail/aux/svh-a-change-lit.rs b/src/test/compile-fail/aux/svh-a-change-lit.rs
new file mode 100644
index 00000000000..5339fc8295c
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-a-change-lit.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+    0
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/compile-fail/aux/svh-a-change-significant-cfg.rs b/src/test/compile-fail/aux/svh-a-change-significant-cfg.rs
new file mode 100644
index 00000000000..2a5d9446f87
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-a-change-significant-cfg.rs
@@ -0,0 +1,37 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+#[cfg(some_flag)]
+pub fn foo<T:U>(_: isize) -> isize {
+    3
+}
+
+#[cfg(not(some_flag))]
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/compile-fail/aux/svh-a-change-trait-bound.rs b/src/test/compile-fail/aux/svh-a-change-trait-bound.rs
new file mode 100644
index 00000000000..61f2f2803ab
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-a-change-trait-bound.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:V>(_: isize) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/compile-fail/aux/svh-a-change-type-arg.rs b/src/test/compile-fail/aux/svh-a-change-type-arg.rs
new file mode 100644
index 00000000000..270ce95be2b
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-a-change-type-arg.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: i32) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/compile-fail/aux/svh-a-change-type-ret.rs b/src/test/compile-fail/aux/svh-a-change-type-ret.rs
new file mode 100644
index 00000000000..de4cc85a7dc
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-a-change-type-ret.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> i64 {
+    3
+}
+
+pub fn an_unused_name() -> i32 {
+    4
+}
diff --git a/src/test/compile-fail/aux/svh-a-change-type-static.rs b/src/test/compile-fail/aux/svh-a-change-type-static.rs
new file mode 100644
index 00000000000..62f7986f1c3
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-a-change-type-static.rs
@@ -0,0 +1,36 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+#![feature(core)]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : i32 = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/compile-fail/aux/svh-b.rs b/src/test/compile-fail/aux/svh-b.rs
new file mode 100644
index 00000000000..b8946fdc995
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-b.rs
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! This is a client of the `a` crate defined in "svn-a-base.rs".  The
+//! rpass and cfail tests (such as "run-pass/svh-add-comment.rs") use
+//! it by swapping in a different object code library crate built from
+//! some variant of "svn-a-base.rs", and then we are checking if the
+//! compiler properly ignores or accepts the change, based on whether
+//! the change could affect the downstream crate content or not
+//! (#14132).
+
+#![crate_name = "b"]
+
+extern crate a;
+
+pub fn foo() { assert_eq!(a::foo::<()>(0), 3); }
diff --git a/src/test/compile-fail/aux/svh-uta-base.rs b/src/test/compile-fail/aux/svh-uta-base.rs
new file mode 100644
index 00000000000..6bd3ddab06c
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-uta-base.rs
@@ -0,0 +1,32 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! "compile-fail/svh-uta-trait.rs" is checking that we detect a
+//! change from `use foo::TraitB` to use `foo::TraitB` in the hash
+//! (SVH) computation (#14132), since that will affect method
+//! resolution.
+//!
+//! This is the upstream crate.
+
+#![crate_name = "uta"]
+
+mod traits {
+    pub trait TraitA { fn val(&self) -> isize { 2 } }
+    pub trait TraitB { fn val(&self) -> isize { 3 } }
+}
+
+impl traits::TraitA for () {}
+impl traits::TraitB for () {}
+
+pub fn foo<T>(_: isize) -> isize {
+    use traits::TraitA;
+    let v = ();
+    v.val()
+}
diff --git a/src/test/compile-fail/aux/svh-uta-change-use-trait.rs b/src/test/compile-fail/aux/svh-uta-change-use-trait.rs
new file mode 100644
index 00000000000..e8634168177
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-uta-change-use-trait.rs
@@ -0,0 +1,32 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! "compile-fail/svh-uta-trait.rs" is checking that we detect a
+//! change from `use foo::TraitB` to use `foo::TraitB` in the hash
+//! (SVH) computation (#14132), since that will affect method
+//! resolution.
+//!
+//! This is the upstream crate.
+
+#![crate_name = "uta"]
+
+mod traits {
+    pub trait TraitA { fn val(&self) -> isize { 2 } }
+    pub trait TraitB { fn val(&self) -> isize { 3 } }
+}
+
+impl traits::TraitA for () {}
+impl traits::TraitB for () {}
+
+pub fn foo<T>(_: isize) -> isize {
+    use traits::TraitB;
+    let v = ();
+    v.val()
+}
diff --git a/src/test/compile-fail/aux/svh-utb.rs b/src/test/compile-fail/aux/svh-utb.rs
new file mode 100644
index 00000000000..eb3da985242
--- /dev/null
+++ b/src/test/compile-fail/aux/svh-utb.rs
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! "compile-fail/svh-uta-trait.rs" is checking that we detect a
+//! change from `use foo::TraitB` to use `foo::TraitB` in the hash
+//! (SVH) computation (#14132), since that will affect method
+//! resolution.
+//!
+//! This is the downstream crate.
+
+#![crate_name = "utb"]
+
+extern crate uta;
+
+pub fn foo() { assert_eq!(uta::foo::<()>(0), 3); }
diff --git a/src/test/compile-fail/aux/tdticc_coherence_lib.rs b/src/test/compile-fail/aux/tdticc_coherence_lib.rs
new file mode 100644
index 00000000000..2e425ac96c5
--- /dev/null
+++ b/src/test/compile-fail/aux/tdticc_coherence_lib.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(optin_builtin_traits, core)]
+#![crate_type = "rlib"]
+
+pub trait DefaultedTrait { }
+impl DefaultedTrait for .. { }
+
+pub struct Something<T> { t: T }
diff --git a/src/test/compile-fail/aux/trait_bounds_on_structs_and_enums_xc.rs b/src/test/compile-fail/aux/trait_bounds_on_structs_and_enums_xc.rs
new file mode 100644
index 00000000000..29cb0bc176a
--- /dev/null
+++ b/src/test/compile-fail/aux/trait_bounds_on_structs_and_enums_xc.rs
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Trait {
+    fn dummy(&self) { }
+}
+
+pub struct Foo<T:Trait> {
+    pub x: T,
+}
+
+pub enum Bar<T:Trait> {
+    ABar(isize),
+    BBar(T),
+    CBar(usize),
+}
diff --git a/src/test/compile-fail/aux/trait_impl_conflict.rs b/src/test/compile-fail/aux/trait_impl_conflict.rs
new file mode 100644
index 00000000000..c3ecbb014dc
--- /dev/null
+++ b/src/test/compile-fail/aux/trait_impl_conflict.rs
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Foo {
+}
+
+impl Foo for isize {
+}
diff --git a/src/test/compile-fail/aux/trait_safety_lib.rs b/src/test/compile-fail/aux/trait_safety_lib.rs
new file mode 100644
index 00000000000..585a756fd07
--- /dev/null
+++ b/src/test/compile-fail/aux/trait_safety_lib.rs
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Simple smoke test that unsafe traits can be compiled etc.
+
+pub unsafe trait Foo {
+    fn foo(&self) -> isize;
+}
+
+unsafe impl Foo for isize {
+    fn foo(&self) -> isize { *self }
+}
diff --git a/src/test/compile-fail/aux/trait_superkinds_in_metadata.rs b/src/test/compile-fail/aux/trait_superkinds_in_metadata.rs
new file mode 100644
index 00000000000..0fa2d3459f4
--- /dev/null
+++ b/src/test/compile-fail/aux/trait_superkinds_in_metadata.rs
@@ -0,0 +1,18 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test library crate for cross-crate usages of traits inheriting
+// from the builtin kinds. Mostly tests metadata correctness.
+
+#![crate_type="lib"]
+
+pub trait RequiresShare : Sync { }
+pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
+pub trait RequiresCopy : Copy { }
diff --git a/src/test/compile-fail/aux/two_macros.rs b/src/test/compile-fail/aux/two_macros.rs
new file mode 100644
index 00000000000..060960f0dbc
--- /dev/null
+++ b/src/test/compile-fail/aux/two_macros.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[macro_export]
+macro_rules! macro_one { () => ("one") }
+
+#[macro_export]
+macro_rules! macro_two { () => ("two") }
diff --git a/src/test/compile-fail/aux/unreachable_variant.rs b/src/test/compile-fail/aux/unreachable_variant.rs
new file mode 100644
index 00000000000..8ca85f20ab2
--- /dev/null
+++ b/src/test/compile-fail/aux/unreachable_variant.rs
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod super_sekrit {
+    pub enum sooper_sekrit {
+        quux, baz
+    }
+}
diff --git a/src/test/compile-fail/aux/use_from_trait_xc.rs b/src/test/compile-fail/aux/use_from_trait_xc.rs
new file mode 100644
index 00000000000..7024c9dad7c
--- /dev/null
+++ b/src/test/compile-fail/aux/use_from_trait_xc.rs
@@ -0,0 +1,41 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(associated_consts)]
+
+pub use self::sub::{Bar, Baz};
+
+pub trait Trait {
+    fn foo(&self);
+    type Assoc;
+    const CONST: u32;
+}
+
+struct Foo;
+
+impl Foo {
+    pub fn new() {}
+
+    pub const C: u32 = 0;
+}
+
+mod sub {
+    pub struct Bar;
+
+    impl Bar {
+        pub fn new() {}
+    }
+
+    pub enum Baz {}
+
+    impl Baz {
+        pub fn new() {}
+    }
+}
diff --git a/src/test/compile-fail/aux/variant-namespacing.rs b/src/test/compile-fail/aux/variant-namespacing.rs
new file mode 100644
index 00000000000..d7fd2968495
--- /dev/null
+++ b/src/test/compile-fail/aux/variant-namespacing.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub enum XE {
+    XStruct { a: u8 },
+    XTuple(u8),
+    XUnit,
+}
diff --git a/src/test/compile-fail/aux/weak-lang-items.rs b/src/test/compile-fail/aux/weak-lang-items.rs
new file mode 100644
index 00000000000..6434e62b6f7
--- /dev/null
+++ b/src/test/compile-fail/aux/weak-lang-items.rs
@@ -0,0 +1,32 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+// This aux-file will require the eh_personality function to be codegen'd, but
+// it hasn't been defined just yet. Make sure we don't explode.
+
+#![no_std]
+#![crate_type = "rlib"]
+
+struct A;
+
+impl core::ops::Drop for A {
+    fn drop(&mut self) {}
+}
+
+pub fn foo() {
+    let _a = A;
+    panic!("wut");
+}
+
+mod std {
+    pub use core::{option, fmt};
+}
diff --git a/src/test/compile-fail/aux/xc_private_method_lib.rs b/src/test/compile-fail/aux/xc_private_method_lib.rs
new file mode 100644
index 00000000000..5e7bc61943b
--- /dev/null
+++ b/src/test/compile-fail/aux/xc_private_method_lib.rs
@@ -0,0 +1,43 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub struct Struct {
+    pub x: isize
+}
+
+impl Struct {
+    fn static_meth_struct() -> Struct {
+        Struct { x: 1 }
+    }
+
+    fn meth_struct(&self) -> isize {
+        self.x
+    }
+}
+
+pub enum Enum {
+    Variant1(isize),
+    Variant2(isize)
+}
+
+impl Enum {
+    fn static_meth_enum() -> Enum {
+        Enum::Variant2(10)
+    }
+
+    fn meth_enum(&self) -> isize {
+        match *self {
+            Enum::Variant1(x) |
+            Enum::Variant2(x) => x
+        }
+    }
+}
diff --git a/src/test/compile-fail/aux/xcrate_unit_struct.rs b/src/test/compile-fail/aux/xcrate_unit_struct.rs
new file mode 100644
index 00000000000..7a69be2b06c
--- /dev/null
+++ b/src/test/compile-fail/aux/xcrate_unit_struct.rs
@@ -0,0 +1,38 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+// used by the rpass test
+
+#[derive(Copy, Clone)]
+pub struct Struct;
+
+#[derive(Copy, Clone)]
+pub enum Unit {
+    UnitVariant,
+    Argument(Struct)
+}
+
+#[derive(Copy, Clone)]
+pub struct TupleStruct(pub usize, pub &'static str);
+
+// used by the cfail test
+
+#[derive(Copy, Clone)]
+pub struct StructWithFields {
+    foo: isize,
+}
+
+#[derive(Copy, Clone)]
+pub enum EnumWithVariants {
+    EnumVariant,
+    EnumVariantArg(isize)
+}
diff --git a/src/test/compile-fail/privacy/restricted/aux/pub_restricted.rs b/src/test/compile-fail/privacy/restricted/aux/pub_restricted.rs
new file mode 100644
index 00000000000..b1c88ce6ce5
--- /dev/null
+++ b/src/test/compile-fail/privacy/restricted/aux/pub_restricted.rs
@@ -0,0 +1,23 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(pub_restricted)]
+
+pub(crate) struct Crate;
+#[derive(Default)]
+pub struct Universe {
+    pub x: i32,
+    pub(crate) y: i32
+}
+
+impl Universe {
+    pub fn f(&self) {}
+    pub(crate) fn g(&self) {}
+}
diff --git a/src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs b/src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs
new file mode 100644
index 00000000000..f4bc72305a0
--- /dev/null
+++ b/src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs
@@ -0,0 +1,26 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+#![crate_type = "rlib"]
+// compile-flags:-g
+
+struct S1;
+
+impl S1 {
+    fn f(&mut self) { }
+}
+
+
+struct S2;
+
+impl S2 {
+    fn f(&mut self) { }
+}
diff --git a/src/test/debuginfo/aux/cross_crate_spans.rs b/src/test/debuginfo/aux/cross_crate_spans.rs
new file mode 100644
index 00000000000..9b6b6221bda
--- /dev/null
+++ b/src/test/debuginfo/aux/cross_crate_spans.rs
@@ -0,0 +1,29 @@
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "rlib"]
+
+#![allow(unused_variables)]
+#![feature(omit_gdb_pretty_printer_section)]
+#![omit_gdb_pretty_printer_section]
+
+// no-prefer-dynamic
+// compile-flags:-g
+
+pub fn generic_function<T: Clone>(val: T) -> (T, T) {
+    let result = (val.clone(), val.clone());
+    let a_variable: u32 = 123456789;
+    let another_variable: f64 = 123456789.5;
+    zzz();
+    result
+}
+
+#[inline(never)]
+fn zzz() {()}
diff --git a/src/test/debuginfo/aux/issue13213aux.rs b/src/test/debuginfo/aux/issue13213aux.rs
new file mode 100644
index 00000000000..d0566a1e091
--- /dev/null
+++ b/src/test/debuginfo/aux/issue13213aux.rs
@@ -0,0 +1,29 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+// compile-flags:-g
+
+pub use private::P;
+
+#[derive(Copy, Clone)]
+pub struct S {
+    p: P,
+}
+
+mod private {
+    #[derive(Copy, Clone)]
+    pub struct P {
+        p: i32,
+    }
+    pub const THREE: P = P { p: 3 };
+}
+
+pub static A: S = S { p: private::THREE };
diff --git a/src/test/run-pass-fulldeps/aux/custom_derive_plugin.rs b/src/test/run-pass-fulldeps/aux/custom_derive_plugin.rs
new file mode 100644
index 00000000000..5f0ef4de491
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/custom_derive_plugin.rs
@@ -0,0 +1,78 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax)]
+#![feature(rustc_private)]
+
+extern crate syntax;
+extern crate syntax_ext;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::ast;
+use syntax::codemap::Span;
+use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable};
+use syntax::ext::build::AstBuilder;
+use syntax::parse::token;
+use syntax::ptr::P;
+use syntax_ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
+use syntax_ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_syntax_extension(
+        token::intern("derive_TotalSum"),
+        MultiDecorator(box expand));
+}
+
+fn expand(cx: &mut ExtCtxt,
+          span: Span,
+          mitem: &ast::MetaItem,
+          item: &Annotatable,
+          push: &mut FnMut(Annotatable)) {
+    let trait_def = TraitDef {
+        span: span,
+        attributes: vec![],
+        path: Path::new(vec!["TotalSum"]),
+        additional_bounds: vec![],
+        generics: LifetimeBounds::empty(),
+        associated_types: vec![],
+        is_unsafe: false,
+        methods: vec![
+            MethodDef {
+                name: "total_sum",
+                generics: LifetimeBounds::empty(),
+                explicit_self: borrowed_explicit_self(),
+                args: vec![],
+                ret_ty: Literal(Path::new_local("isize")),
+                attributes: vec![],
+                is_unsafe: false,
+                combine_substructure: combine_substructure(box |cx, span, substr| {
+                    let zero = cx.expr_isize(span, 0);
+                    cs_fold(false,
+                            |cx, span, subexpr, field, _| {
+                                cx.expr_binary(span, ast::BinOpKind::Add, subexpr,
+                                    cx.expr_method_call(span, field,
+                                        token::str_to_ident("total_sum"), vec![]))
+                            },
+                            zero,
+                            box |cx, span, _, _| { cx.span_bug(span, "wtf??"); },
+                            cx, span, substr)
+                }),
+            },
+        ],
+    };
+
+    trait_def.expand(cx, mitem, item, push)
+}
diff --git a/src/test/run-pass-fulldeps/aux/custom_derive_plugin_attr.rs b/src/test/run-pass-fulldeps/aux/custom_derive_plugin_attr.rs
new file mode 100644
index 00000000000..2878674f0ea
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/custom_derive_plugin_attr.rs
@@ -0,0 +1,91 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax)]
+#![feature(rustc_private)]
+
+extern crate syntax;
+extern crate syntax_ext;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::ast;
+use syntax::attr::AttrMetaMethods;
+use syntax::codemap::Span;
+use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable};
+use syntax::ext::build::AstBuilder;
+use syntax::parse::token;
+use syntax::ptr::P;
+use syntax_ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
+use syntax_ext::deriving::generic::{Substructure, Struct, EnumMatching};
+use syntax_ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_syntax_extension(
+        token::intern("derive_TotalSum"),
+        MultiDecorator(box expand));
+}
+
+fn expand(cx: &mut ExtCtxt,
+          span: Span,
+          mitem: &ast::MetaItem,
+          item: &Annotatable,
+          push: &mut FnMut(Annotatable)) {
+    let trait_def = TraitDef {
+        span: span,
+        attributes: vec![],
+        path: Path::new(vec!["TotalSum"]),
+        additional_bounds: vec![],
+        generics: LifetimeBounds::empty(),
+        associated_types: vec![],
+        is_unsafe: false,
+        methods: vec![
+            MethodDef {
+                name: "total_sum",
+                generics: LifetimeBounds::empty(),
+                explicit_self: borrowed_explicit_self(),
+                args: vec![],
+                ret_ty: Literal(Path::new_local("isize")),
+                attributes: vec![],
+                is_unsafe: false,
+                combine_substructure: combine_substructure(Box::new(totalsum_substructure)),
+            },
+        ],
+    };
+
+    trait_def.expand(cx, mitem, item, push)
+}
+
+// Mostly copied from syntax::ext::deriving::hash
+/// Defines how the implementation for `trace()` is to be generated
+fn totalsum_substructure(cx: &mut ExtCtxt, trait_span: Span,
+                         substr: &Substructure) -> P<ast::Expr> {
+    let fields = match *substr.fields {
+        Struct(_, ref fs) | EnumMatching(_, _, ref fs) => fs,
+        _ => cx.span_bug(trait_span, "impossible substructure")
+    };
+
+    fields.iter().fold(cx.expr_isize(trait_span, 0), |acc, ref item| {
+        if item.attrs.iter().find(|a| a.check_name("ignore")).is_some() {
+            acc
+        } else {
+            cx.expr_binary(item.span, ast::BinOpKind::Add, acc,
+                           cx.expr_method_call(item.span,
+                                               item.self_.clone(),
+                                               substr.method_ident,
+                                               Vec::new()))
+        }
+    })
+}
diff --git a/src/test/run-pass-fulldeps/aux/dummy_mir_pass.rs b/src/test/run-pass-fulldeps/aux/dummy_mir_pass.rs
new file mode 100644
index 00000000000..b5234af937b
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/dummy_mir_pass.rs
@@ -0,0 +1,55 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, rustc_private)]
+#![feature(box_syntax)]
+
+#[macro_use] extern crate rustc;
+extern crate rustc_plugin;
+extern crate rustc_const_math;
+extern crate syntax;
+
+use rustc::mir::transform::{self, MirPass};
+use rustc::mir::repr::{Mir, Literal};
+use rustc::mir::visit::MutVisitor;
+use rustc::ty;
+use rustc::middle::const_val::ConstVal;
+use rustc_const_math::ConstInt;
+use rustc_plugin::Registry;
+
+use syntax::ast::NodeId;
+
+struct Pass;
+
+impl transform::Pass for Pass {}
+impl<'tcx> MirPass<'tcx> for Pass {
+    fn run_pass(&mut self, _: &ty::TyCtxt<'tcx>, _: NodeId, mir: &mut Mir<'tcx>) {
+        Visitor.visit_mir(mir)
+    }
+}
+
+struct Visitor;
+
+impl<'tcx> MutVisitor<'tcx> for Visitor {
+    fn visit_literal(&mut self, literal: &mut Literal<'tcx>) {
+        if let Literal::Value { ref mut value } = *literal {
+            if let ConstVal::Integral(ConstInt::I32(ref mut i @ 11)) = *value {
+                *i = 42;
+            }
+        }
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_mir_pass(box Pass);
+}
diff --git a/src/test/run-pass-fulldeps/aux/issue-13560-1.rs b/src/test/run-pass-fulldeps/aux/issue-13560-1.rs
new file mode 100644
index 00000000000..858d7269cd8
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/issue-13560-1.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "dylib"]
diff --git a/src/test/run-pass-fulldeps/aux/issue-13560-2.rs b/src/test/run-pass-fulldeps/aux/issue-13560-2.rs
new file mode 100644
index 00000000000..8e46acca124
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/issue-13560-2.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
diff --git a/src/test/run-pass-fulldeps/aux/issue-13560-3.rs b/src/test/run-pass-fulldeps/aux/issue-13560-3.rs
new file mode 100644
index 00000000000..c0539aa1b6e
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/issue-13560-3.rs
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+
+#[macro_use] #[no_link] extern crate issue_13560_1 as t1;
+#[macro_use] extern crate issue_13560_2 as t2;
diff --git a/src/test/run-pass-fulldeps/aux/issue-16822.rs b/src/test/run-pass-fulldeps/aux/issue-16822.rs
new file mode 100644
index 00000000000..0e3041c1174
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/issue-16822.rs
@@ -0,0 +1,30 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+use std::cell::RefCell;
+
+pub struct Window<Data>{
+    pub data: RefCell<Data>
+}
+
+impl<Data:  Update> Window<Data> {
+    pub fn update(&self, e: i32) {
+        match e {
+            1 => self.data.borrow_mut().update(),
+            _ => {}
+        }
+    }
+}
+
+pub trait Update {
+    fn update(&mut self);
+}
diff --git a/src/test/run-pass-fulldeps/aux/issue-18502.rs b/src/test/run-pass-fulldeps/aux/issue-18502.rs
new file mode 100644
index 00000000000..718b046e1e4
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/issue-18502.rs
@@ -0,0 +1,31 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+struct Foo;
+// This is the ICE trigger
+struct Formatter;
+
+trait Show {
+    fn fmt(&self);
+}
+
+impl Show for Foo {
+    fn fmt(&self) {}
+}
+
+fn bar<T>(f: extern "Rust" fn(&T), t: &T) { }
+
+// ICE requirement: this has to be marked as inline
+#[inline]
+pub fn baz() {
+    bar(Show::fmt, &Foo);
+}
diff --git a/src/test/run-pass-fulldeps/aux/issue_16723_multiple_items_syntax_ext.rs b/src/test/run-pass-fulldeps/aux/issue_16723_multiple_items_syntax_ext.rs
new file mode 100644
index 00000000000..25a75c2d295
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/issue_16723_multiple_items_syntax_ext.rs
@@ -0,0 +1,36 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, quote, rustc_private)]
+#![crate_type = "dylib"]
+
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::ast;
+use syntax::codemap;
+use syntax::ext::base::{ExtCtxt, MacResult, MacEager};
+use syntax::util::small_vector::SmallVector;
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_macro("multiple_items", expand)
+}
+
+fn expand(cx: &mut ExtCtxt, _: codemap::Span, _: &[ast::TokenTree]) -> Box<MacResult+'static> {
+    MacEager::items(SmallVector::many(vec![
+        quote_item!(cx, struct Struct1;).unwrap(),
+        quote_item!(cx, struct Struct2;).unwrap()
+    ]))
+}
diff --git a/src/test/run-pass-fulldeps/aux/linkage-visibility.rs b/src/test/run-pass-fulldeps/aux/linkage-visibility.rs
new file mode 100644
index 00000000000..09a2e8ecd87
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/linkage-visibility.rs
@@ -0,0 +1,45 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(rustc_private)]
+
+// We're testing linkage visibility; the compiler warns us, but we want to
+// do the runtime check that these functions aren't exported.
+#![allow(private_no_mangle_fns)]
+
+extern crate rustc_back;
+
+use rustc_back::dynamic_lib::DynamicLibrary;
+
+#[no_mangle]
+pub fn foo() { bar(); }
+
+pub fn foo2<T>() {
+    fn bar2() {
+        bar();
+    }
+    bar2();
+}
+
+#[no_mangle]
+fn bar() { }
+
+#[allow(dead_code)]
+#[no_mangle]
+fn baz() { }
+
+pub fn test() {
+    let lib = DynamicLibrary::open(None).unwrap();
+    unsafe {
+        assert!(lib.symbol::<isize>("foo").is_ok());
+        assert!(lib.symbol::<isize>("baz").is_err());
+        assert!(lib.symbol::<isize>("bar").is_err());
+    }
+}
diff --git a/src/test/run-pass-fulldeps/aux/lint_for_crate.rs b/src/test/run-pass-fulldeps/aux/lint_for_crate.rs
new file mode 100644
index 00000000000..a424517da12
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/lint_for_crate.rs
@@ -0,0 +1,47 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, rustc_private)]
+#![feature(box_syntax)]
+
+#[macro_use] extern crate rustc;
+extern crate rustc_plugin;
+extern crate syntax;
+
+use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPassObject, LintArray};
+use rustc_plugin::Registry;
+use rustc::hir;
+use syntax::attr;
+
+declare_lint!(CRATE_NOT_OKAY, Warn, "crate not marked with #![crate_okay]");
+
+struct Pass;
+
+impl LintPass for Pass {
+    fn get_lints(&self) -> LintArray {
+        lint_array!(CRATE_NOT_OKAY)
+    }
+}
+
+impl LateLintPass for Pass {
+    fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) {
+        if !attr::contains_name(&krate.attrs, "crate_okay") {
+            cx.span_lint(CRATE_NOT_OKAY, krate.span,
+                         "crate is not marked with #![crate_okay]");
+        }
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_late_lint_pass(box Pass as LateLintPassObject);
+}
diff --git a/src/test/run-pass-fulldeps/aux/lint_group_plugin_test.rs b/src/test/run-pass-fulldeps/aux/lint_group_plugin_test.rs
new file mode 100644
index 00000000000..1e9a77724a8
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/lint_group_plugin_test.rs
@@ -0,0 +1,51 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax, rustc_private)]
+
+// Load rustc as a plugin to get macros
+#[macro_use]
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc::hir;
+use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPassObject, LintArray};
+use rustc_plugin::Registry;
+
+declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
+
+declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
+
+struct Pass;
+
+impl LintPass for Pass {
+    fn get_lints(&self) -> LintArray {
+        lint_array!(TEST_LINT, PLEASE_LINT)
+    }
+}
+
+impl LateLintPass for Pass {
+    fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
+        match &*it.name.as_str() {
+            "lintme" => cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"),
+            "pleaselintme" => cx.span_lint(PLEASE_LINT, it.span, "item is named 'pleaselintme'"),
+            _ => {}
+        }
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_late_lint_pass(box Pass as LateLintPassObject);
+    reg.register_lint_group("lint_me", vec![TEST_LINT, PLEASE_LINT]);
+}
diff --git a/src/test/run-pass-fulldeps/aux/lint_plugin_test.rs b/src/test/run-pass-fulldeps/aux/lint_plugin_test.rs
new file mode 100644
index 00000000000..8ea131da338
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/lint_plugin_test.rs
@@ -0,0 +1,48 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax, rustc_private)]
+
+extern crate syntax;
+
+// Load rustc as a plugin to get macros
+#[macro_use]
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass,
+                  EarlyLintPassObject, LintArray};
+use rustc_plugin::Registry;
+use syntax::ast;
+declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
+
+struct Pass;
+
+impl LintPass for Pass {
+    fn get_lints(&self) -> LintArray {
+        lint_array!(TEST_LINT)
+    }
+}
+
+impl EarlyLintPass for Pass {
+    fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
+        if it.ident.name.as_str() == "lintme" {
+            cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
+        }
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_early_lint_pass(box Pass as EarlyLintPassObject);
+}
diff --git a/src/test/run-pass-fulldeps/aux/llvm_pass_plugin.rs b/src/test/run-pass-fulldeps/aux/llvm_pass_plugin.rs
new file mode 100644
index 00000000000..59cfdd1e04a
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/llvm_pass_plugin.rs
@@ -0,0 +1,29 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(rustc_private)]
+
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    // This pass is built in to LLVM.
+    //
+    // Normally, we would name a pass that was registered through
+    // C++ static object constructors in the same .so file as the
+    // plugin registrar.
+    reg.register_llvm_pass("gvn");
+}
diff --git a/src/test/run-pass-fulldeps/aux/logging_right_crate.rs b/src/test/run-pass-fulldeps/aux/logging_right_crate.rs
new file mode 100644
index 00000000000..db26b10fc67
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/logging_right_crate.rs
@@ -0,0 +1,18 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(rustc_private)]
+
+#[macro_use] extern crate log;
+
+pub fn foo<T>() {
+    fn death() -> isize { panic!() }
+    debug!("{}", (||{ death() })());
+}
diff --git a/src/test/run-pass-fulldeps/aux/lto-syntax-extension-lib.rs b/src/test/run-pass-fulldeps/aux/lto-syntax-extension-lib.rs
new file mode 100644
index 00000000000..78c03bac33f
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/lto-syntax-extension-lib.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+
+pub fn foo() {}
diff --git a/src/test/run-pass-fulldeps/aux/lto-syntax-extension-plugin.rs b/src/test/run-pass-fulldeps/aux/lto-syntax-extension-plugin.rs
new file mode 100644
index 00000000000..9cf0d756f40
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/lto-syntax-extension-plugin.rs
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(rustc_private)]
+
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(_reg: &mut Registry) {}
diff --git a/src/test/run-pass-fulldeps/aux/macro_crate_test.rs b/src/test/run-pass-fulldeps/aux/macro_crate_test.rs
new file mode 100644
index 00000000000..3516f566e8a
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/macro_crate_test.rs
@@ -0,0 +1,141 @@
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, quote, rustc_private)]
+
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::ast::{self, TokenTree, Item, MetaItem, ImplItem, TraitItem, ItemKind};
+use syntax::codemap::Span;
+use syntax::ext::base::*;
+use syntax::parse::{self, token};
+use syntax::ptr::P;
+use rustc_plugin::Registry;
+
+#[macro_export]
+macro_rules! exported_macro { () => (2) }
+macro_rules! unexported_macro { () => (3) }
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_macro("make_a_1", expand_make_a_1);
+    reg.register_macro("identity", expand_identity);
+    reg.register_syntax_extension(
+        token::intern("into_multi_foo"),
+        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
+        MultiModifier(Box::new(expand_into_foo_multi)));
+    reg.register_syntax_extension(
+        token::intern("duplicate"),
+        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
+        MultiDecorator(Box::new(expand_duplicate)));
+}
+
+fn expand_make_a_1(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
+                   -> Box<MacResult+'static> {
+    if !tts.is_empty() {
+        cx.span_fatal(sp, "make_a_1 takes no arguments");
+    }
+    MacEager::expr(quote_expr!(cx, 1))
+}
+
+// See Issue #15750
+fn expand_identity(cx: &mut ExtCtxt, _span: Span, tts: &[TokenTree])
+                   -> Box<MacResult+'static> {
+    // Parse an expression and emit it unchanged.
+    let mut parser = parse::new_parser_from_tts(cx.parse_sess(),
+        cx.cfg(), tts.to_vec());
+    let expr = parser.parse_expr().unwrap();
+    MacEager::expr(quote_expr!(&mut *cx, $expr))
+}
+
+fn expand_into_foo_multi(cx: &mut ExtCtxt,
+                         sp: Span,
+                         attr: &MetaItem,
+                         it: Annotatable) -> Annotatable {
+    match it {
+        Annotatable::Item(it) => {
+            Annotatable::Item(P(Item {
+                attrs: it.attrs.clone(),
+                ..(*quote_item!(cx, enum Foo2 { Bar2, Baz2 }).unwrap()).clone()
+            }))
+        }
+        Annotatable::ImplItem(it) => {
+            quote_item!(cx, impl X { fn foo(&self) -> i32 { 42 } }).unwrap().and_then(|i| {
+                match i.node {
+                    ItemKind::Impl(_, _, _, _, _, mut items) => {
+                        Annotatable::ImplItem(P(items.pop().expect("impl method not found")))
+                    }
+                    _ => unreachable!("impl parsed to something other than impl")
+                }
+            })
+        }
+        Annotatable::TraitItem(it) => {
+            quote_item!(cx, trait X { fn foo(&self) -> i32 { 0 } }).unwrap().and_then(|i| {
+                match i.node {
+                    ItemKind::Trait(_, _, _, mut items) => {
+                        Annotatable::TraitItem(P(items.pop().expect("trait method not found")))
+                    }
+                    _ => unreachable!("trait parsed to something other than trait")
+                }
+            })
+        }
+    }
+}
+
+// Create a duplicate of the annotatable, based on the MetaItem
+fn expand_duplicate(cx: &mut ExtCtxt,
+                    sp: Span,
+                    mi: &MetaItem,
+                    it: &Annotatable,
+                    push: &mut FnMut(Annotatable))
+{
+    let copy_name = match mi.node {
+        ast::MetaItemKind::List(_, ref xs) => {
+            if let ast::MetaItemKind::Word(ref w) = xs[0].node {
+                token::str_to_ident(&w)
+            } else {
+                cx.span_err(mi.span, "Expected word");
+                return;
+            }
+        }
+        _ => {
+            cx.span_err(mi.span, "Expected list");
+            return;
+        }
+    };
+
+    // Duplicate the item but replace its ident by the MetaItem
+    match it.clone() {
+        Annotatable::Item(it) => {
+            let mut new_it = (*it).clone();
+            new_it.attrs.clear();
+            new_it.ident = copy_name;
+            push(Annotatable::Item(P(new_it)));
+        }
+        Annotatable::ImplItem(it) => {
+            let mut new_it = (*it).clone();
+            new_it.attrs.clear();
+            new_it.ident = copy_name;
+            push(Annotatable::ImplItem(P(new_it)));
+        }
+        Annotatable::TraitItem(tt) => {
+            let mut new_it = (*tt).clone();
+            new_it.attrs.clear();
+            new_it.ident = copy_name;
+            push(Annotatable::TraitItem(P(new_it)));
+        }
+    }
+}
+
+pub fn foo() {}
diff --git a/src/test/run-pass-fulldeps/aux/plugin_args.rs b/src/test/run-pass-fulldeps/aux/plugin_args.rs
new file mode 100644
index 00000000000..f6e80266a15
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/plugin_args.rs
@@ -0,0 +1,52 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax, rustc_private)]
+
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use std::borrow::ToOwned;
+use syntax::ast;
+use syntax::codemap::Span;
+use syntax::ext::build::AstBuilder;
+use syntax::ext::base::{TTMacroExpander, ExtCtxt, MacResult, MacEager, NormalTT};
+use syntax::parse::token;
+use syntax::print::pprust;
+use syntax::ptr::P;
+use rustc_plugin::Registry;
+
+struct Expander {
+    args: Vec<P<ast::MetaItem>>,
+}
+
+impl TTMacroExpander for Expander {
+    fn expand<'cx>(&self,
+                   ecx: &'cx mut ExtCtxt,
+                   sp: Span,
+                   _: &[ast::TokenTree]) -> Box<MacResult+'cx> {
+        let args = self.args.iter().map(|i| pprust::meta_item_to_string(&*i))
+            .collect::<Vec<_>>().join(", ");
+        let interned = token::intern_and_get_ident(&args[..]);
+        MacEager::expr(ecx.expr_str(sp, interned))
+    }
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    let args = reg.args().clone();
+    reg.register_syntax_extension(token::intern("plugin_args"),
+        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
+        NormalTT(Box::new(Expander { args: args, }), None, false));
+}
diff --git a/src/test/run-pass-fulldeps/aux/plugin_crate_outlive_expansion_phase.rs b/src/test/run-pass-fulldeps/aux/plugin_crate_outlive_expansion_phase.rs
new file mode 100644
index 00000000000..f56983c14b1
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/plugin_crate_outlive_expansion_phase.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar)]
+#![feature(box_syntax, rustc_private)]
+
+extern crate rustc;
+extern crate rustc_plugin;
+
+use std::any::Any;
+use std::cell::RefCell;
+use rustc_plugin::Registry;
+
+struct Foo {
+    foo: isize
+}
+
+impl Drop for Foo {
+    fn drop(&mut self) {}
+}
+
+#[plugin_registrar]
+pub fn registrar(_: &mut Registry) {
+    thread_local!(static FOO: RefCell<Option<Box<Any+Send>>> = RefCell::new(None));
+    FOO.with(|s| *s.borrow_mut() = Some(box Foo { foo: 10 } as Box<Any+Send>));
+}
diff --git a/src/test/run-pass-fulldeps/aux/plugin_with_plugin_lib.rs b/src/test/run-pass-fulldeps/aux/plugin_with_plugin_lib.rs
new file mode 100644
index 00000000000..8b5ff7cf07c
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/plugin_with_plugin_lib.rs
@@ -0,0 +1,23 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![feature(plugin_registrar, rustc_private)]
+#![deny(plugin_as_library)] // should have no effect in a plugin crate
+
+extern crate macro_crate_test;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(_: &mut Registry) { }
diff --git a/src/test/run-pass-fulldeps/aux/procedural_mbe_matching.rs b/src/test/run-pass-fulldeps/aux/procedural_mbe_matching.rs
new file mode 100644
index 00000000000..713a7d1e811
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/procedural_mbe_matching.rs
@@ -0,0 +1,70 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![crate_type="dylib"]
+#![feature(plugin_registrar, quote, rustc_private)]
+
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::codemap::Span;
+use syntax::parse::token::{self, str_to_ident, NtExpr, NtPat};
+use syntax::ast::{TokenTree, Pat};
+use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
+use syntax::ext::build::AstBuilder;
+use syntax::ext::tt::macro_parser::{MatchedSeq, MatchedNonterminal};
+use syntax::ext::tt::macro_parser::{Success, Failure, Error};
+use syntax::ptr::P;
+use rustc_plugin::Registry;
+
+fn expand_mbe_matches(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
+        -> Box<MacResult + 'static> {
+
+    let mbe_matcher = quote_matcher!(cx, $matched:expr, $($pat:pat)|+);
+
+    let mac_expr = match TokenTree::parse(cx, &mbe_matcher[..], args) {
+        Success(map) => {
+            match (&*map[&str_to_ident("matched").name], &*map[&str_to_ident("pat").name]) {
+                (&MatchedNonterminal(NtExpr(ref matched_expr)),
+                 &MatchedSeq(ref pats, seq_sp)) => {
+                    let pats: Vec<P<Pat>> = pats.iter().map(|pat_nt|
+                        if let &MatchedNonterminal(NtPat(ref pat)) = &**pat_nt {
+                            pat.clone()
+                        } else {
+                            unreachable!()
+                        }
+                    ).collect();
+                    let arm = cx.arm(seq_sp, pats, cx.expr_bool(seq_sp, true));
+
+                    quote_expr!(cx,
+                        match $matched_expr {
+                            $arm
+                            _ => false
+                        }
+                    )
+                }
+                _ => unreachable!()
+            }
+        }
+        Failure(_, s) | Error(_, s) => {
+            panic!("expected Success, but got Error/Failure: {}", s);
+        }
+    };
+
+    MacEager::expr(mac_expr)
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_macro("matches", expand_mbe_matches);
+}
diff --git a/src/test/run-pass-fulldeps/aux/roman_numerals.rs b/src/test/run-pass-fulldeps/aux/roman_numerals.rs
new file mode 100644
index 00000000000..839ece49c3e
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/roman_numerals.rs
@@ -0,0 +1,79 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![crate_type="dylib"]
+#![feature(plugin_registrar, rustc_private)]
+#![feature(slice_patterns)]
+
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::codemap::Span;
+use syntax::ast::TokenTree;
+use syntax::parse::token;
+use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
+use syntax::ext::build::AstBuilder;  // trait for expr_usize
+use rustc_plugin::Registry;
+
+// WARNING WARNING WARNING WARNING WARNING
+// =======================================
+//
+// This code also appears in src/doc/guide-plugin.md. Please keep
+// the two copies in sync!  FIXME: have rustdoc read this file
+
+fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
+        -> Box<MacResult + 'static> {
+
+    static NUMERALS: &'static [(&'static str, usize)] = &[
+        ("M", 1000), ("CM", 900), ("D", 500), ("CD", 400),
+        ("C",  100), ("XC",  90), ("L",  50), ("XL",  40),
+        ("X",   10), ("IX",   9), ("V",   5), ("IV",   4),
+        ("I",    1)];
+
+    if args.len() != 1 {
+        cx.span_err(
+            sp,
+            &format!("argument should be a single identifier, but got {} arguments", args.len()));
+        return DummyResult::any(sp);
+    }
+
+    let text = match args[0] {
+        TokenTree::Token(_, token::Ident(s)) => s.to_string(),
+        _ => {
+            cx.span_err(sp, "argument should be a single identifier");
+            return DummyResult::any(sp);
+        }
+    };
+
+    let mut text = &*text;
+    let mut total = 0;
+    while !text.is_empty() {
+        match NUMERALS.iter().find(|&&(rn, _)| text.starts_with(rn)) {
+            Some(&(rn, val)) => {
+                total += val;
+                text = &text[rn.len()..];
+            }
+            None => {
+                cx.span_err(sp, "invalid Roman numeral");
+                return DummyResult::any(sp);
+            }
+        }
+    }
+
+    MacEager::expr(cx.expr_usize(sp, total))
+}
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_macro("rn", expand_rn);
+}
diff --git a/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_1.rs b/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_1.rs
new file mode 100644
index 00000000000..fadeb024405
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_1.rs
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![crate_type = "dylib"]
+
+pub fn the_answer() -> isize {
+    2
+}
diff --git a/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_2.rs b/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_2.rs
new file mode 100644
index 00000000000..7281698a7fb
--- /dev/null
+++ b/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_2.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// force-host
+
+#![crate_type = "dylib"]
+#![feature(plugin_registrar, quote, rustc_private)]
+
+extern crate syntax_extension_with_dll_deps_1 as other;
+extern crate syntax;
+extern crate rustc;
+extern crate rustc_plugin;
+
+use syntax::ast::{TokenTree, Item, MetaItem};
+use syntax::codemap::Span;
+use syntax::ext::base::*;
+use rustc_plugin::Registry;
+
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_macro("foo", expand_foo);
+}
+
+fn expand_foo(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
+              -> Box<MacResult+'static> {
+    let answer = other::the_answer();
+    MacEager::expr(quote_expr!(cx, $answer))
+}
diff --git a/src/test/run-pass/aux/allocator-dummy.rs b/src/test/run-pass/aux/allocator-dummy.rs
new file mode 100644
index 00000000000..a1d21db8f4d
--- /dev/null
+++ b/src/test/run-pass/aux/allocator-dummy.rs
@@ -0,0 +1,55 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![feature(allocator, core_intrinsics, libc)]
+#![allocator]
+#![crate_type = "rlib"]
+#![no_std]
+
+extern crate libc;
+
+pub static mut HITS: usize = 0;
+
+#[no_mangle]
+pub extern fn __rust_allocate(size: usize, align: usize) -> *mut u8 {
+    unsafe {
+        HITS += 1;
+        libc::malloc(size as libc::size_t) as *mut u8
+    }
+}
+
+#[no_mangle]
+pub extern fn __rust_deallocate(ptr: *mut u8, old_size: usize, align: usize) {
+    unsafe {
+        HITS += 1;
+        libc::free(ptr as *mut _)
+    }
+}
+
+#[no_mangle]
+pub extern fn __rust_reallocate(ptr: *mut u8, old_size: usize, size: usize,
+                                align: usize) -> *mut u8 {
+    unsafe {
+        libc::realloc(ptr as *mut _, size as libc::size_t) as *mut u8
+    }
+}
+
+#[no_mangle]
+pub extern fn __rust_reallocate_inplace(ptr: *mut u8, old_size: usize,
+                                        size: usize, align: usize) -> usize {
+    unsafe { core::intrinsics::abort() }
+}
+
+#[no_mangle]
+pub extern fn __rust_usable_size(size: usize, align: usize) -> usize {
+    unsafe { core::intrinsics::abort() }
+}
diff --git a/src/test/run-pass/aux/anon-extern-mod-cross-crate-1.rs b/src/test/run-pass/aux/anon-extern-mod-cross-crate-1.rs
new file mode 100644
index 00000000000..197fb9a6d01
--- /dev/null
+++ b/src/test/run-pass/aux/anon-extern-mod-cross-crate-1.rs
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="anonexternmod"]
+#![feature(libc)]
+
+extern crate libc;
+
+#[link(name="rust_test_helpers")]
+extern {
+    pub fn rust_get_test_int() -> libc::intptr_t;
+}
diff --git a/src/test/run-pass/aux/anon_trait_static_method_lib.rs b/src/test/run-pass/aux/anon_trait_static_method_lib.rs
new file mode 100644
index 00000000000..9d93d9689e7
--- /dev/null
+++ b/src/test/run-pass/aux/anon_trait_static_method_lib.rs
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo {
+    pub x: isize
+}
+
+impl Foo {
+    pub fn new() -> Foo {
+        Foo { x: 3 }
+    }
+}
diff --git a/src/test/run-pass/aux/associated-const-cc-lib.rs b/src/test/run-pass/aux/associated-const-cc-lib.rs
new file mode 100644
index 00000000000..1fd8fee0117
--- /dev/null
+++ b/src/test/run-pass/aux/associated-const-cc-lib.rs
@@ -0,0 +1,46 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(associated_consts)]
+
+#![crate_type="lib"]
+
+// These items are for testing that associated consts work cross-crate.
+pub trait Foo {
+    const BAR: usize;
+}
+
+pub struct FooNoDefault;
+
+impl Foo for FooNoDefault {
+    const BAR: usize = 0;
+}
+
+// These test that defaults and default resolution work cross-crate.
+pub trait FooDefault {
+    const BAR: usize = 1;
+}
+
+pub struct FooOverwriteDefault;
+
+impl FooDefault for FooOverwriteDefault {
+    const BAR: usize = 2;
+}
+
+pub struct FooUseDefault;
+
+impl FooDefault for FooUseDefault {}
+
+// Test inherent impls.
+pub struct InherentBar;
+
+impl InherentBar {
+    pub const BAR: usize = 3;
+}
diff --git a/src/test/run-pass/aux/associated-types-cc-lib.rs b/src/test/run-pass/aux/associated-types-cc-lib.rs
new file mode 100644
index 00000000000..175e8730cbc
--- /dev/null
+++ b/src/test/run-pass/aux/associated-types-cc-lib.rs
@@ -0,0 +1,26 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Helper for test issue-18048, which tests associated types in a
+// cross-crate scenario.
+
+#![crate_type="lib"]
+
+pub trait Bar: Sized {
+    type T;
+
+    fn get(x: Option<Self>) -> <Self as Bar>::T;
+}
+
+impl Bar for isize {
+    type T = usize;
+
+    fn get(_: Option<isize>) -> usize { 22 }
+}
diff --git a/src/test/run-pass/aux/augmented_assignments.rs b/src/test/run-pass/aux/augmented_assignments.rs
new file mode 100644
index 00000000000..6601e7240a7
--- /dev/null
+++ b/src/test/run-pass/aux/augmented_assignments.rs
@@ -0,0 +1,18 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::ops::AddAssign;
+
+pub struct Int(pub i32);
+
+impl AddAssign<i32> for Int {
+    fn add_assign(&mut self, _: i32) {
+    }
+}
diff --git a/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo.rs b/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo.rs
new file mode 100644
index 00000000000..f129b4b77bb
--- /dev/null
+++ b/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo.rs
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub const X: () = ();
diff --git a/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo2.rs b/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo2.rs
new file mode 100644
index 00000000000..91fa9124551
--- /dev/null
+++ b/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo2.rs
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub const Y: () = ();
diff --git a/src/test/run-pass/aux/cci_borrow_lib.rs b/src/test/run-pass/aux/cci_borrow_lib.rs
new file mode 100644
index 00000000000..9c90510a857
--- /dev/null
+++ b/src/test/run-pass/aux/cci_borrow_lib.rs
@@ -0,0 +1,13 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn foo(x: &usize) -> usize {
+    *x
+}
diff --git a/src/test/run-pass/aux/cci_capture_clause.rs b/src/test/run-pass/aux/cci_capture_clause.rs
new file mode 100644
index 00000000000..b38e955231e
--- /dev/null
+++ b/src/test/run-pass/aux/cci_capture_clause.rs
@@ -0,0 +1,20 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::thread;
+use std::sync::mpsc::{Receiver, channel};
+
+pub fn foo<T:'static + Send + Clone>(x: T) -> Receiver<T> {
+    let (tx, rx) = channel();
+    thread::spawn(move|| {
+        tx.send(x.clone());
+    });
+    rx
+}
diff --git a/src/test/run-pass/aux/cci_class.rs b/src/test/run-pass/aux/cci_class.rs
new file mode 100644
index 00000000000..08a13fd8bcc
--- /dev/null
+++ b/src/test/run-pass/aux/cci_class.rs
@@ -0,0 +1,24 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitties {
+    pub struct cat {
+      meows : usize,
+
+      pub how_hungry : isize,
+    }
+
+    pub fn cat(in_x : usize, in_y : isize) -> cat  {
+        cat {
+            meows: in_x,
+            how_hungry: in_y
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/cci_class_2.rs b/src/test/run-pass/aux/cci_class_2.rs
new file mode 100644
index 00000000000..7d147832f09
--- /dev/null
+++ b/src/test/run-pass/aux/cci_class_2.rs
@@ -0,0 +1,29 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitties {
+    pub struct cat {
+      meows : usize,
+
+      pub how_hungry : isize,
+
+    }
+
+    impl cat {
+        pub fn speak(&self) {}
+    }
+
+    pub fn cat(in_x : usize, in_y : isize) -> cat {
+        cat {
+            meows: in_x,
+            how_hungry: in_y
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/cci_class_3.rs b/src/test/run-pass/aux/cci_class_3.rs
new file mode 100644
index 00000000000..ec1bf108dcb
--- /dev/null
+++ b/src/test/run-pass/aux/cci_class_3.rs
@@ -0,0 +1,29 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitties {
+    pub struct cat {
+        meows : usize,
+
+        pub how_hungry : isize,
+    }
+
+    impl cat {
+        pub fn speak(&mut self) { self.meows += 1; }
+        pub fn meow_count(&mut self) -> usize { self.meows }
+    }
+
+    pub fn cat(in_x : usize, in_y : isize) -> cat {
+        cat {
+            meows: in_x,
+            how_hungry: in_y
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/cci_class_4.rs b/src/test/run-pass/aux/cci_class_4.rs
new file mode 100644
index 00000000000..300cc31632e
--- /dev/null
+++ b/src/test/run-pass/aux/cci_class_4.rs
@@ -0,0 +1,51 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitties {
+    pub struct cat {
+        meows : usize,
+
+        pub how_hungry : isize,
+        pub name : String,
+    }
+
+    impl cat {
+        pub fn speak(&mut self) { self.meow(); }
+
+        pub fn eat(&mut self) -> bool {
+            if self.how_hungry > 0 {
+                println!("OM NOM NOM");
+                self.how_hungry -= 2;
+                return true;
+            } else {
+                println!("Not hungry!");
+                return false;
+            }
+        }
+    }
+
+    impl cat {
+        pub fn meow(&mut self) {
+            println!("Meow");
+            self.meows += 1;
+            if self.meows % 5 == 0 {
+                self.how_hungry += 1;
+            }
+        }
+    }
+
+    pub fn cat(in_x : usize, in_y : isize, in_name: String) -> cat {
+        cat {
+            meows: in_x,
+            how_hungry: in_y,
+            name: in_name
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/cci_class_6.rs b/src/test/run-pass/aux/cci_class_6.rs
new file mode 100644
index 00000000000..c902a6c7dca
--- /dev/null
+++ b/src/test/run-pass/aux/cci_class_6.rs
@@ -0,0 +1,35 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitties {
+
+    pub struct cat<U> {
+        info : Vec<U> ,
+        meows : usize,
+
+        pub how_hungry : isize,
+    }
+
+    impl<U> cat<U> {
+        pub fn speak<T>(&mut self, stuff: Vec<T> ) {
+            self.meows += stuff.len();
+        }
+
+        pub fn meow_count(&mut self) -> usize { self.meows }
+    }
+
+    pub fn cat<U>(in_x : usize, in_y : isize, in_info: Vec<U> ) -> cat<U> {
+        cat {
+            meows: in_x,
+            how_hungry: in_y,
+            info: in_info
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/cci_class_cast.rs b/src/test/run-pass/aux/cci_class_cast.rs
new file mode 100644
index 00000000000..f54a39d61ef
--- /dev/null
+++ b/src/test/run-pass/aux/cci_class_cast.rs
@@ -0,0 +1,60 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod kitty {
+    use std::fmt;
+
+    pub struct cat {
+      meows : usize,
+      pub how_hungry : isize,
+      pub name : String,
+    }
+
+    impl fmt::Display for cat {
+        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+            write!(f, "{}", self.name)
+        }
+    }
+
+    impl cat {
+        fn meow(&mut self) {
+            println!("Meow");
+            self.meows += 1;
+            if self.meows % 5 == 0 {
+                self.how_hungry += 1;
+            }
+        }
+
+    }
+
+    impl cat {
+        pub fn speak(&mut self) { self.meow(); }
+
+        pub fn eat(&mut self) -> bool {
+            if self.how_hungry > 0 {
+                println!("OM NOM NOM");
+                self.how_hungry -= 2;
+                return true;
+            }
+            else {
+                println!("Not hungry!");
+                return false;
+            }
+        }
+    }
+
+    pub fn cat(in_x : usize, in_y : isize, in_name: String) -> cat {
+        cat {
+            meows: in_x,
+            how_hungry: in_y,
+            name: in_name
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/cci_class_trait.rs b/src/test/run-pass/aux/cci_class_trait.rs
new file mode 100644
index 00000000000..7ca3d7c4ac9
--- /dev/null
+++ b/src/test/run-pass/aux/cci_class_trait.rs
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod animals {
+    pub trait noisy {
+        fn speak(&mut self);
+    }
+}
diff --git a/src/test/run-pass/aux/cci_const.rs b/src/test/run-pass/aux/cci_const.rs
new file mode 100644
index 00000000000..ee8290050f9
--- /dev/null
+++ b/src/test/run-pass/aux/cci_const.rs
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub extern fn bar() {
+}
+
+pub const foopy: &'static str = "hi there";
+pub const uint_val: usize = 12;
+pub const uint_expr: usize = (1 << uint_val) - 1;
diff --git a/src/test/run-pass/aux/cci_const_block.rs b/src/test/run-pass/aux/cci_const_block.rs
new file mode 100644
index 00000000000..76fe9fe5aa4
--- /dev/null
+++ b/src/test/run-pass/aux/cci_const_block.rs
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub static BLOCK_FN_DEF: fn(usize) -> usize = {
+    fn foo(a: usize) -> usize {
+        a + 10
+    }
+    foo
+};
diff --git a/src/test/run-pass/aux/cci_impl_lib.rs b/src/test/run-pass/aux/cci_impl_lib.rs
new file mode 100644
index 00000000000..d8921f4e09a
--- /dev/null
+++ b/src/test/run-pass/aux/cci_impl_lib.rs
@@ -0,0 +1,26 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="cci_impl_lib"]
+
+pub trait uint_helpers {
+    fn to<F>(&self, v: usize, f: F) where F: FnMut(usize);
+}
+
+impl uint_helpers for usize {
+    #[inline]
+    fn to<F>(&self, v: usize, mut f: F) where F: FnMut(usize) {
+        let mut i = *self;
+        while i < v {
+            f(i);
+            i += 1;
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/cci_intrinsic.rs b/src/test/run-pass/aux/cci_intrinsic.rs
new file mode 100644
index 00000000000..b6e69d29f70
--- /dev/null
+++ b/src/test/run-pass/aux/cci_intrinsic.rs
@@ -0,0 +1,24 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(intrinsics)]
+
+pub mod rusti {
+    extern "rust-intrinsic" {
+        pub fn atomic_xchg<T>(dst: *mut T, src: T) -> T;
+    }
+}
+
+#[inline(always)]
+pub fn atomic_xchg(dst: *mut isize, src: isize) -> isize {
+    unsafe {
+        rusti::atomic_xchg(dst, src)
+    }
+}
diff --git a/src/test/run-pass/aux/cci_iter_lib.rs b/src/test/run-pass/aux/cci_iter_lib.rs
new file mode 100644
index 00000000000..07d03b4c759
--- /dev/null
+++ b/src/test/run-pass/aux/cci_iter_lib.rs
@@ -0,0 +1,21 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="cci_iter_lib"]
+
+#[inline]
+pub fn iter<T, F>(v: &[T], mut f: F) where F: FnMut(&T) {
+    let mut i = 0;
+    let n = v.len();
+    while i < n {
+        f(&v[i]);
+        i += 1;
+    }
+}
diff --git a/src/test/run-pass/aux/cci_nested_lib.rs b/src/test/run-pass/aux/cci_nested_lib.rs
new file mode 100644
index 00000000000..8c1a283a72d
--- /dev/null
+++ b/src/test/run-pass/aux/cci_nested_lib.rs
@@ -0,0 +1,63 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
+use std::cell::RefCell;
+
+pub struct Entry<A,B> {
+    key: A,
+    value: B
+}
+
+pub struct alist<A,B> {
+    eq_fn: extern "Rust" fn(A,A) -> bool,
+    data: Box<RefCell<Vec<Entry<A,B>>>>,
+}
+
+pub fn alist_add<A:'static,B:'static>(lst: &alist<A,B>, k: A, v: B) {
+    let mut data = lst.data.borrow_mut();
+    (*data).push(Entry{key:k, value:v});
+}
+
+pub fn alist_get<A:Clone + 'static,
+                 B:Clone + 'static>(
+                 lst: &alist<A,B>,
+                 k: A)
+                 -> B {
+    let eq_fn = lst.eq_fn;
+    let data = lst.data.borrow();
+    for entry in &(*data) {
+        if eq_fn(entry.key.clone(), k.clone()) {
+            return entry.value.clone();
+        }
+    }
+    panic!();
+}
+
+#[inline]
+pub fn new_int_alist<B:'static>() -> alist<isize, B> {
+    fn eq_int(a: isize, b: isize) -> bool { a == b }
+    return alist {
+        eq_fn: eq_int,
+        data: box RefCell::new(Vec::new()),
+    };
+}
+
+#[inline]
+pub fn new_int_alist_2<B:'static>() -> alist<isize, B> {
+    #[inline]
+    fn eq_int(a: isize, b: isize) -> bool { a == b }
+    return alist {
+        eq_fn: eq_int,
+        data: box RefCell::new(Vec::new()),
+    };
+}
diff --git a/src/test/run-pass/aux/cci_no_inline_lib.rs b/src/test/run-pass/aux/cci_no_inline_lib.rs
new file mode 100644
index 00000000000..4c6f808c619
--- /dev/null
+++ b/src/test/run-pass/aux/cci_no_inline_lib.rs
@@ -0,0 +1,22 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="cci_no_inline_lib"]
+
+
+// same as cci_iter_lib, more-or-less, but not marked inline
+pub fn iter<F>(v: Vec<usize> , mut f: F) where F: FnMut(usize) {
+    let mut i = 0;
+    let n = v.len();
+    while i < n {
+        f(v[i]);
+        i += 1;
+    }
+}
diff --git a/src/test/run-pass/aux/cfg_inner_static.rs b/src/test/run-pass/aux/cfg_inner_static.rs
new file mode 100644
index 00000000000..b5b4390657b
--- /dev/null
+++ b/src/test/run-pass/aux/cfg_inner_static.rs
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// this used to just ICE on compiling
+pub fn foo() {
+    if cfg!(foo) {
+        static a: isize = 3;
+        a
+    } else { 3 };
+}
diff --git a/src/test/run-pass/aux/cgu_test.rs b/src/test/run-pass/aux/cgu_test.rs
new file mode 100644
index 00000000000..7c88d3d37e3
--- /dev/null
+++ b/src/test/run-pass/aux/cgu_test.rs
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+// compile-flags: --crate-type=lib
+
+pub fn id<T>(t: T) -> T {
+  t
+}
diff --git a/src/test/run-pass/aux/cgu_test_a.rs b/src/test/run-pass/aux/cgu_test_a.rs
new file mode 100644
index 00000000000..0f0d1cd87e1
--- /dev/null
+++ b/src/test/run-pass/aux/cgu_test_a.rs
@@ -0,0 +1,25 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+// compile-flags: -Ccodegen-units=2 --crate-type=lib
+
+extern crate cgu_test;
+
+pub mod a {
+    pub fn a() {
+        ::cgu_test::id(0);
+    }
+}
+pub mod b {
+    pub fn a() {
+        ::cgu_test::id(0);
+    }
+}
diff --git a/src/test/run-pass/aux/cgu_test_b.rs b/src/test/run-pass/aux/cgu_test_b.rs
new file mode 100644
index 00000000000..0f0d1cd87e1
--- /dev/null
+++ b/src/test/run-pass/aux/cgu_test_b.rs
@@ -0,0 +1,25 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+// compile-flags: -Ccodegen-units=2 --crate-type=lib
+
+extern crate cgu_test;
+
+pub mod a {
+    pub fn a() {
+        ::cgu_test::id(0);
+    }
+}
+pub mod b {
+    pub fn a() {
+        ::cgu_test::id(0);
+    }
+}
diff --git a/src/test/run-pass/aux/check_static_recursion_foreign_helper.rs b/src/test/run-pass/aux/check_static_recursion_foreign_helper.rs
new file mode 100644
index 00000000000..c0d81cd8e1b
--- /dev/null
+++ b/src/test/run-pass/aux/check_static_recursion_foreign_helper.rs
@@ -0,0 +1,21 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Helper definition for test/run-pass/check-static-recursion-foreign.rs.
+
+#![feature(libc)]
+
+#[crate_id = "check_static_recursion_foreign_helper"]
+#[crate_type = "lib"]
+
+extern crate libc;
+
+#[no_mangle]
+pub static test_static: libc::c_int = 0;
diff --git a/src/test/run-pass/aux/coherence_copy_like_lib.rs b/src/test/run-pass/aux/coherence_copy_like_lib.rs
new file mode 100644
index 00000000000..d3d389c6a8b
--- /dev/null
+++ b/src/test/run-pass/aux/coherence_copy_like_lib.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "rlib"]
+#![feature(fundamental)]
+
+pub trait MyCopy { }
+impl MyCopy for i32 { }
+
+pub struct MyStruct<T>(T);
+
+#[fundamental]
+pub struct MyFundamentalStruct<T>(T);
diff --git a/src/test/run-pass/aux/coherence_lib.rs b/src/test/run-pass/aux/coherence_lib.rs
new file mode 100644
index 00000000000..daa123849e4
--- /dev/null
+++ b/src/test/run-pass/aux/coherence_lib.rs
@@ -0,0 +1,25 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub trait Remote {
+    fn foo(&self) { }
+}
+
+pub trait Remote1<T> {
+    fn foo(&self, t: T) { }
+}
+
+pub trait Remote2<T, U> {
+    fn foo(&self, t: T, u: U) { }
+}
+
+pub struct Pair<T,U>(T,U);
diff --git a/src/test/run-pass/aux/const_fn_lib.rs b/src/test/run-pass/aux/const_fn_lib.rs
new file mode 100644
index 00000000000..b0d5a6b1272
--- /dev/null
+++ b/src/test/run-pass/aux/const_fn_lib.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Crate that exports a const fn. Used for testing cross-crate.
+
+#![crate_type="rlib"]
+#![feature(const_fn)]
+
+pub const fn foo() -> usize { 22 } //~ ERROR const fn is unstable
diff --git a/src/test/run-pass/aux/crate-attributes-using-cfg_attr.rs b/src/test/run-pass/aux/crate-attributes-using-cfg_attr.rs
new file mode 100644
index 00000000000..0028b51f9d1
--- /dev/null
+++ b/src/test/run-pass/aux/crate-attributes-using-cfg_attr.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+// compile-flags: --cfg foo
+
+#![cfg_attr(foo, crate_type="lib")]
+
+pub fn foo() {}
diff --git a/src/test/run-pass/aux/crate-method-reexport-grrrrrrr2.rs b/src/test/run-pass/aux/crate-method-reexport-grrrrrrr2.rs
new file mode 100644
index 00000000000..f3d5bf2d65e
--- /dev/null
+++ b/src/test/run-pass/aux/crate-method-reexport-grrrrrrr2.rs
@@ -0,0 +1,41 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="crate_method_reexport_grrrrrrr2"]
+
+pub use name_pool::add;
+
+pub mod name_pool {
+    pub type name_pool = ();
+
+    pub trait add {
+        fn add(&self, s: String);
+    }
+
+    impl add for name_pool {
+        fn add(&self, _s: String) {
+        }
+    }
+}
+
+pub mod rust {
+    pub use name_pool::add;
+
+    pub type rt = Box<()>;
+
+    pub trait cx {
+        fn cx(&self);
+    }
+
+    impl cx for rt {
+        fn cx(&self) {
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/default_type_params_xc.rs b/src/test/run-pass/aux/default_type_params_xc.rs
new file mode 100644
index 00000000000..fe852e5d8ea
--- /dev/null
+++ b/src/test/run-pass/aux/default_type_params_xc.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Heap;
+
+pub struct FakeHeap;
+
+pub struct FakeVec<T, A = FakeHeap> { pub f: Option<(T,A)> }
diff --git a/src/test/run-pass/aux/derive-no-std.rs b/src/test/run-pass/aux/derive-no-std.rs
new file mode 100644
index 00000000000..f083e10bfdb
--- /dev/null
+++ b/src/test/run-pass/aux/derive-no-std.rs
@@ -0,0 +1,40 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+#![no_std]
+
+// Issue #16803
+
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+         Debug, Default, Copy)]
+pub struct Foo {
+    pub x: u32,
+}
+
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+         Debug, Copy)]
+pub enum Bar {
+    Qux,
+    Quux(u32),
+}
+
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+         Debug, Copy)]
+pub enum Void {}
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+         Debug, Copy)]
+pub struct Empty;
+#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
+         Debug, Copy)]
+pub struct AlsoEmpty {}
+
diff --git a/src/test/run-pass/aux/empty-struct.rs b/src/test/run-pass/aux/empty-struct.rs
new file mode 100644
index 00000000000..22f65c2b0d8
--- /dev/null
+++ b/src/test/run-pass/aux/empty-struct.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct XEmpty1 {}
+pub struct XEmpty2;
+
+pub enum XE {
+    XEmpty3 {},
+    XEmpty4,
+}
diff --git a/src/test/run-pass/aux/explicit_self_xcrate.rs b/src/test/run-pass/aux/explicit_self_xcrate.rs
new file mode 100644
index 00000000000..dafa66d9286
--- /dev/null
+++ b/src/test/run-pass/aux/explicit_self_xcrate.rs
@@ -0,0 +1,25 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Foo {
+    #[inline(always)]
+    fn f(&self);
+}
+
+pub struct Bar {
+    pub x: String
+}
+
+impl Foo for Bar {
+    #[inline(always)]
+    fn f(&self) {
+        println!("{}", (*self).x);
+    }
+}
diff --git a/src/test/run-pass/aux/extern-crosscrate-source.rs b/src/test/run-pass/aux/extern-crosscrate-source.rs
new file mode 100644
index 00000000000..fc2e328f686
--- /dev/null
+++ b/src/test/run-pass/aux/extern-crosscrate-source.rs
@@ -0,0 +1,41 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="externcallback"]
+#![crate_type = "lib"]
+#![feature(libc)]
+
+extern crate libc;
+
+pub mod rustrt {
+    extern crate libc;
+
+    #[link(name = "rust_test_helpers")]
+    extern {
+        pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
+                             data: libc::uintptr_t)
+                             -> libc::uintptr_t;
+    }
+}
+
+pub fn fact(n: libc::uintptr_t) -> libc::uintptr_t {
+    unsafe {
+        println!("n = {}", n);
+        rustrt::rust_dbg_call(cb, n)
+    }
+}
+
+pub extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t {
+    if data == 1 {
+        data
+    } else {
+        fact(data - 1) * data
+    }
+}
diff --git a/src/test/run-pass/aux/extern-take-value.rs b/src/test/run-pass/aux/extern-take-value.rs
new file mode 100644
index 00000000000..500c455136b
--- /dev/null
+++ b/src/test/run-pass/aux/extern-take-value.rs
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub extern fn f() -> i32 { 1 }
+pub extern fn g() -> i32 { 2 }
+
+pub fn get_f() -> extern fn() -> i32 { f }
+pub fn get_g() -> extern fn() -> i32 { g }
diff --git a/src/test/run-pass/aux/extern_calling_convention.rs b/src/test/run-pass/aux/extern_calling_convention.rs
new file mode 100644
index 00000000000..55a4226c663
--- /dev/null
+++ b/src/test/run-pass/aux/extern_calling_convention.rs
@@ -0,0 +1,36 @@
+// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Make sure Rust generates the correct calling convention for extern
+// functions.
+
+#[inline(never)]
+#[cfg(target_arch = "x86_64")]
+pub extern "win64" fn foo(a: isize, b: isize, c: isize, d: isize) {
+    assert_eq!(a, 1);
+    assert_eq!(b, 2);
+    assert_eq!(c, 3);
+    assert_eq!(d, 4);
+
+    println!("a: {}, b: {}, c: {}, d: {}",
+             a, b, c, d)
+}
+
+#[inline(never)]
+#[cfg(not(target_arch = "x86_64"))]
+pub extern fn foo(a: isize, b: isize, c: isize, d: isize) {
+    assert_eq!(a, 1);
+    assert_eq!(b, 2);
+    assert_eq!(c, 3);
+    assert_eq!(d, 4);
+
+    println!("a: {}, b: {}, c: {}, d: {}",
+             a, b, c, d)
+}
diff --git a/src/test/run-pass/aux/extern_mod_ordering_lib.rs b/src/test/run-pass/aux/extern_mod_ordering_lib.rs
new file mode 100644
index 00000000000..0fb6adfcda1
--- /dev/null
+++ b/src/test/run-pass/aux/extern_mod_ordering_lib.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub mod extern_mod_ordering_lib {
+    pub fn f() {}
+}
diff --git a/src/test/run-pass/aux/fat_drop.rs b/src/test/run-pass/aux/fat_drop.rs
new file mode 100644
index 00000000000..1f944b6ed32
--- /dev/null
+++ b/src/test/run-pass/aux/fat_drop.rs
@@ -0,0 +1,23 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub static mut DROPPED: bool = false;
+
+pub struct S {
+    _unsized: [u8]
+}
+
+impl Drop for S {
+    fn drop(&mut self) {
+        unsafe {
+            DROPPED = true;
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/fn-abi.rs b/src/test/run-pass/aux/fn-abi.rs
new file mode 100644
index 00000000000..5d380ea6a5a
--- /dev/null
+++ b/src/test/run-pass/aux/fn-abi.rs
@@ -0,0 +1,12 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[no_mangle]
+pub extern fn foo() {}
diff --git a/src/test/run-pass/aux/foreign_lib.rs b/src/test/run-pass/aux/foreign_lib.rs
new file mode 100644
index 00000000000..460d0a0088c
--- /dev/null
+++ b/src/test/run-pass/aux/foreign_lib.rs
@@ -0,0 +1,48 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="foreign_lib"]
+
+#![feature(libc)]
+
+pub mod rustrt {
+    extern crate libc;
+
+    #[link(name = "rust_test_helpers")]
+    extern {
+        pub fn rust_get_test_int() -> libc::intptr_t;
+    }
+}
+
+pub mod rustrt2 {
+    extern crate libc;
+
+    extern {
+        pub fn rust_get_test_int() -> libc::intptr_t;
+    }
+}
+
+pub mod rustrt3 {
+    // Different type, but same ABI (on all supported platforms).
+    // Ensures that we don't ICE or trigger LLVM asserts when
+    // importing the same symbol under different types.
+    // See https://github.com/rust-lang/rust/issues/32740.
+    extern {
+        pub fn rust_get_test_int() -> *const u8;
+    }
+}
+
+pub fn local_uses() {
+    unsafe {
+        let x = rustrt::rust_get_test_int();
+        assert_eq!(x, rustrt2::rust_get_test_int());
+        assert_eq!(x as *const _, rustrt3::rust_get_test_int());
+    }
+}
diff --git a/src/test/run-pass/aux/go_trait.rs b/src/test/run-pass/aux/go_trait.rs
new file mode 100644
index 00000000000..044bb606b40
--- /dev/null
+++ b/src/test/run-pass/aux/go_trait.rs
@@ -0,0 +1,53 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(specialization)]
+
+// Common code used for tests that model the Fn/FnMut/FnOnce hierarchy.
+
+pub trait Go {
+    fn go(&self, arg: isize);
+}
+
+pub fn go<G:Go>(this: &G, arg: isize) {
+    this.go(arg)
+}
+
+pub trait GoMut {
+    fn go_mut(&mut self, arg: isize);
+}
+
+pub fn go_mut<G:GoMut>(this: &mut G, arg: isize) {
+    this.go_mut(arg)
+}
+
+pub trait GoOnce {
+    fn go_once(self, arg: isize);
+}
+
+pub fn go_once<G:GoOnce>(this: G, arg: isize) {
+    this.go_once(arg)
+}
+
+impl<G> GoMut for G
+    where G : Go
+{
+    default fn go_mut(&mut self, arg: isize) {
+        go(&*self, arg)
+    }
+}
+
+impl<G> GoOnce for G
+    where G : GoMut
+{
+    default fn go_once(mut self, arg: isize) {
+        go_mut(&mut self, arg)
+    }
+}
diff --git a/src/test/run-pass/aux/i8.rs b/src/test/run-pass/aux/i8.rs
new file mode 100644
index 00000000000..44e62b99a96
--- /dev/null
+++ b/src/test/run-pass/aux/i8.rs
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// A crate named after a built-in type.
+
+pub struct Test;
diff --git a/src/test/run-pass/aux/impl_privacy_xc_1.rs b/src/test/run-pass/aux/impl_privacy_xc_1.rs
new file mode 100644
index 00000000000..ad3cdedf7ea
--- /dev/null
+++ b/src/test/run-pass/aux/impl_privacy_xc_1.rs
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub struct Fish {
+    pub x: isize
+}
+
+impl Fish {
+    pub fn swim(&self) {}
+}
diff --git a/src/test/run-pass/aux/impl_privacy_xc_2.rs b/src/test/run-pass/aux/impl_privacy_xc_2.rs
new file mode 100644
index 00000000000..c3212b0fc6d
--- /dev/null
+++ b/src/test/run-pass/aux/impl_privacy_xc_2.rs
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub struct Fish {
+    pub x: isize
+}
+
+mod unexported {
+    use super::Fish;
+    impl PartialEq for Fish {
+        fn eq(&self, _: &Fish) -> bool { true }
+        fn ne(&self, _: &Fish) -> bool { false }
+    }
+}
diff --git a/src/test/run-pass/aux/inline_dtor.rs b/src/test/run-pass/aux/inline_dtor.rs
new file mode 100644
index 00000000000..dd1fdc2e498
--- /dev/null
+++ b/src/test/run-pass/aux/inline_dtor.rs
@@ -0,0 +1,18 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="inline_dtor"]
+
+pub struct Foo;
+
+impl Drop for Foo {
+    #[inline]
+    fn drop(&mut self) {}
+}
diff --git a/src/test/run-pass/aux/inner_static.rs b/src/test/run-pass/aux/inner_static.rs
new file mode 100644
index 00000000000..0d15c13a4ef
--- /dev/null
+++ b/src/test/run-pass/aux/inner_static.rs
@@ -0,0 +1,61 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct A<T> { pub v: T }
+pub struct B<T> { pub v: T }
+
+pub mod test {
+    pub struct A<T> { pub v: T }
+
+    impl<T> A<T> {
+        pub fn foo(&self) -> isize {
+            static a: isize = 5;
+            return a
+        }
+
+        pub fn bar(&self) -> isize {
+            static a: isize = 6;
+            return a;
+        }
+    }
+}
+
+impl<T> A<T> {
+    pub fn foo(&self) -> isize {
+        static a: isize = 1;
+        return a
+    }
+
+    pub fn bar(&self) -> isize {
+        static a: isize = 2;
+        return a;
+    }
+}
+
+impl<T> B<T> {
+    pub fn foo(&self) -> isize {
+        static a: isize = 3;
+        return a
+    }
+
+    pub fn bar(&self) -> isize {
+        static a: isize = 4;
+        return a;
+    }
+}
+
+pub fn foo() -> isize {
+    let a = A { v: () };
+    let b = B { v: () };
+    let c = test::A { v: () };
+    return a.foo() + a.bar() +
+           b.foo() + b.bar() +
+           c.foo() + c.bar();
+}
diff --git a/src/test/run-pass/aux/iss.rs b/src/test/run-pass/aux/iss.rs
new file mode 100644
index 00000000000..b231efa0fec
--- /dev/null
+++ b/src/test/run-pass/aux/iss.rs
@@ -0,0 +1,22 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="issue6919_3"]
+
+// part of issue-6919.rs
+
+pub struct C<K> where K: FnOnce() {
+    pub k: K,
+}
+
+fn no_op() { }
+pub const D : C<fn()> = C {
+    k: no_op as fn()
+};
diff --git a/src/test/run-pass/aux/issue-10028.rs b/src/test/run-pass/aux/issue-10028.rs
new file mode 100644
index 00000000000..a21deb44fcc
--- /dev/null
+++ b/src/test/run-pass/aux/issue-10028.rs
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(unsafe_no_drop_flag)]
+
+#[unsafe_no_drop_flag]
+pub struct ZeroLengthThingWithDestructor;
+impl Drop for ZeroLengthThingWithDestructor {
+    fn drop(&mut self) {}
+}
+impl ZeroLengthThingWithDestructor {
+    pub fn new() -> ZeroLengthThingWithDestructor {
+        ZeroLengthThingWithDestructor
+    }
+}
diff --git a/src/test/run-pass/aux/issue-11224.rs b/src/test/run-pass/aux/issue-11224.rs
new file mode 100644
index 00000000000..15b72b37781
--- /dev/null
+++ b/src/test/run-pass/aux/issue-11224.rs
@@ -0,0 +1,26 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![deny(dead_code)]
+
+mod inner {
+    pub trait Trait {
+        fn f(&self) { f(); }
+    }
+
+    impl Trait for isize {}
+
+    fn f() {}
+}
+
+pub fn foo() {
+    let a = &1isize as &inner::Trait;
+    a.f();
+}
diff --git a/src/test/run-pass/aux/issue-11225-1.rs b/src/test/run-pass/aux/issue-11225-1.rs
new file mode 100644
index 00000000000..e1ec15be927
--- /dev/null
+++ b/src/test/run-pass/aux/issue-11225-1.rs
@@ -0,0 +1,28 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod inner {
+    pub trait Trait {
+        fn f(&self) { f(); }
+        fn f_ufcs(&self) { f_ufcs(); }
+    }
+
+    impl Trait for isize {}
+
+    fn f() {}
+    fn f_ufcs() {}
+}
+
+pub fn foo<T: inner::Trait>(t: T) {
+    t.f();
+}
+pub fn foo_ufcs<T: inner::Trait>(t: T) {
+    T::f_ufcs(&t);
+}
diff --git a/src/test/run-pass/aux/issue-11225-2.rs b/src/test/run-pass/aux/issue-11225-2.rs
new file mode 100644
index 00000000000..25110edda27
--- /dev/null
+++ b/src/test/run-pass/aux/issue-11225-2.rs
@@ -0,0 +1,38 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use inner::Trait;
+
+mod inner {
+    pub struct Foo;
+    pub trait Trait {
+        fn f(&self);
+        fn f_ufcs(&self);
+    }
+
+    impl Trait for Foo {
+        fn f(&self) { }
+        fn f_ufcs(&self) { }
+    }
+}
+
+pub trait Outer {
+    fn foo<T: Trait>(&self, t: T) { t.f(); }
+    fn foo_ufcs<T: Trait>(&self, t: T) { T::f(&t); }
+}
+
+impl Outer for isize {}
+
+pub fn foo<T: Outer>(t: T) {
+    t.foo(inner::Foo);
+}
+pub fn foo_ufcs<T: Outer>(t: T) {
+    T::foo_ufcs(&t, inner::Foo)
+}
diff --git a/src/test/run-pass/aux/issue-11225-3.rs b/src/test/run-pass/aux/issue-11225-3.rs
new file mode 100644
index 00000000000..d48fb68ba0f
--- /dev/null
+++ b/src/test/run-pass/aux/issue-11225-3.rs
@@ -0,0 +1,38 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait PrivateTrait {
+    fn private_trait_method(&self);
+    fn private_trait_method_ufcs(&self);
+}
+
+struct PrivateStruct;
+
+impl PrivateStruct {
+    fn private_inherent_method(&self) { }
+    fn private_inherent_method_ufcs(&self) { }
+}
+
+impl PrivateTrait for PrivateStruct {
+    fn private_trait_method(&self) { }
+    fn private_trait_method_ufcs(&self) { }
+}
+
+#[inline]
+pub fn public_inlinable_function() {
+    PrivateStruct.private_trait_method();
+    PrivateStruct.private_inherent_method();
+}
+
+#[inline]
+pub fn public_inlinable_function_ufcs() {
+    PrivateStruct::private_trait_method(&PrivateStruct);
+    PrivateStruct::private_inherent_method(&PrivateStruct);
+}
diff --git a/src/test/run-pass/aux/issue-11508.rs b/src/test/run-pass/aux/issue-11508.rs
new file mode 100644
index 00000000000..c5dc3439f2f
--- /dev/null
+++ b/src/test/run-pass/aux/issue-11508.rs
@@ -0,0 +1,20 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Closed01<F>(pub F);
+
+pub trait Bar { fn new() -> Self; }
+
+impl<T: Bar> Bar for Closed01<T> {
+    fn new() -> Closed01<T> { Closed01(Bar::new()) }
+}
+impl Bar for f32 { fn new() -> f32 { 1.0 } }
+
+pub fn random<T: Bar>() -> T { Bar::new() }
diff --git a/src/test/run-pass/aux/issue-11529.rs b/src/test/run-pass/aux/issue-11529.rs
new file mode 100644
index 00000000000..21ef99e3c3d
--- /dev/null
+++ b/src/test/run-pass/aux/issue-11529.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct A<'a>(pub &'a isize);
diff --git a/src/test/run-pass/aux/issue-12133-dylib.rs b/src/test/run-pass/aux/issue-12133-dylib.rs
new file mode 100644
index 00000000000..ea22258f67d
--- /dev/null
+++ b/src/test/run-pass/aux/issue-12133-dylib.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
diff --git a/src/test/run-pass/aux/issue-12133-dylib2.rs b/src/test/run-pass/aux/issue-12133-dylib2.rs
new file mode 100644
index 00000000000..fa5722ae6a3
--- /dev/null
+++ b/src/test/run-pass/aux/issue-12133-dylib2.rs
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "dylib"]
+
+extern crate issue_12133_rlib as a;
+extern crate issue_12133_dylib as b;
diff --git a/src/test/run-pass/aux/issue-12133-rlib.rs b/src/test/run-pass/aux/issue-12133-rlib.rs
new file mode 100644
index 00000000000..8e46acca124
--- /dev/null
+++ b/src/test/run-pass/aux/issue-12133-rlib.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
diff --git a/src/test/run-pass/aux/issue-12660-aux.rs b/src/test/run-pass/aux/issue-12660-aux.rs
new file mode 100644
index 00000000000..9f2bd5d0e93
--- /dev/null
+++ b/src/test/run-pass/aux/issue-12660-aux.rs
@@ -0,0 +1,21 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+#![crate_name="issue12660aux"]
+
+pub use my_mod::{MyStruct, my_fn};
+
+mod my_mod {
+    pub struct MyStruct;
+
+    pub fn my_fn(my_struct: MyStruct) {
+    }
+}
diff --git a/src/test/run-pass/aux/issue-13620-1.rs b/src/test/run-pass/aux/issue-13620-1.rs
new file mode 100644
index 00000000000..e373421fabf
--- /dev/null
+++ b/src/test/run-pass/aux/issue-13620-1.rs
@@ -0,0 +1,19 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo {
+    pub foo: extern fn()
+}
+
+extern fn the_foo() {}
+
+pub const FOO: Foo = Foo {
+    foo: the_foo
+};
diff --git a/src/test/run-pass/aux/issue-13620-2.rs b/src/test/run-pass/aux/issue-13620-2.rs
new file mode 100644
index 00000000000..554170bc130
--- /dev/null
+++ b/src/test/run-pass/aux/issue-13620-2.rs
@@ -0,0 +1,13 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate issue_13620_1 as crate1;
+
+pub static FOO2: crate1::Foo = crate1::FOO;
diff --git a/src/test/run-pass/aux/issue-13872-1.rs b/src/test/run-pass/aux/issue-13872-1.rs
new file mode 100644
index 00000000000..941b67eb2da
--- /dev/null
+++ b/src/test/run-pass/aux/issue-13872-1.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub enum A { B }
diff --git a/src/test/run-pass/aux/issue-13872-2.rs b/src/test/run-pass/aux/issue-13872-2.rs
new file mode 100644
index 00000000000..bb51417528a
--- /dev/null
+++ b/src/test/run-pass/aux/issue-13872-2.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate issue_13872_1 as foo;
+
+pub use foo::A::B;
diff --git a/src/test/run-pass/aux/issue-13872-3.rs b/src/test/run-pass/aux/issue-13872-3.rs
new file mode 100644
index 00000000000..e20618f1ec0
--- /dev/null
+++ b/src/test/run-pass/aux/issue-13872-3.rs
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate issue_13872_2 as bar;
+
+use bar::B;
+
+pub fn foo() {
+    match B {
+        B => {}
+    }
+}
diff --git a/src/test/run-pass/aux/issue-14344-1.rs b/src/test/run-pass/aux/issue-14344-1.rs
new file mode 100644
index 00000000000..78c03bac33f
--- /dev/null
+++ b/src/test/run-pass/aux/issue-14344-1.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+
+pub fn foo() {}
diff --git a/src/test/run-pass/aux/issue-14344-2.rs b/src/test/run-pass/aux/issue-14344-2.rs
new file mode 100644
index 00000000000..9df35e50adb
--- /dev/null
+++ b/src/test/run-pass/aux/issue-14344-2.rs
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate issue_14344_1;
+
+pub fn bar() {}
diff --git a/src/test/run-pass/aux/issue-14421.rs b/src/test/run-pass/aux/issue-14421.rs
new file mode 100644
index 00000000000..a48088609f9
--- /dev/null
+++ b/src/test/run-pass/aux/issue-14421.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+#![deny(warnings)]
+#![allow(dead_code)]
+
+pub use src::aliases::B;
+pub use src::hidden_core::make;
+
+mod src {
+    pub mod aliases {
+        use super::hidden_core::A;
+        pub type B = A<f32>;
+    }
+
+    pub mod hidden_core {
+        use super::aliases::B;
+
+        pub struct A<T> { t: T }
+
+        pub fn make() -> B { A { t: 1.0 } }
+
+        impl<T> A<T> {
+            pub fn foo(&mut self) { println!("called foo"); }
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/issue-14422.rs b/src/test/run-pass/aux/issue-14422.rs
new file mode 100644
index 00000000000..32af6d9255e
--- /dev/null
+++ b/src/test/run-pass/aux/issue-14422.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+#![deny(warnings)]
+
+pub use src::aliases::B;
+pub use src::hidden_core::make;
+
+mod src {
+    pub mod aliases {
+        use super::hidden_core::A;
+        pub type B = A;
+    }
+
+    pub mod hidden_core {
+        use super::aliases::B;
+
+        #[derive(Copy, Clone)]
+        pub struct A;
+
+        pub fn make() -> B { A }
+
+        impl A {
+            pub fn foo(&mut self) { println!("called foo"); }
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/issue-15562.rs b/src/test/run-pass/aux/issue-15562.rs
new file mode 100644
index 00000000000..76243d3bced
--- /dev/null
+++ b/src/test/run-pass/aux/issue-15562.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+extern {
+    pub fn transmute();
+}
diff --git a/src/test/run-pass/aux/issue-16643.rs b/src/test/run-pass/aux/issue-16643.rs
new file mode 100644
index 00000000000..b590160a0c2
--- /dev/null
+++ b/src/test/run-pass/aux/issue-16643.rs
@@ -0,0 +1,29 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub struct TreeBuilder<H> { pub h: H }
+
+impl<H> TreeBuilder<H> {
+    pub fn process_token(&mut self) {
+        match self {
+            _ => for _y in self.by_ref() {}
+        }
+    }
+}
+
+impl<H> Iterator for TreeBuilder<H> {
+    type Item = H;
+
+    fn next(&mut self) -> Option<H> {
+        None
+    }
+}
diff --git a/src/test/run-pass/aux/issue-17662.rs b/src/test/run-pass/aux/issue-17662.rs
new file mode 100644
index 00000000000..fb55a077005
--- /dev/null
+++ b/src/test/run-pass/aux/issue-17662.rs
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub trait Foo<'a, T> {
+    fn foo(&'a self) -> T;
+}
+
+pub fn foo<'a, T>(x: &'a Foo<'a, T>) -> T {
+    let x: &'a Foo<T> = x;
+    //            ^ the lifetime parameter of Foo is left to be inferred.
+    x.foo()
+    // ^ encoding this method call in metadata triggers an ICE.
+}
diff --git a/src/test/run-pass/aux/issue-17718-aux.rs b/src/test/run-pass/aux/issue-17718-aux.rs
new file mode 100644
index 00000000000..373fc042175
--- /dev/null
+++ b/src/test/run-pass/aux/issue-17718-aux.rs
@@ -0,0 +1,24 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(const_fn)]
+
+use std::sync::atomic;
+
+pub const C1: usize = 1;
+pub const C2: atomic::AtomicUsize = atomic::AtomicUsize::new(0);
+pub const C3: fn() = foo;
+pub const C4: usize = C1 * C1 + C1 / C1;
+pub const C5: &'static usize = &C4;
+
+pub static S1: usize = 3;
+pub static S2: atomic::AtomicUsize = atomic::AtomicUsize::new(0);
+
+fn foo() {}
diff --git a/src/test/run-pass/aux/issue-18501.rs b/src/test/run-pass/aux/issue-18501.rs
new file mode 100644
index 00000000000..af3bc20378c
--- /dev/null
+++ b/src/test/run-pass/aux/issue-18501.rs
@@ -0,0 +1,27 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "rlib"]
+struct Foo;
+
+trait Tr {
+    fn tr(&self);
+}
+
+impl Tr for Foo {
+    fn tr(&self) {}
+}
+
+fn take_method<T>(f: fn(&T), t: &T) {}
+
+#[inline]
+pub fn pass_method() {
+    take_method(Tr::tr, &Foo);
+}
diff --git a/src/test/run-pass/aux/issue-18514.rs b/src/test/run-pass/aux/issue-18514.rs
new file mode 100644
index 00000000000..2a5e07a3285
--- /dev/null
+++ b/src/test/run-pass/aux/issue-18514.rs
@@ -0,0 +1,27 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "rlib"]
+
+pub trait Tr {
+    fn tr(&self);
+}
+
+pub struct St<V>(pub Vec<V>);
+
+impl<V> Tr for St<V> {
+    fn tr(&self) {
+        match self {
+            &St(ref v) => {
+                v.iter();
+            }
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/issue-18711.rs b/src/test/run-pass/aux/issue-18711.rs
new file mode 100644
index 00000000000..a29dcc00cdd
--- /dev/null
+++ b/src/test/run-pass/aux/issue-18711.rs
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(unboxed_closures)]
+#![crate_type = "rlib"]
+
+pub fn inner<F>(f: F) -> F {
+    (move || f)()
+}
diff --git a/src/test/run-pass/aux/issue-18913-1.rs b/src/test/run-pass/aux/issue-18913-1.rs
new file mode 100644
index 00000000000..4315e27797f
--- /dev/null
+++ b/src/test/run-pass/aux/issue-18913-1.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+#![crate_name = "foo"]
+
+pub fn foo() -> i32 { 0 }
diff --git a/src/test/run-pass/aux/issue-18913-2.rs b/src/test/run-pass/aux/issue-18913-2.rs
new file mode 100644
index 00000000000..dcdeaec48f5
--- /dev/null
+++ b/src/test/run-pass/aux/issue-18913-2.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+#![crate_name = "foo"]
+
+pub fn foo() -> i32 { 1 }
diff --git a/src/test/run-pass/aux/issue-19340-1.rs b/src/test/run-pass/aux/issue-19340-1.rs
new file mode 100644
index 00000000000..fc61b78d8a7
--- /dev/null
+++ b/src/test/run-pass/aux/issue-19340-1.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub enum Homura {
+    Madoka { name: String },
+}
diff --git a/src/test/run-pass/aux/issue-2380.rs b/src/test/run-pass/aux/issue-2380.rs
new file mode 100644
index 00000000000..cfebc4abaaa
--- /dev/null
+++ b/src/test/run-pass/aux/issue-2380.rs
@@ -0,0 +1,26 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="a"]
+#![crate_type = "lib"]
+
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
+pub trait i<T>
+{
+    fn dummy(&self, t: T) -> T { panic!() }
+}
+
+pub fn f<T>() -> Box<i<T>+'static> {
+    impl<T> i<T> for () { }
+
+    box () as Box<i<T>+'static>
+}
diff --git a/src/test/run-pass/aux/issue-2414-a.rs b/src/test/run-pass/aux/issue-2414-a.rs
new file mode 100644
index 00000000000..8c414193bd6
--- /dev/null
+++ b/src/test/run-pass/aux/issue-2414-a.rs
@@ -0,0 +1,22 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="a"]
+#![crate_type = "lib"]
+
+type t1 = usize;
+
+trait foo {
+    fn foo(&self);
+}
+
+impl foo for String {
+    fn foo(&self) {}
+}
diff --git a/src/test/run-pass/aux/issue-2414-b.rs b/src/test/run-pass/aux/issue-2414-b.rs
new file mode 100644
index 00000000000..b1c95bcb430
--- /dev/null
+++ b/src/test/run-pass/aux/issue-2414-b.rs
@@ -0,0 +1,15 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+#![crate_name="b"]
+#![crate_type = "lib"]
+
+extern crate a;
diff --git a/src/test/run-pass/aux/issue-25185-1.rs b/src/test/run-pass/aux/issue-25185-1.rs
new file mode 100644
index 00000000000..1ec29501b76
--- /dev/null
+++ b/src/test/run-pass/aux/issue-25185-1.rs
@@ -0,0 +1,21 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![feature(linked_from)]
+
+#![crate_type = "rlib"]
+
+#[link(name = "rust_test_helpers", kind = "static")]
+#[linked_from = "rust_test_helpers"]
+extern {
+    pub fn rust_dbg_extern_identity_u32(u: u32) -> u32;
+}
diff --git a/src/test/run-pass/aux/issue-25185-2.rs b/src/test/run-pass/aux/issue-25185-2.rs
new file mode 100644
index 00000000000..00b5277d6c0
--- /dev/null
+++ b/src/test/run-pass/aux/issue-25185-2.rs
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate issue_25185_1;
+
+pub use issue_25185_1::rust_dbg_extern_identity_u32;
diff --git a/src/test/run-pass/aux/issue-2526.rs b/src/test/run-pass/aux/issue-2526.rs
new file mode 100644
index 00000000000..3d777d01d50
--- /dev/null
+++ b/src/test/run-pass/aux/issue-2526.rs
@@ -0,0 +1,54 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="issue_2526"]
+#![crate_type = "lib"]
+
+use std::marker;
+
+pub struct arc_destruct<T: Sync> {
+    _data: isize,
+    _marker: marker::PhantomData<T>
+}
+
+impl<T: Sync> Drop for arc_destruct<T> {
+    fn drop(&mut self) {}
+}
+
+fn arc_destruct<T: Sync>(data: isize) -> arc_destruct<T> {
+    arc_destruct {
+        _data: data,
+        _marker: marker::PhantomData
+    }
+}
+
+fn arc<T: Sync>(_data: T) -> arc_destruct<T> {
+    arc_destruct(0)
+}
+
+fn init() -> arc_destruct<context_res> {
+    arc(context_res())
+}
+
+pub struct context_res {
+    ctx : isize,
+}
+
+impl Drop for context_res {
+    fn drop(&mut self) {}
+}
+
+fn context_res() -> context_res {
+    context_res {
+        ctx: 0
+    }
+}
+
+pub type context = arc_destruct<context_res>;
diff --git a/src/test/run-pass/aux/issue-25467.rs b/src/test/run-pass/aux/issue-25467.rs
new file mode 100644
index 00000000000..e358cde1573
--- /dev/null
+++ b/src/test/run-pass/aux/issue-25467.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub trait Trait {
+    // the issue is sensitive to interning order - so use names
+    // unlikely to appear in libstd.
+    type Issue25467FooT;
+    type Issue25467BarT;
+}
+
+pub type Object = Option<Box<Trait<Issue25467FooT=(),Issue25467BarT=()>>>;
diff --git a/src/test/run-pass/aux/issue-2631-a.rs b/src/test/run-pass/aux/issue-2631-a.rs
new file mode 100644
index 00000000000..604a3e69a21
--- /dev/null
+++ b/src/test/run-pass/aux/issue-2631-a.rs
@@ -0,0 +1,24 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="req"]
+#![crate_type = "lib"]
+
+use std::cell::RefCell;
+use std::collections::HashMap;
+use std::rc::Rc;
+
+pub type header_map = HashMap<String, Rc<RefCell<Vec<Rc<String>>>>>;
+
+// the unused ty param is necessary so this gets monomorphized
+pub fn request<T>(req: &header_map) {
+  let data = req[&"METHOD".to_string()].clone();
+  let _x = data.borrow().clone()[0].clone();
+}
diff --git a/src/test/run-pass/aux/issue-29485.rs b/src/test/run-pass/aux/issue-29485.rs
new file mode 100644
index 00000000000..825c4497021
--- /dev/null
+++ b/src/test/run-pass/aux/issue-29485.rs
@@ -0,0 +1,26 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="a"]
+#![crate_type = "lib"]
+
+pub struct X(pub u8);
+
+impl Drop for X {
+    fn drop(&mut self) {
+        assert_eq!(self.0, 1)
+    }
+}
+
+pub fn f(x: &mut X, g: fn()) {
+    x.0 = 1;
+    g();
+    x.0 = 0;
+}
diff --git a/src/test/run-pass/aux/issue-3012-1.rs b/src/test/run-pass/aux/issue-3012-1.rs
new file mode 100644
index 00000000000..b6199f59ebe
--- /dev/null
+++ b/src/test/run-pass/aux/issue-3012-1.rs
@@ -0,0 +1,33 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="socketlib"]
+#![crate_type = "lib"]
+#![feature(libc)]
+
+pub mod socket {
+    extern crate libc;
+
+    pub struct socket_handle {
+        sockfd: libc::c_int,
+    }
+
+    impl Drop for socket_handle {
+        fn drop(&mut self) {
+            /* c::close(self.sockfd); */
+        }
+    }
+
+    pub fn socket_handle(x: libc::c_int) -> socket_handle {
+        socket_handle {
+            sockfd: x
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/issue-31702-1.rs b/src/test/run-pass/aux/issue-31702-1.rs
new file mode 100644
index 00000000000..50a31630df3
--- /dev/null
+++ b/src/test/run-pass/aux/issue-31702-1.rs
@@ -0,0 +1,26 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[derive(Copy)]
+pub struct U256(pub [u64; 4]);
+
+impl Clone for U256 {
+    fn clone(&self) -> U256 {
+        *self
+    }
+}
+
+impl U256 {
+    pub fn new(value: u64) -> U256 {
+        let mut ret = [0; 4];
+        ret[0] = value;
+        U256(ret)
+    }
+}
diff --git a/src/test/run-pass/aux/issue-31702-2.rs b/src/test/run-pass/aux/issue-31702-2.rs
new file mode 100644
index 00000000000..c5b1bc6dfb0
--- /dev/null
+++ b/src/test/run-pass/aux/issue-31702-2.rs
@@ -0,0 +1,30 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -g
+
+extern crate issue_31702_1;
+
+use std::collections::HashMap;
+use issue_31702_1::U256;
+
+pub struct Ethash {
+    engine_params: for<'a> fn() -> Option<&'a Vec<u8>>,
+    u256_params: HashMap<String, U256>,
+}
+
+impl Ethash {
+    pub fn u256_param(&mut self, name: &str) -> U256 {
+        let engine = self.engine_params;
+        *self.u256_params.entry(name.to_owned()).or_insert_with(|| {
+            engine().map_or(U256::new(0u64), |_a| loop {})
+        })
+    }
+}
diff --git a/src/test/run-pass/aux/issue-4208-cc.rs b/src/test/run-pass/aux/issue-4208-cc.rs
new file mode 100644
index 00000000000..a7c1633784d
--- /dev/null
+++ b/src/test/run-pass/aux/issue-4208-cc.rs
@@ -0,0 +1,20 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="numeric"]
+#![crate_type = "lib"]
+
+pub trait Trig<T> {
+    fn sin(&self) -> T;
+}
+
+pub fn sin<T:Trig<R>, R>(theta: &T) -> R { theta.sin() }
+
+pub trait Angle<T>: Trig<T> {}
diff --git a/src/test/run-pass/aux/issue-4545.rs b/src/test/run-pass/aux/issue-4545.rs
new file mode 100644
index 00000000000..29feeaa7d92
--- /dev/null
+++ b/src/test/run-pass/aux/issue-4545.rs
@@ -0,0 +1,12 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct S<T>(Option<T>);
+pub fn mk<T>() -> S<T> { S(None) }
diff --git a/src/test/run-pass/aux/issue-5518.rs b/src/test/run-pass/aux/issue-5518.rs
new file mode 100644
index 00000000000..cea227e050f
--- /dev/null
+++ b/src/test/run-pass/aux/issue-5518.rs
@@ -0,0 +1,14 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait A<'a, T> {
+    fn f(&mut self) -> &'a mut T;
+    fn p() -> T;
+}
diff --git a/src/test/run-pass/aux/issue-5521.rs b/src/test/run-pass/aux/issue-5521.rs
new file mode 100644
index 00000000000..82bd2b64204
--- /dev/null
+++ b/src/test/run-pass/aux/issue-5521.rs
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+use std::collections::HashMap;
+
+pub type map = Box<HashMap<usize, usize>>;
diff --git a/src/test/run-pass/aux/issue-7178.rs b/src/test/run-pass/aux/issue-7178.rs
new file mode 100644
index 00000000000..18b464bd924
--- /dev/null
+++ b/src/test/run-pass/aux/issue-7178.rs
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo<'a, A:'a>(&'a A);
+
+impl<'a, A> Foo<'a, A> {
+    pub fn new(a: &'a A) -> Foo<'a, A> {
+        Foo(a)
+    }
+}
diff --git a/src/test/run-pass/aux/issue-7899.rs b/src/test/run-pass/aux/issue-7899.rs
new file mode 100644
index 00000000000..e197e84442b
--- /dev/null
+++ b/src/test/run-pass/aux/issue-7899.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct V2<T>(pub T, pub T);
diff --git a/src/test/run-pass/aux/issue-8044.rs b/src/test/run-pass/aux/issue-8044.rs
new file mode 100644
index 00000000000..8f328699ae0
--- /dev/null
+++ b/src/test/run-pass/aux/issue-8044.rs
@@ -0,0 +1,25 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct BTree<V> {
+    pub node: TreeItem<V>,
+}
+
+pub enum TreeItem<V> {
+    TreeLeaf { value: V },
+}
+
+pub fn leaf<V>(value: V) -> TreeItem<V> {
+    TreeItem::TreeLeaf { value: value }
+}
+
+fn main() {
+    BTree::<isize> { node: leaf(1) };
+}
diff --git a/src/test/run-pass/aux/issue-8259.rs b/src/test/run-pass/aux/issue-8259.rs
new file mode 100644
index 00000000000..91167e8e32b
--- /dev/null
+++ b/src/test/run-pass/aux/issue-8259.rs
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub enum Foo<'a> {
+    A,
+    B(&'a str),
+}
diff --git a/src/test/run-pass/aux/issue-9906.rs b/src/test/run-pass/aux/issue-9906.rs
new file mode 100644
index 00000000000..5eb48985bf9
--- /dev/null
+++ b/src/test/run-pass/aux/issue-9906.rs
@@ -0,0 +1,25 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use other::FooBar;
+pub use other::foo;
+
+mod other {
+    pub struct FooBar{value: isize}
+    impl FooBar{
+        pub fn new(val: isize) -> FooBar {
+            FooBar{value: val}
+        }
+    }
+
+    pub fn foo(){
+        1+1;
+    }
+}
diff --git a/src/test/run-pass/aux/issue-9968.rs b/src/test/run-pass/aux/issue-9968.rs
new file mode 100644
index 00000000000..d04d761e112
--- /dev/null
+++ b/src/test/run-pass/aux/issue-9968.rs
@@ -0,0 +1,32 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use internal::core::{Trait, Struct};
+
+mod internal {
+    pub mod core {
+        pub struct Struct;
+        impl Struct {
+            pub fn init() -> Struct {
+                Struct
+            }
+        }
+
+        pub trait Trait {
+            fn test(&self) {
+                private();
+            }
+        }
+
+        impl Trait for Struct {}
+
+        fn private() { }
+    }
+}
diff --git a/src/test/run-pass/aux/issue13507.rs b/src/test/run-pass/aux/issue13507.rs
new file mode 100644
index 00000000000..4cb846b5186
--- /dev/null
+++ b/src/test/run-pass/aux/issue13507.rs
@@ -0,0 +1,99 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(core)]
+
+pub mod testtypes {
+    use std::any::TypeId;
+
+    pub fn type_ids() -> Vec<TypeId> {
+        vec![
+            TypeId::of::<FooBool>(),
+            TypeId::of::<FooInt>(),
+            TypeId::of::<FooUint>(),
+            TypeId::of::<FooFloat>(),
+            TypeId::of::<FooStr>(),
+            TypeId::of::<FooArray>(),
+            TypeId::of::<FooSlice>(),
+            TypeId::of::<FooBox>(),
+            TypeId::of::<FooPtr>(),
+            TypeId::of::<FooRef>(),
+            TypeId::of::<FooFnPtr>(),
+            TypeId::of::<FooNil>(),
+            TypeId::of::<FooTuple>(),
+            TypeId::of::<FooTrait>(),
+            TypeId::of::<FooStruct>(),
+            TypeId::of::<FooEnum>()
+        ]
+    }
+
+    // Tests TyBool
+    pub type FooBool = bool;
+
+    // Tests TyChar
+    pub type FooChar = char;
+
+    // Tests TyInt (does not test all variants of IntTy)
+    pub type FooInt = isize;
+
+    // Tests TyUint (does not test all variants of UintTy)
+    pub type FooUint = usize;
+
+    // Tests TyFloat (does not test all variants of FloatTy)
+    pub type FooFloat = f64;
+
+    // Tests TyStr
+    pub type FooStr = str;
+
+    // Tests TyArray
+    pub type FooArray = [u8; 1];
+
+    // Tests TySlice
+    pub type FooSlice = [u8];
+
+    // Tests TyBox (of u8)
+    pub type FooBox = Box<u8>;
+
+    // Tests TyRawPtr
+    pub type FooPtr = *const u8;
+
+    // Tests TyRef
+    pub type FooRef = &'static u8;
+
+    // Tests TyFnPtr
+    pub type FooFnPtr = fn(u8) -> bool;
+
+    // Tests TyTrait
+    pub trait FooTrait {
+        fn foo_method(&self) -> usize;
+    }
+
+    // Tests TyStruct
+    pub struct FooStruct {
+        pub pub_foo_field: usize,
+        foo_field: usize
+    }
+
+    // Tests TyEnum
+    pub enum FooEnum {
+        VarA(usize),
+        VarB(usize, usize)
+    }
+
+    // Tests TyTuple
+    pub type FooNil = ();
+    pub type FooTuple = (u8, i8, bool);
+
+    // Skipping TyParam
+
+    // Skipping TyInfer
+
+    // Skipping TyError
+}
diff --git a/src/test/run-pass/aux/issue2170lib.rs b/src/test/run-pass/aux/issue2170lib.rs
new file mode 100644
index 00000000000..b311ee35674
--- /dev/null
+++ b/src/test/run-pass/aux/issue2170lib.rs
@@ -0,0 +1,28 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn foo(_x: i32) {
+}
+
+pub struct rsrc {
+  x: i32,
+}
+
+impl Drop for rsrc {
+    fn drop(&mut self) {
+        foo(self.x);
+    }
+}
+
+pub fn rsrc(x: i32) -> rsrc {
+    rsrc {
+        x: x
+    }
+}
diff --git a/src/test/run-pass/aux/issue_10031_aux.rs b/src/test/run-pass/aux/issue_10031_aux.rs
new file mode 100644
index 00000000000..f0f1af2e3a3
--- /dev/null
+++ b/src/test/run-pass/aux/issue_10031_aux.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Wrap<A>(pub A);
diff --git a/src/test/run-pass/aux/issue_12612_1.rs b/src/test/run-pass/aux/issue_12612_1.rs
new file mode 100644
index 00000000000..a0234c1185a
--- /dev/null
+++ b/src/test/run-pass/aux/issue_12612_1.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod bar {
+    pub fn foo() {}
+}
diff --git a/src/test/run-pass/aux/issue_12612_2.rs b/src/test/run-pass/aux/issue_12612_2.rs
new file mode 100644
index 00000000000..b4ae4374b2e
--- /dev/null
+++ b/src/test/run-pass/aux/issue_12612_2.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn baz() {}
diff --git a/src/test/run-pass/aux/issue_19293.rs b/src/test/run-pass/aux/issue_19293.rs
new file mode 100644
index 00000000000..12894ad72e1
--- /dev/null
+++ b/src/test/run-pass/aux/issue_19293.rs
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo (pub isize);
+pub enum MyEnum {
+    Foo(Foo),
+}
diff --git a/src/test/run-pass/aux/issue_20389.rs b/src/test/run-pass/aux/issue_20389.rs
new file mode 100644
index 00000000000..4ce7e3079e3
--- /dev/null
+++ b/src/test/run-pass/aux/issue_20389.rs
@@ -0,0 +1,14 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait T {
+    type C;
+    fn dummy(&self) { }
+}
diff --git a/src/test/run-pass/aux/issue_2316_a.rs b/src/test/run-pass/aux/issue_2316_a.rs
new file mode 100644
index 00000000000..6bd1e7335ad
--- /dev/null
+++ b/src/test/run-pass/aux/issue_2316_a.rs
@@ -0,0 +1,13 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum cat {
+  tabby, calico, tortoiseshell
+}
diff --git a/src/test/run-pass/aux/issue_2316_b.rs b/src/test/run-pass/aux/issue_2316_b.rs
new file mode 100644
index 00000000000..8a212f6e5a9
--- /dev/null
+++ b/src/test/run-pass/aux/issue_2316_b.rs
@@ -0,0 +1,21 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(unused_imports)]
+
+extern crate issue_2316_a;
+
+pub mod cloth {
+    use issue_2316_a::*;
+
+    pub enum fabric {
+        gingham, flannel, calico
+    }
+}
diff --git a/src/test/run-pass/aux/issue_2472_b.rs b/src/test/run-pass/aux/issue_2472_b.rs
new file mode 100644
index 00000000000..5f55476427f
--- /dev/null
+++ b/src/test/run-pass/aux/issue_2472_b.rs
@@ -0,0 +1,24 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub struct S(pub ());
+
+impl S {
+    pub fn foo(&self) { }
+}
+
+pub trait T {
+    fn bar(&self);
+}
+
+impl T for S {
+    fn bar(&self) { }
+}
diff --git a/src/test/run-pass/aux/issue_2723_a.rs b/src/test/run-pass/aux/issue_2723_a.rs
new file mode 100644
index 00000000000..44bea136a7c
--- /dev/null
+++ b/src/test/run-pass/aux/issue_2723_a.rs
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub unsafe fn f(xs: Vec<isize> ) {
+    xs.iter().map(|_x| { unsafe fn q() { panic!(); } }).collect::<Vec<()>>();
+}
diff --git a/src/test/run-pass/aux/issue_3136_a.rc b/src/test/run-pass/aux/issue_3136_a.rc
new file mode 100644
index 00000000000..320e0ceed0f
--- /dev/null
+++ b/src/test/run-pass/aux/issue_3136_a.rc
@@ -0,0 +1,13 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub mod issue_3136_a;
diff --git a/src/test/run-pass/aux/issue_3136_a.rs b/src/test/run-pass/aux/issue_3136_a.rs
new file mode 100644
index 00000000000..55de208cc90
--- /dev/null
+++ b/src/test/run-pass/aux/issue_3136_a.rs
@@ -0,0 +1,24 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+trait x {
+    fn use_x<T>(&self);
+}
+struct y(());
+impl x for y {
+    fn use_x<T>(&self) {
+        struct foo { //~ ERROR quux
+            i: ()
+        }
+        fn new_foo<T>(i: ()) -> foo {
+            foo { i: i }
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/issue_3979_traits.rs b/src/test/run-pass/aux/issue_3979_traits.rs
new file mode 100644
index 00000000000..5c306be69c4
--- /dev/null
+++ b/src/test/run-pass/aux/issue_3979_traits.rs
@@ -0,0 +1,25 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="issue_3979_traits"]
+
+#![crate_type = "lib"]
+
+pub trait Positioned {
+  fn SetX(&mut self, isize);
+  fn X(&self) -> isize;
+}
+
+pub trait Movable: Positioned {
+  fn translate(&mut self, dx: isize) {
+    let x = self.X() + dx;
+    self.SetX(x);
+  }
+}
diff --git a/src/test/run-pass/aux/issue_8401.rs b/src/test/run-pass/aux/issue_8401.rs
new file mode 100644
index 00000000000..40e01c1474a
--- /dev/null
+++ b/src/test/run-pass/aux/issue_8401.rs
@@ -0,0 +1,26 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// for this issue, this code must be built in a library
+
+use std::mem;
+
+trait A {
+    fn dummy(&self) { }
+}
+struct B;
+impl A for B {}
+
+fn bar<T>(_: &mut A, _: &T) {}
+
+fn foo<T>(t: &T) {
+    let mut b = B;
+    bar(&mut b as &mut A, t)
+}
diff --git a/src/test/run-pass/aux/issue_9123.rs b/src/test/run-pass/aux/issue_9123.rs
new file mode 100644
index 00000000000..8c2546e76cf
--- /dev/null
+++ b/src/test/run-pass/aux/issue_9123.rs
@@ -0,0 +1,19 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+pub trait X {
+    fn x() {
+        fn f() { }
+        f();
+    }
+    fn dummy(&self) { }
+}
diff --git a/src/test/run-pass/aux/issue_9155.rs b/src/test/run-pass/aux/issue_9155.rs
new file mode 100644
index 00000000000..486eb8fd6f6
--- /dev/null
+++ b/src/test/run-pass/aux/issue_9155.rs
@@ -0,0 +1,17 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo<T>(T);
+
+impl<T> Foo<T> {
+    pub fn new(t: T) -> Foo<T> {
+        Foo(t)
+    }
+}
diff --git a/src/test/run-pass/aux/issue_9188.rs b/src/test/run-pass/aux/issue_9188.rs
new file mode 100644
index 00000000000..8ff85cc359d
--- /dev/null
+++ b/src/test/run-pass/aux/issue_9188.rs
@@ -0,0 +1,23 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn foo<T>() -> &'static isize {
+    if false {
+        static a: isize = 4;
+        return &a;
+    } else {
+        static a: isize = 5;
+        return &a;
+    }
+}
+
+pub fn bar() -> &'static isize {
+    foo::<isize>()
+}
diff --git a/src/test/run-pass/aux/kinds_in_metadata.rs b/src/test/run-pass/aux/kinds_in_metadata.rs
new file mode 100644
index 00000000000..82f182c04bd
--- /dev/null
+++ b/src/test/run-pass/aux/kinds_in_metadata.rs
@@ -0,0 +1,18 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+// Tests that metadata serialization works for the `Copy` kind.
+
+#![crate_type="lib"]
+
+pub fn f<T:Copy>() {}
diff --git a/src/test/run-pass/aux/linkage1.rs b/src/test/run-pass/aux/linkage1.rs
new file mode 100644
index 00000000000..ca4046d8163
--- /dev/null
+++ b/src/test/run-pass/aux/linkage1.rs
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[no_mangle]
+pub static foo: isize = 3;
+
+pub fn bar() {}
diff --git a/src/test/run-pass/aux/macro_crate_def_only.rs b/src/test/run-pass/aux/macro_crate_def_only.rs
new file mode 100644
index 00000000000..4f55ac4f65f
--- /dev/null
+++ b/src/test/run-pass/aux/macro_crate_def_only.rs
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[macro_export]
+macro_rules! make_a_5 {
+    () => (5)
+}
diff --git a/src/test/run-pass/aux/macro_crate_nonterminal.rs b/src/test/run-pass/aux/macro_crate_nonterminal.rs
new file mode 100644
index 00000000000..4f75e2b5d75
--- /dev/null
+++ b/src/test/run-pass/aux/macro_crate_nonterminal.rs
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn increment(x: usize) -> usize {
+    x + 1
+}
+
+#[macro_export]
+macro_rules! increment {
+    ($x:expr) => ($crate::increment($x))
+}
+
+pub fn check_local() {
+    assert_eq!(increment!(3), 4);
+}
diff --git a/src/test/run-pass/aux/macro_export_inner_module.rs b/src/test/run-pass/aux/macro_export_inner_module.rs
new file mode 100644
index 00000000000..84e944f69b9
--- /dev/null
+++ b/src/test/run-pass/aux/macro_export_inner_module.rs
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod inner {
+    #[macro_export]
+    macro_rules! foo {
+        () => (1)
+    }
+}
diff --git a/src/test/run-pass/aux/macro_reexport_1.rs b/src/test/run-pass/aux/macro_reexport_1.rs
new file mode 100644
index 00000000000..aaeccc6e898
--- /dev/null
+++ b/src/test/run-pass/aux/macro_reexport_1.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
+#[macro_export]
+macro_rules! reexported {
+    () => ( 3 )
+}
diff --git a/src/test/run-pass/aux/macro_reexport_2.rs b/src/test/run-pass/aux/macro_reexport_2.rs
new file mode 100644
index 00000000000..3918be88d86
--- /dev/null
+++ b/src/test/run-pass/aux/macro_reexport_2.rs
@@ -0,0 +1,16 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
+#![feature(macro_reexport)]
+
+#[macro_reexport(reexported)]
+#[macro_use] #[no_link]
+extern crate macro_reexport_1;
diff --git a/src/test/run-pass/aux/macro_reexport_2_no_use.rs b/src/test/run-pass/aux/macro_reexport_2_no_use.rs
new file mode 100644
index 00000000000..1d3dc26b0b4
--- /dev/null
+++ b/src/test/run-pass/aux/macro_reexport_2_no_use.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
+#![feature(macro_reexport)]
+
+#[macro_reexport(reexported)]
+#[no_link]
+extern crate macro_reexport_1;
diff --git a/src/test/run-pass/aux/macro_with_super_1.rs b/src/test/run-pass/aux/macro_with_super_1.rs
new file mode 100644
index 00000000000..fd2e52bb355
--- /dev/null
+++ b/src/test/run-pass/aux/macro_with_super_1.rs
@@ -0,0 +1,26 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+#[macro_export]
+macro_rules! declare {
+    () => (
+        pub fn aaa() {}
+
+        pub mod bbb {
+            use super::aaa;
+
+            pub fn ccc() {
+                aaa();
+            }
+        }
+    )
+}
diff --git a/src/test/run-pass/aux/method_self_arg1.rs b/src/test/run-pass/aux/method_self_arg1.rs
new file mode 100644
index 00000000000..348b71faf0c
--- /dev/null
+++ b/src/test/run-pass/aux/method_self_arg1.rs
@@ -0,0 +1,48 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
+static mut COUNT: u64 = 1;
+
+pub fn get_count() -> u64 { unsafe { COUNT } }
+
+#[derive(Copy, Clone)]
+pub struct Foo;
+
+impl Foo {
+    pub fn foo(self, x: &Foo) {
+        unsafe { COUNT *= 2; }
+        // Test internal call.
+        Foo::bar(&self);
+        Foo::bar(x);
+
+        Foo::baz(self);
+        Foo::baz(*x);
+
+        Foo::qux(box self);
+        Foo::qux(box *x);
+    }
+
+    pub fn bar(&self) {
+        unsafe { COUNT *= 3; }
+    }
+
+    pub fn baz(self) {
+        unsafe { COUNT *= 5; }
+    }
+
+    pub fn qux(self: Box<Foo>) {
+        unsafe { COUNT *= 7; }
+    }
+}
diff --git a/src/test/run-pass/aux/method_self_arg2.rs b/src/test/run-pass/aux/method_self_arg2.rs
new file mode 100644
index 00000000000..b67ec1b9bfc
--- /dev/null
+++ b/src/test/run-pass/aux/method_self_arg2.rs
@@ -0,0 +1,65 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
+static mut COUNT: u64 = 1;
+
+pub fn get_count() -> u64 { unsafe { COUNT } }
+
+#[derive(Copy, Clone)]
+pub struct Foo;
+
+impl Foo {
+    pub fn run_trait(self) {
+        unsafe { COUNT *= 17; }
+        // Test internal call.
+        Bar::foo1(&self);
+        Bar::foo2(self);
+        Bar::foo3(box self);
+
+        Bar::bar1(&self);
+        Bar::bar2(self);
+        Bar::bar3(box self);
+    }
+}
+
+pub trait Bar : Sized {
+    fn foo1(&self);
+    fn foo2(self);
+    fn foo3(self: Box<Self>);
+
+    fn bar1(&self) {
+        unsafe { COUNT *= 7; }
+    }
+    fn bar2(self) {
+        unsafe { COUNT *= 11; }
+    }
+    fn bar3(self: Box<Self>) {
+        unsafe { COUNT *= 13; }
+    }
+}
+
+impl Bar for Foo {
+    fn foo1(&self) {
+        unsafe { COUNT *= 2; }
+    }
+
+    fn foo2(self) {
+        unsafe { COUNT *= 3; }
+    }
+
+    fn foo3(self: Box<Foo>) {
+        unsafe { COUNT *= 5; }
+    }
+}
diff --git a/src/test/run-pass/aux/mir_external_refs.rs b/src/test/run-pass/aux/mir_external_refs.rs
new file mode 100644
index 00000000000..4cad98004d7
--- /dev/null
+++ b/src/test/run-pass/aux/mir_external_refs.rs
@@ -0,0 +1,28 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub struct S(pub u8);
+
+impl S {
+    pub fn hey() -> u8 { 24 }
+}
+
+pub trait X {
+    fn hoy(&self) -> u8 { 25 }
+}
+
+impl X for S {}
+
+pub enum E {
+    U(u8)
+}
+
+pub fn regular_fn() -> u8 { 12 }
diff --git a/src/test/run-pass/aux/moves_based_on_type_lib.rs b/src/test/run-pass/aux/moves_based_on_type_lib.rs
new file mode 100644
index 00000000000..f95be3f4a1d
--- /dev/null
+++ b/src/test/run-pass/aux/moves_based_on_type_lib.rs
@@ -0,0 +1,27 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub struct S {
+    x: isize,
+}
+
+impl Drop for S {
+    fn drop(&mut self) {
+        println!("goodbye");
+    }
+}
+
+pub fn f() {
+    let x = S { x: 1 };
+    let y = x;
+    let _z = y;
+}
diff --git a/src/test/run-pass/aux/msvc-data-only-lib.rs b/src/test/run-pass/aux/msvc-data-only-lib.rs
new file mode 100644
index 00000000000..71fb9a51948
--- /dev/null
+++ b/src/test/run-pass/aux/msvc-data-only-lib.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+
+pub static FOO: i32 = 42;
diff --git a/src/test/run-pass/aux/namespaced_enum_emulate_flat.rs b/src/test/run-pass/aux/namespaced_enum_emulate_flat.rs
new file mode 100644
index 00000000000..b7bde4a74a5
--- /dev/null
+++ b/src/test/run-pass/aux/namespaced_enum_emulate_flat.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use Foo::*;
+
+pub enum Foo {
+    A,
+    B(isize),
+    C { a: isize },
+}
+
+impl Foo {
+    pub fn foo() {}
+}
+
+pub mod nest {
+    pub use self::Bar::*;
+
+    pub enum Bar {
+        D,
+        E(isize),
+        F { a: isize },
+    }
+
+    impl Bar {
+        pub fn foo() {}
+    }
+}
diff --git a/src/test/run-pass/aux/namespaced_enums.rs b/src/test/run-pass/aux/namespaced_enums.rs
new file mode 100644
index 00000000000..3bf39b788db
--- /dev/null
+++ b/src/test/run-pass/aux/namespaced_enums.rs
@@ -0,0 +1,20 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub enum Foo {
+    A,
+    B(isize),
+    C { a: isize },
+}
+
+impl Foo {
+    pub fn foo() {}
+    pub fn bar(&self) {}
+}
diff --git a/src/test/run-pass/aux/nested_item.rs b/src/test/run-pass/aux/nested_item.rs
new file mode 100644
index 00000000000..63639c4cdb3
--- /dev/null
+++ b/src/test/run-pass/aux/nested_item.rs
@@ -0,0 +1,40 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// original problem
+pub fn foo<T>() -> isize {
+    {
+        static foo: isize = 2;
+        foo
+    }
+}
+
+// issue 8134
+struct Foo;
+impl Foo {
+    pub fn foo<T>(&self) {
+        static X: usize = 1;
+    }
+}
+
+// issue 8134
+pub struct Parser<T>(T);
+impl<T: std::iter::Iterator<Item=char>> Parser<T> {
+    fn in_doctype(&mut self) {
+        static DOCTYPEPattern: [char; 6] = ['O', 'C', 'T', 'Y', 'P', 'E'];
+    }
+}
+
+struct Bar;
+impl Foo {
+    pub fn bar<T>(&self) {
+        static X: usize = 1;
+    }
+}
diff --git a/src/test/run-pass/aux/newtype_struct_xc.rs b/src/test/run-pass/aux/newtype_struct_xc.rs
new file mode 100644
index 00000000000..be3414b7ad2
--- /dev/null
+++ b/src/test/run-pass/aux/newtype_struct_xc.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub struct Au(pub isize);
diff --git a/src/test/run-pass/aux/overloaded_autoderef_xc.rs b/src/test/run-pass/aux/overloaded_autoderef_xc.rs
new file mode 100644
index 00000000000..3c8cba13ae7
--- /dev/null
+++ b/src/test/run-pass/aux/overloaded_autoderef_xc.rs
@@ -0,0 +1,40 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::ops::Deref;
+
+struct DerefWithHelper<H, T> {
+    pub helper: H,
+    pub value: Option<T>
+}
+
+trait Helper<T> {
+    fn helper_borrow(&self) -> &T;
+}
+
+impl<T> Helper<T> for Option<T> {
+    fn helper_borrow(&self) -> &T {
+        self.as_ref().unwrap()
+    }
+}
+
+impl<T, H: Helper<T>> Deref for DerefWithHelper<H, T> {
+    type Target = T;
+
+    fn deref(&self) -> &T {
+        self.helper.helper_borrow()
+    }
+}
+
+// Test cross-crate autoderef + vtable.
+pub fn check<T: PartialEq>(x: T, y: T) -> bool {
+    let d: DerefWithHelper<Option<T>, T> = DerefWithHelper { helper: Some(x), value: None };
+    d.eq(&y)
+}
diff --git a/src/test/run-pass/aux/packed.rs b/src/test/run-pass/aux/packed.rs
new file mode 100644
index 00000000000..86f5f93e3cf
--- /dev/null
+++ b/src/test/run-pass/aux/packed.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[repr(packed)]
+pub struct S {
+    a: u8,
+    b: u32
+}
diff --git a/src/test/run-pass/aux/priv-impl-prim-ty.rs b/src/test/run-pass/aux/priv-impl-prim-ty.rs
new file mode 100644
index 00000000000..19cdede5518
--- /dev/null
+++ b/src/test/run-pass/aux/priv-impl-prim-ty.rs
@@ -0,0 +1,19 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait A {
+    fn frob(&self);
+}
+
+impl A for isize { fn frob(&self) {} }
+
+pub fn frob<T:A>(t: T) {
+    t.frob();
+}
diff --git a/src/test/run-pass/aux/privacy_reexport.rs b/src/test/run-pass/aux/privacy_reexport.rs
new file mode 100644
index 00000000000..fd97f210a55
--- /dev/null
+++ b/src/test/run-pass/aux/privacy_reexport.rs
@@ -0,0 +1,16 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub extern crate core;
+pub use foo as bar;
+
+pub mod foo {
+    pub fn frob() {}
+}
diff --git a/src/test/run-pass/aux/pub_use_mods_xcrate.rs b/src/test/run-pass/aux/pub_use_mods_xcrate.rs
new file mode 100644
index 00000000000..e4890f4fe2d
--- /dev/null
+++ b/src/test/run-pass/aux/pub_use_mods_xcrate.rs
@@ -0,0 +1,20 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod a {
+    pub use a::b::c;
+
+    pub mod b {
+        pub mod c {
+            fn f(){}
+            fn g(){}
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/pub_use_xcrate1.rs b/src/test/run-pass/aux/pub_use_xcrate1.rs
new file mode 100644
index 00000000000..41aafd64cb3
--- /dev/null
+++ b/src/test/run-pass/aux/pub_use_xcrate1.rs
@@ -0,0 +1,13 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo {
+    pub name: isize
+}
diff --git a/src/test/run-pass/aux/pub_use_xcrate2.rs b/src/test/run-pass/aux/pub_use_xcrate2.rs
new file mode 100644
index 00000000000..d59d7f2a613
--- /dev/null
+++ b/src/test/run-pass/aux/pub_use_xcrate2.rs
@@ -0,0 +1,13 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate pub_use_xcrate1;
+
+pub use pub_use_xcrate1::Foo;
diff --git a/src/test/run-pass/aux/reachable-unnameable-items.rs b/src/test/run-pass/aux/reachable-unnameable-items.rs
new file mode 100644
index 00000000000..7ec2bb9394c
--- /dev/null
+++ b/src/test/run-pass/aux/reachable-unnameable-items.rs
@@ -0,0 +1,116 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use inner_private_module::*;
+
+mod inner_private_module {
+    pub struct Unnameable1;
+    pub struct Unnameable2;
+    #[derive(Clone, Copy)]
+    pub struct Unnameable3;
+    pub struct Unnameable4;
+    pub struct Unnameable5;
+    pub struct Unnameable6;
+    pub struct Unnameable7;
+    #[derive(Default)]
+    pub struct Unnameable8;
+    pub enum UnnameableEnum {
+        NameableVariant
+    }
+    pub trait UnnameableTrait {
+        type Alias: Default;
+    }
+
+    impl Unnameable1 {
+        pub fn method_of_unnameable_type1(&self) -> &'static str {
+            "Hello1"
+        }
+    }
+    impl Unnameable2 {
+        pub fn method_of_unnameable_type2(&self) -> &'static str {
+            "Hello2"
+        }
+    }
+    impl Unnameable3 {
+        pub fn method_of_unnameable_type3(&self) -> &'static str {
+            "Hello3"
+        }
+    }
+    impl Unnameable4 {
+        pub fn method_of_unnameable_type4(&self) -> &'static str {
+            "Hello4"
+        }
+    }
+    impl Unnameable5 {
+        pub fn method_of_unnameable_type5(&self) -> &'static str {
+            "Hello5"
+        }
+    }
+    impl Unnameable6 {
+        pub fn method_of_unnameable_type6(&self) -> &'static str {
+            "Hello6"
+        }
+    }
+    impl Unnameable7 {
+        pub fn method_of_unnameable_type7(&self) -> &'static str {
+            "Hello7"
+        }
+    }
+    impl Unnameable8 {
+        pub fn method_of_unnameable_type8(&self) -> &'static str {
+            "Hello8"
+        }
+    }
+    impl UnnameableEnum {
+        pub fn method_of_unnameable_enum(&self) -> &'static str {
+            "HelloEnum"
+        }
+    }
+}
+
+pub fn function_returning_unnameable_type() -> Unnameable1 {
+    Unnameable1
+}
+
+pub const CONSTANT_OF_UNNAMEABLE_TYPE: Unnameable2 =
+                                            Unnameable2;
+
+pub fn function_accepting_unnameable_type(_: Option<Unnameable3>) {}
+
+pub type AliasOfUnnameableType = Unnameable4;
+
+impl Unnameable1 {
+    pub fn inherent_method_returning_unnameable_type(&self) -> Unnameable5 {
+        Unnameable5
+    }
+}
+
+pub trait Tr {
+    fn trait_method_returning_unnameable_type(&self) -> Unnameable6 {
+        Unnameable6
+    }
+}
+impl Tr for Unnameable1 {}
+
+pub use inner_private_module::UnnameableEnum::NameableVariant;
+
+pub struct Struct {
+    pub field_of_unnameable_type: Unnameable7
+}
+
+pub static STATIC: Struct = Struct { field_of_unnameable_type: Unnameable7 } ;
+
+impl UnnameableTrait for AliasOfUnnameableType {
+    type Alias = Unnameable8;
+}
+
+pub fn generic_function<T: UnnameableTrait>() -> T::Alias {
+    Default::default()
+}
diff --git a/src/test/run-pass/aux/reexport-should-still-link.rs b/src/test/run-pass/aux/reexport-should-still-link.rs
new file mode 100644
index 00000000000..9d5464e6526
--- /dev/null
+++ b/src/test/run-pass/aux/reexport-should-still-link.rs
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use foo::bar;
+
+mod foo {
+    pub fn bar() {}
+}
diff --git a/src/test/run-pass/aux/reexported_static_methods.rs b/src/test/run-pass/aux/reexported_static_methods.rs
new file mode 100644
index 00000000000..cc4db1a9581
--- /dev/null
+++ b/src/test/run-pass/aux/reexported_static_methods.rs
@@ -0,0 +1,53 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use sub_foo::Foo;
+pub use self::Bar as Baz;
+pub use sub_foo::Boz;
+pub use sub_foo::Bort;
+
+pub trait Bar {
+    fn bar() -> Self;
+}
+
+impl Bar for isize {
+    fn bar() -> isize { 84 }
+}
+
+pub mod sub_foo {
+    pub trait Foo {
+        fn foo() -> Self;
+    }
+
+    impl Foo for isize {
+        fn foo() -> isize { 42 }
+    }
+
+    pub struct Boz {
+        unused_str: String
+    }
+
+    impl Boz {
+        pub fn boz(i: isize) -> bool {
+            i > 0
+        }
+    }
+
+    pub enum Bort {
+        Bort1,
+        Bort2
+    }
+
+    impl Bort {
+        pub fn bort() -> String {
+            "bort()".to_string()
+        }
+    }
+}
diff --git a/src/test/run-pass/aux/sepcomp-extern-lib.rs b/src/test/run-pass/aux/sepcomp-extern-lib.rs
new file mode 100644
index 00000000000..72f1f73a81b
--- /dev/null
+++ b/src/test/run-pass/aux/sepcomp-extern-lib.rs
@@ -0,0 +1,14 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[no_mangle]
+pub extern "C" fn foo() -> usize {
+    1234
+}
diff --git a/src/test/run-pass/aux/sepcomp_cci_lib.rs b/src/test/run-pass/aux/sepcomp_cci_lib.rs
new file mode 100644
index 00000000000..c57d161d8f5
--- /dev/null
+++ b/src/test/run-pass/aux/sepcomp_cci_lib.rs
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[inline]
+pub fn cci_fn() -> usize {
+    1200
+}
+
+pub const CCI_CONST: usize = 34;
diff --git a/src/test/run-pass/aux/sepcomp_lib.rs b/src/test/run-pass/aux/sepcomp_lib.rs
new file mode 100644
index 00000000000..9aa16fb2694
--- /dev/null
+++ b/src/test/run-pass/aux/sepcomp_lib.rs
@@ -0,0 +1,31 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -C codegen-units=3 --crate-type=rlib,dylib
+
+pub mod a {
+    pub fn one() -> usize {
+        1
+    }
+}
+
+pub mod b {
+    pub fn two() -> usize {
+        2
+    }
+}
+
+pub mod c {
+    use a::one;
+    use b::two;
+    pub fn three() -> usize {
+        one() + two()
+    }
+}
diff --git a/src/test/run-pass/aux/static-function-pointer-aux.rs b/src/test/run-pass/aux/static-function-pointer-aux.rs
new file mode 100644
index 00000000000..2ccdb4e0864
--- /dev/null
+++ b/src/test/run-pass/aux/static-function-pointer-aux.rs
@@ -0,0 +1,15 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub fn f(x: isize) -> isize { -x }
+
+pub static F: fn(isize) -> isize = f;
+pub static mut MutF: fn(isize) -> isize = f;
diff --git a/src/test/run-pass/aux/static-methods-crate.rs b/src/test/run-pass/aux/static-methods-crate.rs
new file mode 100644
index 00000000000..b8fd59bf703
--- /dev/null
+++ b/src/test/run-pass/aux/static-methods-crate.rs
@@ -0,0 +1,39 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="static_methods_crate"]
+#![crate_type = "lib"]
+
+pub trait read: Sized {
+    fn readMaybe(s: String) -> Option<Self>;
+}
+
+impl read for isize {
+    fn readMaybe(s: String) -> Option<isize> {
+        s.parse().ok()
+    }
+}
+
+impl read for bool {
+    fn readMaybe(s: String) -> Option<bool> {
+        match &*s {
+          "true" => Some(true),
+          "false" => Some(false),
+          _ => None
+        }
+    }
+}
+
+pub fn read<T:read>(s: String) -> T {
+    match read::readMaybe(s) {
+      Some(x) => x,
+      _ => panic!("read panicked!")
+    }
+}
diff --git a/src/test/run-pass/aux/static_fn_inline_xc_aux.rs b/src/test/run-pass/aux/static_fn_inline_xc_aux.rs
new file mode 100644
index 00000000000..2193e12bceb
--- /dev/null
+++ b/src/test/run-pass/aux/static_fn_inline_xc_aux.rs
@@ -0,0 +1,23 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub mod num {
+    pub trait Num2 {
+        fn from_int2(n: isize) -> Self;
+    }
+}
+
+pub mod f64 {
+    impl ::num::Num2 for f64 {
+        #[inline]
+        fn from_int2(n: isize) -> f64 { return n as f64;  }
+    }
+}
diff --git a/src/test/run-pass/aux/static_fn_trait_xc_aux.rs b/src/test/run-pass/aux/static_fn_trait_xc_aux.rs
new file mode 100644
index 00000000000..44e875fbe3c
--- /dev/null
+++ b/src/test/run-pass/aux/static_fn_trait_xc_aux.rs
@@ -0,0 +1,21 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod num {
+    pub trait Num2 {
+        fn from_int2(n: isize) -> Self;
+    }
+}
+
+pub mod f64 {
+    impl ::num::Num2 for f64 {
+        fn from_int2(n: isize) -> f64 { return n as f64;  }
+    }
+}
diff --git a/src/test/run-pass/aux/static_mut_xc.rs b/src/test/run-pass/aux/static_mut_xc.rs
new file mode 100644
index 00000000000..9d677e3dc46
--- /dev/null
+++ b/src/test/run-pass/aux/static_mut_xc.rs
@@ -0,0 +1,11 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub static mut a: isize = 3;
diff --git a/src/test/run-pass/aux/struct_destructuring_cross_crate.rs b/src/test/run-pass/aux/struct_destructuring_cross_crate.rs
new file mode 100644
index 00000000000..26941b726d4
--- /dev/null
+++ b/src/test/run-pass/aux/struct_destructuring_cross_crate.rs
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub struct S {
+    pub x: isize,
+    pub y: isize,
+}
diff --git a/src/test/run-pass/aux/struct_variant_xc_aux.rs b/src/test/run-pass/aux/struct_variant_xc_aux.rs
new file mode 100644
index 00000000000..201f028b6b6
--- /dev/null
+++ b/src/test/run-pass/aux/struct_variant_xc_aux.rs
@@ -0,0 +1,18 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="struct_variant_xc_aux"]
+#![crate_type = "lib"]
+
+#[derive(Copy, Clone)]
+pub enum Enum {
+    Variant(u8),
+    StructVariant { arg: u8 }
+}
diff --git a/src/test/run-pass/aux/svh-a-base.rs b/src/test/run-pass/aux/svh-a-base.rs
new file mode 100644
index 00000000000..31a97f695f0
--- /dev/null
+++ b/src/test/run-pass/aux/svh-a-base.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/run-pass/aux/svh-a-comment.rs b/src/test/run-pass/aux/svh-a-comment.rs
new file mode 100644
index 00000000000..22e40822eec
--- /dev/null
+++ b/src/test/run-pass/aux/svh-a-comment.rs
@@ -0,0 +1,36 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+    // a comment does not affect the svh
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/run-pass/aux/svh-a-doc.rs b/src/test/run-pass/aux/svh-a-doc.rs
new file mode 100644
index 00000000000..3d8a728967a
--- /dev/null
+++ b/src/test/run-pass/aux/svh-a-doc.rs
@@ -0,0 +1,38 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+// Adding some documentation does not affect the svh.
+
+/// foo always returns three.
+pub fn foo<T:U>(_: isize) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/run-pass/aux/svh-a-macro.rs b/src/test/run-pass/aux/svh-a-macro.rs
new file mode 100644
index 00000000000..41d7eb7b186
--- /dev/null
+++ b/src/test/run-pass/aux/svh-a-macro.rs
@@ -0,0 +1,37 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+    // a macro invocation in a function body does not affect the svh,
+    // as long as it yields the same code.
+    three!()
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/run-pass/aux/svh-a-no-change.rs b/src/test/run-pass/aux/svh-a-no-change.rs
new file mode 100644
index 00000000000..31a97f695f0
--- /dev/null
+++ b/src/test/run-pass/aux/svh-a-no-change.rs
@@ -0,0 +1,35 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/run-pass/aux/svh-a-redundant-cfg.rs b/src/test/run-pass/aux/svh-a-redundant-cfg.rs
new file mode 100644
index 00000000000..e405c337abe
--- /dev/null
+++ b/src/test/run-pass/aux/svh-a-redundant-cfg.rs
@@ -0,0 +1,37 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+// cfg attribute does not affect the svh, as long as it yields the same code.
+#[cfg(not(an_unused_name))]
+pub fn foo<T:U>(_: isize) -> isize {
+    3
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/run-pass/aux/svh-a-whitespace.rs b/src/test/run-pass/aux/svh-a-whitespace.rs
new file mode 100644
index 00000000000..9ef788c9842
--- /dev/null
+++ b/src/test/run-pass/aux/svh-a-whitespace.rs
@@ -0,0 +1,37 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! The `svh-a-*.rs` files are all deviations from the base file
+//! svh-a-base.rs with some difference (usually in `fn foo`) that
+//! should not affect the strict version hash (SVH) computation
+//! (#14132).
+
+#![crate_name = "a"]
+
+macro_rules! three {
+    () => { 3 }
+}
+
+pub trait U {}
+pub trait V {}
+impl U for () {}
+impl V for () {}
+
+static A_CONSTANT : isize = 2;
+
+pub fn foo<T:U>(_: isize) -> isize {
+
+    3
+
+}
+
+pub fn an_unused_name() -> isize {
+    4
+}
diff --git a/src/test/run-pass/aux/svh-b.rs b/src/test/run-pass/aux/svh-b.rs
new file mode 100644
index 00000000000..b8946fdc995
--- /dev/null
+++ b/src/test/run-pass/aux/svh-b.rs
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! This is a client of the `a` crate defined in "svn-a-base.rs".  The
+//! rpass and cfail tests (such as "run-pass/svh-add-comment.rs") use
+//! it by swapping in a different object code library crate built from
+//! some variant of "svn-a-base.rs", and then we are checking if the
+//! compiler properly ignores or accepts the change, based on whether
+//! the change could affect the downstream crate content or not
+//! (#14132).
+
+#![crate_name = "b"]
+
+extern crate a;
+
+pub fn foo() { assert_eq!(a::foo::<()>(0), 3); }
diff --git a/src/test/run-pass/aux/thread-local-extern-static.rs b/src/test/run-pass/aux/thread-local-extern-static.rs
new file mode 100644
index 00000000000..d1971a5e1ae
--- /dev/null
+++ b/src/test/run-pass/aux/thread-local-extern-static.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(thread_local)]
+#![feature(cfg_target_thread_local)]
+#![crate_type = "lib"]
+
+#[no_mangle]
+#[cfg_attr(target_thread_local, thread_local)]
+pub static FOO: u32 = 3;
diff --git a/src/test/run-pass/aux/trait_default_method_xc_aux.rs b/src/test/run-pass/aux/trait_default_method_xc_aux.rs
new file mode 100644
index 00000000000..c1168a912dc
--- /dev/null
+++ b/src/test/run-pass/aux/trait_default_method_xc_aux.rs
@@ -0,0 +1,50 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Something { pub x: isize }
+
+pub trait A {
+    fn f(&self) -> isize;
+    fn g(&self) -> isize { 10 }
+    fn h(&self) -> isize { 11 }
+    fn lurr(x: &Self, y: &Self) -> isize { x.g() + y.h() }
+}
+
+
+impl A for isize {
+    fn f(&self) -> isize { 10 }
+}
+
+impl A for Something {
+    fn f(&self) -> isize { 10 }
+}
+
+pub trait B<T> {
+    fn thing<U>(&self, x: T, y: U) -> (T, U) { (x, y) }
+    fn staticthing<U>(_z: &Self, x: T, y: U) -> (T, U) { (x, y) }
+}
+
+impl<T> B<T> for isize { }
+impl B<f64> for bool { }
+
+
+
+pub trait TestEquality {
+    fn test_eq(&self, rhs: &Self) -> bool;
+    fn test_neq(&self, rhs: &Self) -> bool {
+        !self.test_eq(rhs)
+    }
+}
+
+impl TestEquality for isize {
+    fn test_eq(&self, rhs: &isize) -> bool {
+        *self == *rhs
+    }
+}
diff --git a/src/test/run-pass/aux/trait_default_method_xc_aux_2.rs b/src/test/run-pass/aux/trait_default_method_xc_aux_2.rs
new file mode 100644
index 00000000000..7443ef9c0f3
--- /dev/null
+++ b/src/test/run-pass/aux/trait_default_method_xc_aux_2.rs
@@ -0,0 +1,27 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:trait_default_method_xc_aux.rs
+
+extern crate trait_default_method_xc_aux as aux;
+use aux::A;
+
+pub struct a_struct { pub x: isize }
+
+impl A for a_struct {
+    fn f(&self) -> isize { 10 }
+}
+
+// This function will need to get inlined, and badness may result.
+pub fn welp<A>(x: A) -> A {
+    let a = a_struct { x: 0 };
+    a.g();
+    x
+}
diff --git a/src/test/run-pass/aux/trait_inheritance_auto_xc_2_aux.rs b/src/test/run-pass/aux/trait_inheritance_auto_xc_2_aux.rs
new file mode 100644
index 00000000000..af0128d9676
--- /dev/null
+++ b/src/test/run-pass/aux/trait_inheritance_auto_xc_2_aux.rs
@@ -0,0 +1,19 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Foo { fn f(&self) -> isize; }
+pub trait Bar { fn g(&self) -> isize; }
+pub trait Baz { fn h(&self) -> isize; }
+
+pub struct A { pub x: isize }
+
+impl Foo for A { fn f(&self) -> isize { 10 } }
+impl Bar for A { fn g(&self) -> isize { 20 } }
+impl Baz for A { fn h(&self) -> isize { 30 } }
diff --git a/src/test/run-pass/aux/trait_inheritance_auto_xc_aux.rs b/src/test/run-pass/aux/trait_inheritance_auto_xc_aux.rs
new file mode 100644
index 00000000000..6be1f8c45f4
--- /dev/null
+++ b/src/test/run-pass/aux/trait_inheritance_auto_xc_aux.rs
@@ -0,0 +1,17 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Foo { fn f(&self) -> isize; }
+pub trait Bar { fn g(&self) -> isize; }
+pub trait Baz { fn h(&self) -> isize; }
+
+pub trait Quux: Foo + Bar + Baz { }
+
+impl<T:Foo + Bar + Baz> Quux for T { }
diff --git a/src/test/run-pass/aux/trait_inheritance_cross_trait_call_xc_aux.rs b/src/test/run-pass/aux/trait_inheritance_cross_trait_call_xc_aux.rs
new file mode 100644
index 00000000000..9eeb815c5de
--- /dev/null
+++ b/src/test/run-pass/aux/trait_inheritance_cross_trait_call_xc_aux.rs
@@ -0,0 +1,22 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+pub trait Foo {
+    fn f(&self) -> isize;
+}
+
+pub struct A {
+    pub x: isize
+}
+
+impl Foo for A {
+    fn f(&self) -> isize { 10 }
+}
diff --git a/src/test/run-pass/aux/trait_inheritance_overloading_xc.rs b/src/test/run-pass/aux/trait_inheritance_overloading_xc.rs
new file mode 100644
index 00000000000..1bfada612eb
--- /dev/null
+++ b/src/test/run-pass/aux/trait_inheritance_overloading_xc.rs
@@ -0,0 +1,48 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::cmp::PartialEq;
+use std::ops::{Add, Sub, Mul};
+
+pub trait MyNum : Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + PartialEq + Clone {
+}
+
+#[derive(Clone, Debug)]
+pub struct MyInt {
+    pub val: isize
+}
+
+impl Add for MyInt {
+    type Output = MyInt;
+
+    fn add(self, other: MyInt) -> MyInt { mi(self.val + other.val) }
+}
+
+impl Sub for MyInt {
+    type Output = MyInt;
+
+    fn sub(self, other: MyInt) -> MyInt { mi(self.val - other.val) }
+}
+
+impl Mul for MyInt {
+    type Output = MyInt;
+
+    fn mul(self, other: MyInt) -> MyInt { mi(self.val * other.val) }
+}
+
+impl PartialEq for MyInt {
+    fn eq(&self, other: &MyInt) -> bool { self.val == other.val }
+
+    fn ne(&self, other: &MyInt) -> bool { !self.eq(other) }
+}
+
+impl MyNum for MyInt {}
+
+fn mi(v: isize) -> MyInt { MyInt { val: v } }
diff --git a/src/test/run-pass/aux/trait_safety_lib.rs b/src/test/run-pass/aux/trait_safety_lib.rs
new file mode 100644
index 00000000000..585a756fd07
--- /dev/null
+++ b/src/test/run-pass/aux/trait_safety_lib.rs
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Simple smoke test that unsafe traits can be compiled etc.
+
+pub unsafe trait Foo {
+    fn foo(&self) -> isize;
+}
+
+unsafe impl Foo for isize {
+    fn foo(&self) -> isize { *self }
+}
diff --git a/src/test/run-pass/aux/trait_superkinds_in_metadata.rs b/src/test/run-pass/aux/trait_superkinds_in_metadata.rs
new file mode 100644
index 00000000000..0fa2d3459f4
--- /dev/null
+++ b/src/test/run-pass/aux/trait_superkinds_in_metadata.rs
@@ -0,0 +1,18 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test library crate for cross-crate usages of traits inheriting
+// from the builtin kinds. Mostly tests metadata correctness.
+
+#![crate_type="lib"]
+
+pub trait RequiresShare : Sync { }
+pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
+pub trait RequiresCopy : Copy { }
diff --git a/src/test/run-pass/aux/traitimpl.rs b/src/test/run-pass/aux/traitimpl.rs
new file mode 100644
index 00000000000..22e79cc6284
--- /dev/null
+++ b/src/test/run-pass/aux/traitimpl.rs
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test inherent trait impls work cross-crait.
+
+pub trait Bar<'a> : 'a {}
+
+impl<'a> Bar<'a> {
+    pub fn bar(&self) {}
+}
diff --git a/src/test/run-pass/aux/two_macros.rs b/src/test/run-pass/aux/two_macros.rs
new file mode 100644
index 00000000000..060960f0dbc
--- /dev/null
+++ b/src/test/run-pass/aux/two_macros.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[macro_export]
+macro_rules! macro_one { () => ("one") }
+
+#[macro_export]
+macro_rules! macro_two { () => ("two") }
diff --git a/src/test/run-pass/aux/typeid-intrinsic-aux1.rs b/src/test/run-pass/aux/typeid-intrinsic-aux1.rs
new file mode 100644
index 00000000000..388d3238d42
--- /dev/null
+++ b/src/test/run-pass/aux/typeid-intrinsic-aux1.rs
@@ -0,0 +1,34 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(core)]
+
+use std::any::{Any, TypeId};
+
+pub struct A;
+pub struct B(Option<A>);
+pub struct C(Option<isize>);
+pub struct D(Option<&'static str>);
+pub struct E(Result<&'static str, isize>);
+
+pub type F = Option<isize>;
+pub type G = usize;
+pub type H = &'static str;
+
+pub unsafe fn id_A() -> TypeId { TypeId::of::<A>() }
+pub unsafe fn id_B() -> TypeId { TypeId::of::<B>() }
+pub unsafe fn id_C() -> TypeId { TypeId::of::<C>() }
+pub unsafe fn id_D() -> TypeId { TypeId::of::<D>() }
+pub unsafe fn id_E() -> TypeId { TypeId::of::<E>() }
+pub unsafe fn id_F() -> TypeId { TypeId::of::<F>() }
+pub unsafe fn id_G() -> TypeId { TypeId::of::<G>() }
+pub unsafe fn id_H() -> TypeId { TypeId::of::<H>() }
+
+pub unsafe fn foo<T: Any>() -> TypeId { TypeId::of::<T>() }
diff --git a/src/test/run-pass/aux/typeid-intrinsic-aux2.rs b/src/test/run-pass/aux/typeid-intrinsic-aux2.rs
new file mode 100644
index 00000000000..3ad307fd3b5
--- /dev/null
+++ b/src/test/run-pass/aux/typeid-intrinsic-aux2.rs
@@ -0,0 +1,34 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(core)]
+
+use std::any::{Any, TypeId};
+
+pub struct A;
+pub struct B(Option<A>);
+pub struct C(Option<isize>);
+pub struct D(Option<&'static str>);
+pub struct E(Result<&'static str, isize>);
+
+pub type F = Option<isize>;
+pub type G = usize;
+pub type H = &'static str;
+
+pub unsafe fn id_A() -> TypeId { TypeId::of::<A>() }
+pub unsafe fn id_B() -> TypeId { TypeId::of::<B>() }
+pub unsafe fn id_C() -> TypeId { TypeId::of::<C>() }
+pub unsafe fn id_D() -> TypeId { TypeId::of::<D>() }
+pub unsafe fn id_E() -> TypeId { TypeId::of::<E>() }
+pub unsafe fn id_F() -> TypeId { TypeId::of::<F>() }
+pub unsafe fn id_G() -> TypeId { TypeId::of::<G>() }
+pub unsafe fn id_H() -> TypeId { TypeId::of::<H>() }
+
+pub unsafe fn foo<T:Any>() -> TypeId { TypeId::of::<T>() }
diff --git a/src/test/run-pass/aux/unboxed-closures-cross-crate.rs b/src/test/run-pass/aux/unboxed-closures-cross-crate.rs
new file mode 100644
index 00000000000..dac20dd2f7a
--- /dev/null
+++ b/src/test/run-pass/aux/unboxed-closures-cross-crate.rs
@@ -0,0 +1,28 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(unboxed_closures)]
+
+use std::ops::Add;
+
+#[inline]
+pub fn has_closures() -> usize {
+    let x = 1;
+    let mut f = move || x;
+    let y = 1;
+    let g = || y;
+    f() + g()
+}
+
+pub fn has_generic_closures<T: Add<Output=T> + Copy>(x: T, y: T) -> T {
+    let mut f = move || x;
+    let g = || y;
+    f() + g()
+}
diff --git a/src/test/run-pass/aux/weak-lang-items.rs b/src/test/run-pass/aux/weak-lang-items.rs
new file mode 100644
index 00000000000..6434e62b6f7
--- /dev/null
+++ b/src/test/run-pass/aux/weak-lang-items.rs
@@ -0,0 +1,32 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// no-prefer-dynamic
+
+// This aux-file will require the eh_personality function to be codegen'd, but
+// it hasn't been defined just yet. Make sure we don't explode.
+
+#![no_std]
+#![crate_type = "rlib"]
+
+struct A;
+
+impl core::ops::Drop for A {
+    fn drop(&mut self) {}
+}
+
+pub fn foo() {
+    let _a = A;
+    panic!("wut");
+}
+
+mod std {
+    pub use core::{option, fmt};
+}
diff --git a/src/test/run-pass/aux/where_clauses_xc.rs b/src/test/run-pass/aux/where_clauses_xc.rs
new file mode 100644
index 00000000000..4549bd719c6
--- /dev/null
+++ b/src/test/run-pass/aux/where_clauses_xc.rs
@@ -0,0 +1,29 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait Equal {
+    fn equal(&self, other: &Self) -> bool;
+    fn equals<T,U>(&self, this: &T, that: &T, x: &U, y: &U) -> bool
+            where T: Eq, U: Eq;
+}
+
+impl<T> Equal for T where T: Eq {
+    fn equal(&self, other: &T) -> bool {
+        self == other
+    }
+    fn equals<U,X>(&self, this: &U, other: &U, x: &X, y: &X) -> bool
+            where U: Eq, X: Eq {
+        this == other && x == y
+    }
+}
+
+pub fn equal<T>(x: &T, y: &T) -> bool where T: Eq {
+    x == y
+}
diff --git a/src/test/run-pass/aux/xcrate-trait-lifetime-param.rs b/src/test/run-pass/aux/xcrate-trait-lifetime-param.rs
new file mode 100644
index 00000000000..e8e5cc53aa3
--- /dev/null
+++ b/src/test/run-pass/aux/xcrate-trait-lifetime-param.rs
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub trait FromBuf<'a> {
+    fn from_buf(&'a [u8]) -> Self;
+}
diff --git a/src/test/run-pass/aux/xcrate_address_insignificant.rs b/src/test/run-pass/aux/xcrate_address_insignificant.rs
new file mode 100644
index 00000000000..5195839c067
--- /dev/null
+++ b/src/test/run-pass/aux/xcrate_address_insignificant.rs
@@ -0,0 +1,18 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn foo<T>() -> isize {
+    static a: isize = 3;
+    a
+}
+
+pub fn bar() -> isize {
+    foo::<isize>()
+}
diff --git a/src/test/run-pass/aux/xcrate_associated_type_defaults.rs b/src/test/run-pass/aux/xcrate_associated_type_defaults.rs
new file mode 100644
index 00000000000..6779438c672
--- /dev/null
+++ b/src/test/run-pass/aux/xcrate_associated_type_defaults.rs
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(associated_type_defaults)]
+
+pub trait Foo<T: Default + ToString> {
+    type Out: Default + ToString = T;
+}
+
+impl Foo<u32> for () {
+}
+
+impl Foo<u64> for () {
+    type Out = bool;
+}
diff --git a/src/test/run-pass/aux/xcrate_static_addresses.rs b/src/test/run-pass/aux/xcrate_static_addresses.rs
new file mode 100644
index 00000000000..d0da80e31b9
--- /dev/null
+++ b/src/test/run-pass/aux/xcrate_static_addresses.rs
@@ -0,0 +1,27 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub static global: isize = 3;
+
+static global0: isize = 4;
+
+pub static global2: &'static isize = &global0;
+
+pub fn verify_same(a: &'static isize) {
+    let a = a as *const isize as usize;
+    let b = &global as *const isize as usize;
+    assert_eq!(a, b);
+}
+
+pub fn verify_same2(a: &'static isize) {
+    let a = a as *const isize as usize;
+    let b = global2 as *const isize as usize;
+    assert_eq!(a, b);
+}
diff --git a/src/test/run-pass/aux/xcrate_struct_aliases.rs b/src/test/run-pass/aux/xcrate_struct_aliases.rs
new file mode 100644
index 00000000000..334f7829bd1
--- /dev/null
+++ b/src/test/run-pass/aux/xcrate_struct_aliases.rs
@@ -0,0 +1,16 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct S {
+    pub x: isize,
+    pub y: isize,
+}
+
+pub type S2 = S;
diff --git a/src/test/run-pass/aux/xcrate_unit_struct.rs b/src/test/run-pass/aux/xcrate_unit_struct.rs
new file mode 100644
index 00000000000..7a69be2b06c
--- /dev/null
+++ b/src/test/run-pass/aux/xcrate_unit_struct.rs
@@ -0,0 +1,38 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "lib"]
+
+// used by the rpass test
+
+#[derive(Copy, Clone)]
+pub struct Struct;
+
+#[derive(Copy, Clone)]
+pub enum Unit {
+    UnitVariant,
+    Argument(Struct)
+}
+
+#[derive(Copy, Clone)]
+pub struct TupleStruct(pub usize, pub &'static str);
+
+// used by the cfail test
+
+#[derive(Copy, Clone)]
+pub struct StructWithFields {
+    foo: isize,
+}
+
+#[derive(Copy, Clone)]
+pub enum EnumWithVariants {
+    EnumVariant,
+    EnumVariantArg(isize)
+}
diff --git a/src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans.rs b/src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans.rs
new file mode 100644
index 00000000000..b37533d2da7
--- /dev/null
+++ b/src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans.rs
@@ -0,0 +1,30 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "rlib"]
+// no-prefer-dynamic
+
+// compile-flags: -g
+
+#[macro_use]
+mod crate_with_invalid_spans_macros;
+
+pub fn exported_generic<T>(x: T, y: u32) -> (T, u32) {
+    // Using the add1 macro will produce an invalid span, because the `y` passed
+    // to the macro will have a span from this file, but the rest of the code
+    // generated from the macro will have spans from the macro-defining file.
+    // The AST node for the (1 + y) expression generated by the macro will then
+    // take it's `lo` span bound from the `1` literal in the macro-defining file
+    // and it's `hi` bound from `y` in this file, which should be lower than the
+    // `lo` and even lower than the lower bound of the FileMap it is supposedly
+    // contained in because the FileMap for this file was allocated earlier than
+    // the FileMap of the macro-defining file.
+    return (x, add1!(y));
+}
diff --git a/src/test/auxiliary/crate_with_invalid_spans_macros.rs b/src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans_macros.rs
similarity index 100%
rename from src/test/auxiliary/crate_with_invalid_spans_macros.rs
rename to src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans_macros.rs
diff --git a/src/test/run-pass/import-crate-with-invalid-spans.rs b/src/test/run-pass/import-crate-with-invalid-spans/main.rs
similarity index 100%
rename from src/test/run-pass/import-crate-with-invalid-spans.rs
rename to src/test/run-pass/import-crate-with-invalid-spans/main.rs
diff --git a/src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_lib.rs b/src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_lib.rs
new file mode 100644
index 00000000000..f1624fd2e58
--- /dev/null
+++ b/src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_lib.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+// This is a file that pulls in a separate file as a submodule, where
+// that separate file has many multi-byte characters, to try to
+// encourage the compiler to trip on them.
+
+mod issue24687_mbcs_in_comments;
+
+pub use issue24687_mbcs_in_comments::D;
+
diff --git a/src/test/auxiliary/issue24687_mbcs_in_comments.rs b/src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_mbcs_in_comments.rs
similarity index 100%
rename from src/test/auxiliary/issue24687_mbcs_in_comments.rs
rename to src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_mbcs_in_comments.rs
diff --git a/src/test/run-pass/issue24687-embed-debuginfo.rs b/src/test/run-pass/issue24687-embed-debuginfo/main.rs
similarity index 100%
rename from src/test/run-pass/issue24687-embed-debuginfo.rs
rename to src/test/run-pass/issue24687-embed-debuginfo/main.rs
diff --git a/src/test/run-pass/specialization/aux/go_trait.rs b/src/test/run-pass/specialization/aux/go_trait.rs
new file mode 100644
index 00000000000..044bb606b40
--- /dev/null
+++ b/src/test/run-pass/specialization/aux/go_trait.rs
@@ -0,0 +1,53 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(specialization)]
+
+// Common code used for tests that model the Fn/FnMut/FnOnce hierarchy.
+
+pub trait Go {
+    fn go(&self, arg: isize);
+}
+
+pub fn go<G:Go>(this: &G, arg: isize) {
+    this.go(arg)
+}
+
+pub trait GoMut {
+    fn go_mut(&mut self, arg: isize);
+}
+
+pub fn go_mut<G:GoMut>(this: &mut G, arg: isize) {
+    this.go_mut(arg)
+}
+
+pub trait GoOnce {
+    fn go_once(self, arg: isize);
+}
+
+pub fn go_once<G:GoOnce>(this: G, arg: isize) {
+    this.go_once(arg)
+}
+
+impl<G> GoMut for G
+    where G : Go
+{
+    default fn go_mut(&mut self, arg: isize) {
+        go(&*self, arg)
+    }
+}
+
+impl<G> GoOnce for G
+    where G : GoMut
+{
+    default fn go_once(mut self, arg: isize) {
+        go_mut(&mut self, arg)
+    }
+}
diff --git a/src/test/run-pass/specialization/aux/specialization_cross_crate.rs b/src/test/run-pass/specialization/aux/specialization_cross_crate.rs
new file mode 100644
index 00000000000..1d235336de8
--- /dev/null
+++ b/src/test/run-pass/specialization/aux/specialization_cross_crate.rs
@@ -0,0 +1,82 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(specialization)]
+
+pub trait Foo {
+    fn foo(&self) -> &'static str;
+}
+
+impl<T> Foo for T {
+    default fn foo(&self) -> &'static str {
+        "generic"
+    }
+}
+
+impl<T: Clone> Foo for T {
+    default fn foo(&self) -> &'static str {
+        "generic Clone"
+    }
+}
+
+impl<T, U> Foo for (T, U) where T: Clone, U: Clone {
+    default fn foo(&self) -> &'static str {
+        "generic pair"
+    }
+}
+
+impl<T: Clone> Foo for (T, T) {
+    default fn foo(&self) -> &'static str {
+        "generic uniform pair"
+    }
+}
+
+impl Foo for (u8, u32) {
+    default fn foo(&self) -> &'static str {
+        "(u8, u32)"
+    }
+}
+
+impl Foo for (u8, u8) {
+    default fn foo(&self) -> &'static str {
+        "(u8, u8)"
+    }
+}
+
+impl<T: Clone> Foo for Vec<T> {
+    default fn foo(&self) -> &'static str {
+        "generic Vec"
+    }
+}
+
+impl Foo for Vec<i32> {
+    fn foo(&self) -> &'static str {
+        "Vec<i32>"
+    }
+}
+
+impl Foo for String {
+    fn foo(&self) -> &'static str {
+        "String"
+    }
+}
+
+impl Foo for i32 {
+    fn foo(&self) -> &'static str {
+        "i32"
+    }
+}
+
+pub trait MyMarker {}
+impl<T: Clone + MyMarker> Foo for T {
+    default fn foo(&self) -> &'static str {
+        "generic Clone + MyMarker"
+    }
+}
diff --git a/src/test/run-pass/specialization/aux/specialization_cross_crate_defaults.rs b/src/test/run-pass/specialization/aux/specialization_cross_crate_defaults.rs
new file mode 100644
index 00000000000..b62d80b589f
--- /dev/null
+++ b/src/test/run-pass/specialization/aux/specialization_cross_crate_defaults.rs
@@ -0,0 +1,49 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+#![feature(specialization)]
+
+// First, test only use of explicit `default` items:
+
+pub trait Foo {
+    fn foo(&self) -> bool;
+}
+
+impl<T> Foo for T {
+    default fn foo(&self) -> bool { false }
+}
+
+impl Foo for i32 {}
+
+impl Foo for i64 {
+    fn foo(&self) -> bool { true }
+}
+
+// Next, test mixture of explicit `default` and provided methods:
+
+pub trait Bar {
+    fn bar(&self) -> i32 { 0 }
+}
+
+impl<T> Bar for T {} // use the provided method
+
+impl Bar for i32 {
+    fn bar(&self) -> i32 { 1 }
+}
+impl<'a> Bar for &'a str {}
+
+impl<T> Bar for Vec<T> {
+    default fn bar(&self) -> i32 { 2 }
+}
+impl Bar for Vec<i32> {}
+impl Bar for Vec<i64> {
+    fn bar(&self) -> i32 { 3 }
+}
diff --git a/src/test/rustdoc/aux/empty.rs b/src/test/rustdoc/aux/empty.rs
new file mode 100644
index 00000000000..30669470522
--- /dev/null
+++ b/src/test/rustdoc/aux/empty.rs
@@ -0,0 +1,9 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
diff --git a/src/test/rustdoc/aux/inline-default-methods.rs b/src/test/rustdoc/aux/inline-default-methods.rs
new file mode 100644
index 00000000000..e21e6ad2043
--- /dev/null
+++ b/src/test/rustdoc/aux/inline-default-methods.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub trait Foo {
+    fn bar(&self);
+    fn foo(&mut self) {}
+}
diff --git a/src/test/rustdoc/aux/issue-13698.rs b/src/test/rustdoc/aux/issue-13698.rs
new file mode 100644
index 00000000000..ecddfe99b3b
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-13698.rs
@@ -0,0 +1,18 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub trait Foo {
+    #[doc(hidden)]
+    fn foo(&self) {}
+}
+
+impl Foo for i32 {}
diff --git a/src/test/rustdoc/aux/issue-15318.rs b/src/test/rustdoc/aux/issue-15318.rs
new file mode 100644
index 00000000000..145b4df6299
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-15318.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+#![doc(html_root_url = "http://example.com/")]
+
+/// dox
+#[doc(primitive = "pointer")]
+pub mod ptr {}
diff --git a/src/test/rustdoc/aux/issue-17476.rs b/src/test/rustdoc/aux/issue-17476.rs
new file mode 100644
index 00000000000..644d1634e9d
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-17476.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+#![doc(html_root_url = "http://example.com")]
+
+pub trait Foo {
+    fn foo(&self) {}
+}
diff --git a/src/test/rustdoc/aux/issue-19190-3.rs b/src/test/rustdoc/aux/issue-19190-3.rs
new file mode 100644
index 00000000000..2c9271202a6
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-19190-3.rs
@@ -0,0 +1,33 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+use std::ops::Deref;
+
+pub struct Foo;
+
+impl Deref for Foo {
+    type Target = i32;
+    fn deref(&self) -> &i32 { loop {} }
+}
+
+pub struct Bar;
+pub struct Baz;
+
+impl Baz {
+    pub fn baz(&self) {}
+    pub fn static_baz() {}
+}
+
+impl Deref for Bar {
+    type Target = Baz;
+    fn deref(&self) -> &Baz { loop {} }
+}
diff --git a/src/test/rustdoc/aux/issue-20646.rs b/src/test/rustdoc/aux/issue-20646.rs
new file mode 100644
index 00000000000..815b78a91d9
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-20646.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub trait Trait {
+    type Output;
+}
+
+pub fn fun<T>(_: T) where T: Trait<Output=i32> {}
diff --git a/src/test/rustdoc/aux/issue-20727.rs b/src/test/rustdoc/aux/issue-20727.rs
new file mode 100644
index 00000000000..2ec761fad96
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-20727.rs
@@ -0,0 +1,40 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub trait Deref {
+    type Target: ?Sized;
+
+    fn deref<'a>(&'a self) -> &'a Self::Target;
+}
+
+pub trait Add<RHS = Self> {
+    type Output;
+
+    fn add(self, rhs: RHS) -> Self::Output;
+}
+
+
+pub trait Bar {}
+pub trait Deref2 {
+    type Target: Bar;
+
+    fn deref(&self) -> Self::Target;
+}
+
+pub trait Index<Idx: ?Sized> {
+    type Output: ?Sized;
+    fn index(&self, index: Idx) -> &Self::Output;
+}
+
+pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
+    fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
+}
diff --git a/src/test/rustdoc/aux/issue-21092.rs b/src/test/rustdoc/aux/issue-21092.rs
new file mode 100644
index 00000000000..e906311e3ae
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-21092.rs
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub trait Foo {
+    type Bar;
+    fn foo(&self) {}
+}
+
+pub struct Bar;
+
+impl Foo for Bar {
+    type Bar = i32;
+}
diff --git a/src/test/rustdoc/aux/issue-21801.rs b/src/test/rustdoc/aux/issue-21801.rs
new file mode 100644
index 00000000000..f618edec598
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-21801.rs
@@ -0,0 +1,19 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub struct Foo;
+
+impl Foo {
+    pub fn new<F>(f: F) -> Foo where F: FnMut() -> i32 {
+        loop {}
+    }
+}
diff --git a/src/test/rustdoc/aux/issue-22025.rs b/src/test/rustdoc/aux/issue-22025.rs
new file mode 100644
index 00000000000..35a37e27d91
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-22025.rs
@@ -0,0 +1,20 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub mod foo {
+
+    pub trait Foo {}
+    pub struct Bar;
+
+    impl Foo for Bar {}
+
+}
diff --git a/src/test/rustdoc/aux/issue-23207-1.rs b/src/test/rustdoc/aux/issue-23207-1.rs
new file mode 100644
index 00000000000..ec9f2004ebf
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-23207-1.rs
@@ -0,0 +1,13 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod fmt {
+    pub struct Error;
+}
diff --git a/src/test/rustdoc/aux/issue-23207-2.rs b/src/test/rustdoc/aux/issue-23207-2.rs
new file mode 100644
index 00000000000..5e9c540ab69
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-23207-2.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate issue_23207_1;
+
+pub mod fmt {
+    pub use issue_23207_1::fmt::Error;
+}
+
diff --git a/src/test/rustdoc/aux/issue-26606-macro.rs b/src/test/rustdoc/aux/issue-26606-macro.rs
new file mode 100644
index 00000000000..6059a252bce
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-26606-macro.rs
@@ -0,0 +1,14 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[macro_export]
+macro_rules! make_item (
+    ($name: ident) => (pub const $name: usize = 42;)
+);
diff --git a/src/test/rustdoc/aux/issue-27362.rs b/src/test/rustdoc/aux/issue-27362.rs
new file mode 100644
index 00000000000..25de698cad1
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-27362.rs
@@ -0,0 +1,22 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+#![feature(const_fn)]
+
+pub const fn foo() {}
+pub const unsafe fn bar() {}
+
+pub struct Foo;
+
+impl Foo {
+    pub const unsafe fn baz() {}
+}
diff --git a/src/test/rustdoc/aux/issue-28927-1.rs b/src/test/rustdoc/aux/issue-28927-1.rs
new file mode 100644
index 00000000000..7d6b448df43
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-28927-1.rs
@@ -0,0 +1,12 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern crate issue_28927_2 as inner2;
+pub use inner2 as bar;
diff --git a/src/test/rustdoc/aux/issue-28927-2.rs b/src/test/rustdoc/aux/issue-28927-2.rs
new file mode 100644
index 00000000000..c5117005049
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-28927-2.rs
@@ -0,0 +1,11 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Baz;
diff --git a/src/test/rustdoc/aux/issue-29584.rs b/src/test/rustdoc/aux/issue-29584.rs
new file mode 100644
index 00000000000..63c79f875ef
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-29584.rs
@@ -0,0 +1,20 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub struct Foo;
+
+#[doc(hidden)]
+mod bar {
+    trait Bar {}
+
+    impl Bar for ::Foo {}
+}
diff --git a/src/test/rustdoc/aux/issue-30109-1.rs b/src/test/rustdoc/aux/issue-30109-1.rs
new file mode 100644
index 00000000000..59f952a0b29
--- /dev/null
+++ b/src/test/rustdoc/aux/issue-30109-1.rs
@@ -0,0 +1,11 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Bar;
diff --git a/src/test/rustdoc/aux/reexp_stripped.rs b/src/test/rustdoc/aux/reexp_stripped.rs
new file mode 100644
index 00000000000..2b061e3997d
--- /dev/null
+++ b/src/test/rustdoc/aux/reexp_stripped.rs
@@ -0,0 +1,21 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub use private::Quz;
+pub use hidden::Bar;
+
+mod private {
+    pub struct Quz;
+}
+
+#[doc(hidden)]
+pub mod hidden {
+    pub struct Bar;
+}
diff --git a/src/test/rustdoc/aux/rustdoc-default-impl.rs b/src/test/rustdoc/aux/rustdoc-default-impl.rs
new file mode 100644
index 00000000000..c2ff7a0054f
--- /dev/null
+++ b/src/test/rustdoc/aux/rustdoc-default-impl.rs
@@ -0,0 +1,36 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(optin_builtin_traits)]
+#![feature(core)]
+
+pub mod bar {
+    use std::marker;
+
+    pub trait Bar: 'static {}
+
+    impl Bar for .. {}
+
+    pub trait Foo {
+        fn foo(&self) {}
+    }
+
+    impl Foo {
+        pub fn test<T: Bar>(&self) {}
+    }
+
+    pub struct TypeId;
+
+    impl TypeId {
+        pub fn of<T: Bar + ?Sized>() -> TypeId {
+            panic!()
+        }
+    }
+}
diff --git a/src/test/rustdoc/aux/rustdoc-extern-default-method.rs b/src/test/rustdoc/aux/rustdoc-extern-default-method.rs
new file mode 100644
index 00000000000..861562753f9
--- /dev/null
+++ b/src/test/rustdoc/aux/rustdoc-extern-default-method.rs
@@ -0,0 +1,21 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+pub trait Trait {
+    fn provided(&self) {}
+}
+
+pub struct Struct;
+
+impl Trait for Struct {
+    fn provided(&self) {}
+}
diff --git a/src/test/rustdoc/aux/rustdoc-extern-method.rs b/src/test/rustdoc/aux/rustdoc-extern-method.rs
new file mode 100644
index 00000000000..96a7a8378b7
--- /dev/null
+++ b/src/test/rustdoc/aux/rustdoc-extern-method.rs
@@ -0,0 +1,17 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+#![feature(unboxed_closures)]
+
+pub trait Foo {
+    extern "rust-call" fn foo(&self, _: ()) -> i32;
+    extern "rust-call" fn foo_(&self, _: ()) -> i32 { 0 }
+}
diff --git a/src/test/rustdoc/aux/rustdoc-ffi.rs b/src/test/rustdoc/aux/rustdoc-ffi.rs
new file mode 100644
index 00000000000..e06dbe76dbb
--- /dev/null
+++ b/src/test/rustdoc/aux/rustdoc-ffi.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type="lib"]
+
+extern "C" {
+    // @has lib/fn.foreigner.html //pre 'pub unsafe fn foreigner(cold_as_ice: u32)'
+    pub fn foreigner(cold_as_ice: u32);
+}
diff --git a/src/test/rustdoc/aux/rustdoc-impl-parts-crosscrate.rs b/src/test/rustdoc/aux/rustdoc-impl-parts-crosscrate.rs
new file mode 100644
index 00000000000..6e8f80c8f5f
--- /dev/null
+++ b/src/test/rustdoc/aux/rustdoc-impl-parts-crosscrate.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(optin_builtin_traits)]
+
+pub trait AnOibit {}
+
+impl AnOibit for .. {}
diff --git a/src/test/rustdoc/aux/variant-struct.rs b/src/test/rustdoc/aux/variant-struct.rs
new file mode 100644
index 00000000000..d846c0adf61
--- /dev/null
+++ b/src/test/rustdoc/aux/variant-struct.rs
@@ -0,0 +1,15 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub enum Foo {
+    Bar {
+        qux: (),
+    }
+}
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-hidden-sig.rs b/src/test/rustdoc/inline_cross/aux/rustdoc-hidden-sig.rs
new file mode 100644
index 00000000000..e2bc153ce0d
--- /dev/null
+++ b/src/test/rustdoc/inline_cross/aux/rustdoc-hidden-sig.rs
@@ -0,0 +1,22 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Bar;
+
+impl Bar {
+    pub fn bar(_: u8) -> hidden::Hidden {
+        hidden::Hidden
+    }
+}
+
+#[doc(hidden)]
+pub mod hidden {
+    pub struct Hidden;
+}
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-nonreachable-impls.rs b/src/test/rustdoc/inline_cross/aux/rustdoc-nonreachable-impls.rs
new file mode 100644
index 00000000000..22a311d5797
--- /dev/null
+++ b/src/test/rustdoc/inline_cross/aux/rustdoc-nonreachable-impls.rs
@@ -0,0 +1,44 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub struct Foo;
+
+pub trait Woof {}
+pub trait Bark {}
+
+mod private {
+    // should be shown
+    impl ::Woof for ::Foo {}
+
+    pub trait Bar {}
+    pub struct Wibble;
+
+    // these should not be shown
+    impl Bar for ::Foo {}
+    impl Bar for Wibble {}
+    impl ::Bark for Wibble {}
+    impl ::Woof for Wibble {}
+}
+
+#[doc(hidden)]
+pub mod hidden {
+    // should be shown
+    impl ::Bark for ::Foo {}
+
+    pub trait Qux {}
+    pub struct Wobble;
+
+
+    // these should only be shown if they're reexported correctly
+    impl Qux for ::Foo {}
+    impl Qux for Wobble {}
+    impl ::Bark for Wobble {}
+    impl ::Woof for Wobble {}
+}
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index d75b3b71a99..b5cebe2e3ea 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -134,7 +134,9 @@ pub struct TestProps {
     // If present, the name of a file that this test should match when
     // pretty-printed
     pub pp_exact: Option<PathBuf>,
-    // Modules from aux directory that should be compiled
+    // Other crates that should be compiled (typically from the same
+    // directory as the test, but for backwards compatibility reasons
+    // we also check the auxiliary directory)
     pub aux_builds: Vec<String> ,
     // Environment settings to use for compiling
     pub rustc_env: Vec<(String,String)> ,
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 45c69eec542..3ab08021717 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -30,6 +30,7 @@ extern crate log;
 extern crate env_logger;
 
 use std::env;
+use std::ffi::OsString;
 use std::fs;
 use std::io;
 use std::path::{Path, PathBuf};
@@ -335,21 +336,24 @@ fn collect_tests_from_dir(config: &Config,
         }
     }
 
+    // If we find a test foo/bar.rs, we have to build the
+    // output directory `$build/foo` so we can write
+    // `$build/foo/bar` into it. We do this *now* in this
+    // sequential loop because otherwise, if we do it in the
+    // tests themselves, they race for the privilege of
+    // creating the directories and sometimes fail randomly.
+    let build_dir = config.build_base.join(&relative_dir_path);
+    fs::create_dir_all(&build_dir).unwrap();
+
+    // Add each `.rs` file as a test, and recurse further on any
+    // subdirectories we find, except for `aux` directories.
     let dirs = fs::read_dir(dir)?;
     for file in dirs {
         let file = file?;
         let file_path = file.path();
-        debug!("inspecting file {:?}", file_path.display());
-        if is_test(config, &file_path) {
-            // If we find a test foo/bar.rs, we have to build the
-            // output directory `$build/foo` so we can write
-            // `$build/foo/bar` into it. We do this *now* in this
-            // sequential loop because otherwise, if we do it in the
-            // tests themselves, they race for the privilege of
-            // creating the directories and sometimes fail randomly.
-            let build_dir = config.build_base.join(&relative_dir_path);
-            fs::create_dir_all(&build_dir).unwrap();
-
+        let file_name = file.file_name();
+        if is_test(&file_name) {
+            debug!("found test file: {:?}", file_path.display());
             let paths = TestPaths {
                 file: file_path,
                 base: base.to_path_buf(),
@@ -358,41 +362,39 @@ fn collect_tests_from_dir(config: &Config,
             tests.push(make_test(config, &paths))
         } else if file_path.is_dir() {
             let relative_file_path = relative_dir_path.join(file.file_name());
-            collect_tests_from_dir(config,
-                                   base,
-                                   &file_path,
-                                   &relative_file_path,
-                                   tests)?;
+            if &file_name == "aux" {
+                // `aux` directories contain other crates used for
+                // cross-crate tests. Don't search them for tests, but
+                // do create a directory in the build dir for them,
+                // since we will dump intermediate output in there
+                // sometimes.
+                let build_dir = config.build_base.join(&relative_file_path);
+                fs::create_dir_all(&build_dir).unwrap();
+            } else {
+                debug!("found directory: {:?}", file_path.display());
+                collect_tests_from_dir(config,
+                                       base,
+                                       &file_path,
+                                       &relative_file_path,
+                                       tests)?;
+            }
+        } else {
+            debug!("found other file/directory: {:?}", file_path.display());
         }
     }
     Ok(())
 }
 
-pub fn is_test(config: &Config, testfile: &Path) -> bool {
-    // Pretty-printer does not work with .rc files yet
-    let valid_extensions =
-        match config.mode {
-          Pretty => vec!(".rs".to_owned()),
-          _ => vec!(".rc".to_owned(), ".rs".to_owned())
-        };
-    let invalid_prefixes = vec!(".".to_owned(), "#".to_owned(), "~".to_owned());
-    let name = testfile.file_name().unwrap().to_str().unwrap();
+pub fn is_test(file_name: &OsString) -> bool {
+    let file_name = file_name.to_str().unwrap();
 
-    let mut valid = false;
-
-    for ext in &valid_extensions {
-        if name.ends_with(ext) {
-            valid = true;
-        }
+    if !file_name.ends_with(".rs") {
+        return false;
     }
 
-    for pre in &invalid_prefixes {
-        if name.starts_with(pre) {
-            valid = false;
-        }
-    }
-
-    return valid;
+    // `.`, `#`, and `~` are common temp-file prefixes.
+    let invalid_prefixes = &[".", "#", "~"];
+    !invalid_prefixes.iter().any(|p| file_name.starts_with(p))
 }
 
 pub fn make_test(config: &Config, testpaths: &TestPaths) -> test::TestDescAndFn {
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 98dfdb08a7f..858cecf8612 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1147,14 +1147,27 @@ actual:\n\
         }
     }
 
+    /// For each `aux-build: foo/bar` annotation, we check to find the
+    /// file in a `aux` directory relative to the test itself.
     fn compute_aux_test_paths(&self, rel_ab: &str) -> TestPaths {
-        let abs_ab = self.config.aux_base.join(rel_ab);
+        let test_ab = self.testpaths.file
+                                    .parent()
+                                    .expect("test file path has no parent")
+                                    .join("aux")
+                                    .join(rel_ab);
+        if !test_ab.exists() {
+            self.fatal(&format!("aux-build `{}` source not found", test_ab.display()))
+        }
+
         TestPaths {
-            file: abs_ab,
+            file: test_ab,
             base: self.testpaths.base.clone(),
-            relative_dir: Path::new(rel_ab).parent()
-                                           .map(|p| p.to_path_buf())
-                                           .unwrap_or_else(|| PathBuf::new())
+            relative_dir: self.testpaths.relative_dir
+                                        .join("aux")
+                                        .join(rel_ab)
+                                        .parent()
+                                        .expect("aux-build path has no parent")
+                                        .to_path_buf()
         }
     }
 

From ce0f73bbc45ff685aaea774240d5daf2426b7163 Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Tue, 26 Apr 2016 17:57:12 -0400
Subject: [PATCH 06/10] kill the old auxiliary directory

---
 mk/tests.mk                                   |   1 -
 src/test/auxiliary/allocator-dummy.rs         |  55 ------
 src/test/auxiliary/allocator-dylib.rs         |  15 --
 src/test/auxiliary/allocator-dylib2.rs        |  12 --
 src/test/auxiliary/allocator1.rs              |  16 --
 src/test/auxiliary/allocator2.rs              |  16 --
 src/test/auxiliary/allocator3.rs              |  19 --
 src/test/auxiliary/ambig_impl_2_lib.rs        |  14 --
 .../anon-extern-mod-cross-crate-1.rs          |  19 --
 .../auxiliary/anon_trait_static_method_lib.rs |  19 --
 src/test/auxiliary/associated-const-cc-lib.rs |  46 -----
 src/test/auxiliary/associated-types-cc-lib.rs |  26 ---
 src/test/auxiliary/attr_plugin_test.rs        |  31 ---
 src/test/auxiliary/augmented_assignments.rs   |  18 --
 .../blind-item-mixed-crate-use-item-foo.rs    |  13 --
 .../blind-item-mixed-crate-use-item-foo2.rs   |  13 --
 src/test/auxiliary/cci_borrow_lib.rs          |  13 --
 src/test/auxiliary/cci_capture_clause.rs      |  20 --
 src/test/auxiliary/cci_class.rs               |  24 ---
 src/test/auxiliary/cci_class_2.rs             |  29 ---
 src/test/auxiliary/cci_class_3.rs             |  29 ---
 src/test/auxiliary/cci_class_4.rs             |  51 -----
 src/test/auxiliary/cci_class_5.rs             |  27 ---
 src/test/auxiliary/cci_class_6.rs             |  35 ----
 src/test/auxiliary/cci_class_cast.rs          |  60 ------
 src/test/auxiliary/cci_class_trait.rs         |  15 --
 src/test/auxiliary/cci_const.rs               |  16 --
 src/test/auxiliary/cci_const_block.rs         |  16 --
 src/test/auxiliary/cci_impl_lib.rs            |  26 ---
 src/test/auxiliary/cci_intrinsic.rs           |  24 ---
 src/test/auxiliary/cci_iter_lib.rs            |  21 --
 src/test/auxiliary/cci_nested_lib.rs          |  63 ------
 src/test/auxiliary/cci_no_inline_lib.rs       |  22 ---
 src/test/auxiliary/cfg_inner_static.rs        |  17 --
 src/test/auxiliary/cgu_explicit_inlining.rs   |  20 --
 src/test/auxiliary/cgu_export_trait_method.rs |  34 ----
 src/test/auxiliary/cgu_extern_closures.rs     |  33 ----
 src/test/auxiliary/cgu_extern_drop_glue.rs    |  17 --
 src/test/auxiliary/cgu_generic_function.rs    |  37 ----
 src/test/auxiliary/cgu_test.rs                |  16 --
 src/test/auxiliary/cgu_test_a.rs              |  25 ---
 src/test/auxiliary/cgu_test_b.rs              |  25 ---
 src/test/auxiliary/changing-crates-a1.rs      |  13 --
 src/test/auxiliary/changing-crates-a2.rs      |  13 --
 src/test/auxiliary/changing-crates-b.rs       |  15 --
 .../check_static_recursion_foreign_helper.rs  |  21 --
 src/test/auxiliary/coherence_copy_like_lib.rs |  20 --
 .../auxiliary/coherence_inherent_cc_lib.rs    |  21 --
 src/test/auxiliary/coherence_lib.rs           |  25 ---
 src/test/auxiliary/coherence_orphan_lib.rs    |  13 --
 src/test/auxiliary/const_fn_lib.rs            |  16 --
 .../crate-attributes-using-cfg_attr.rs        |  16 --
 .../crate-method-reexport-grrrrrrr2.rs        |  41 ----
 src/test/auxiliary/crate_a1.rs                |  21 --
 src/test/auxiliary/crate_a2.rs                |  17 --
 .../auxiliary/crate_with_invalid_spans.rs     |  30 ---
 src/test/auxiliary/crateresolve1-1.rs         |  15 --
 src/test/auxiliary/crateresolve1-2.rs         |  15 --
 src/test/auxiliary/crateresolve1-3.rs         |  15 --
 .../cross_crate_debuginfo_type_uniquing.rs    |  26 ---
 src/test/auxiliary/cross_crate_spans.rs       |  29 ---
 src/test/auxiliary/custom_derive_plugin.rs    |  78 --------
 .../auxiliary/custom_derive_plugin_attr.rs    |  91 ---------
 .../default_ty_param_cross_crate_crate.rs     |  20 --
 src/test/auxiliary/default_type_params_xc.rs  |  15 --
 src/test/auxiliary/deprecation-lint.rs        |  90 ---------
 src/test/auxiliary/derive-no-std.rs           |  40 ----
 src/test/auxiliary/dummy_mir_pass.rs          |  55 ------
 src/test/auxiliary/empty-struct.rs            |  17 --
 src/test/auxiliary/empty.rs                   |   9 -
 src/test/auxiliary/explicit_self_xcrate.rs    |  25 ---
 .../auxiliary/extern-crosscrate-source.rs     |  41 ----
 src/test/auxiliary/extern-take-value.rs       |  15 --
 .../auxiliary/extern_calling_convention.rs    |  36 ----
 src/test/auxiliary/extern_mod_ordering_lib.rs |  15 --
 src/test/auxiliary/fat_drop.rs                |  23 ---
 src/test/auxiliary/fn-abi.rs                  |  12 --
 src/test/auxiliary/foreign_lib.rs             |  48 -----
 src/test/auxiliary/go_trait.rs                |  53 ------
 src/test/auxiliary/i8.rs                      |  13 --
 src/test/auxiliary/impl_privacy_xc_1.rs       |  19 --
 src/test/auxiliary/impl_privacy_xc_2.rs       |  23 ---
 src/test/auxiliary/inherited_stability.rs     |  56 ------
 src/test/auxiliary/inline-default-methods.rs  |  16 --
 src/test/auxiliary/inline_dtor.rs             |  18 --
 src/test/auxiliary/inner_static.rs            |  61 ------
 src/test/auxiliary/internal_unstable.rs       | 102 ----------
 src/test/auxiliary/iss.rs                     |  22 ---
 src/test/auxiliary/issue-10028.rs             |  22 ---
 src/test/auxiliary/issue-11224.rs             |  26 ---
 src/test/auxiliary/issue-11225-1.rs           |  28 ---
 src/test/auxiliary/issue-11225-2.rs           |  38 ----
 src/test/auxiliary/issue-11225-3.rs           |  38 ----
 src/test/auxiliary/issue-11508.rs             |  20 --
 src/test/auxiliary/issue-11529.rs             |  11 --
 src/test/auxiliary/issue-12133-dylib.rs       |  11 --
 src/test/auxiliary/issue-12133-dylib2.rs      |  16 --
 src/test/auxiliary/issue-12133-rlib.rs        |  13 --
 src/test/auxiliary/issue-12660-aux.rs         |  21 --
 src/test/auxiliary/issue-13560-1.rs           |  13 --
 src/test/auxiliary/issue-13560-2.rs           |  13 --
 src/test/auxiliary/issue-13560-3.rs           |  16 --
 src/test/auxiliary/issue-13620-1.rs           |  19 --
 src/test/auxiliary/issue-13620-2.rs           |  13 --
 src/test/auxiliary/issue-13698.rs             |  18 --
 src/test/auxiliary/issue-13872-1.rs           |  11 --
 src/test/auxiliary/issue-13872-2.rs           |  13 --
 src/test/auxiliary/issue-13872-3.rs           |  19 --
 src/test/auxiliary/issue-14344-1.rs           |  15 --
 src/test/auxiliary/issue-14344-2.rs           |  13 --
 src/test/auxiliary/issue-14421.rs             |  35 ----
 src/test/auxiliary/issue-14422.rs             |  35 ----
 src/test/auxiliary/issue-15318.rs             |  17 --
 src/test/auxiliary/issue-15562.rs             |  15 --
 src/test/auxiliary/issue-16643.rs             |  29 ---
 src/test/auxiliary/issue-16822.rs             |  30 ---
 src/test/auxiliary/issue-17476.rs             |  17 --
 src/test/auxiliary/issue-17662.rs             |  22 ---
 src/test/auxiliary/issue-17718-aux.rs         |  24 ---
 src/test/auxiliary/issue-18501.rs             |  27 ---
 src/test/auxiliary/issue-18502.rs             |  31 ---
 src/test/auxiliary/issue-18514.rs             |  27 ---
 src/test/auxiliary/issue-18711.rs             |  16 --
 src/test/auxiliary/issue-18913-1.rs           |  16 --
 src/test/auxiliary/issue-18913-2.rs           |  16 --
 src/test/auxiliary/issue-19163.rs             |  16 --
 src/test/auxiliary/issue-19190-3.rs           |  33 ----
 src/test/auxiliary/issue-19340-1.rs           |  13 --
 src/test/auxiliary/issue-20646.rs             |  17 --
 src/test/auxiliary/issue-20727.rs             |  40 ----
 src/test/auxiliary/issue-21092.rs             |  22 ---
 src/test/auxiliary/issue-21221-3.rs           |  29 ---
 src/test/auxiliary/issue-21221-4.rs           |  22 ---
 src/test/auxiliary/issue-21801.rs             |  19 --
 src/test/auxiliary/issue-22025.rs             |  20 --
 src/test/auxiliary/issue-23207-1.rs           |  13 --
 src/test/auxiliary/issue-23207-2.rs           |  16 --
 src/test/auxiliary/issue-2380.rs              |  26 ---
 src/test/auxiliary/issue-2414-a.rs            |  22 ---
 src/test/auxiliary/issue-2414-b.rs            |  15 --
 src/test/auxiliary/issue-25185-1.rs           |  21 --
 src/test/auxiliary/issue-25185-2.rs           |  13 --
 src/test/auxiliary/issue-2526.rs              |  54 ------
 src/test/auxiliary/issue-25467.rs             |  20 --
 src/test/auxiliary/issue-2631-a.rs            |  24 ---
 src/test/auxiliary/issue-26606-macro.rs       |  14 --
 src/test/auxiliary/issue-27362.rs             |  22 ---
 src/test/auxiliary/issue-28927-1.rs           |  12 --
 src/test/auxiliary/issue-28927-2.rs           |  11 --
 src/test/auxiliary/issue-29181.rs             |  15 --
 src/test/auxiliary/issue-29485.rs             |  26 ---
 src/test/auxiliary/issue-29584.rs             |  20 --
 src/test/auxiliary/issue-30109-1.rs           |  11 --
 src/test/auxiliary/issue-3012-1.rs            |  33 ----
 src/test/auxiliary/issue-30535.rs             |  15 --
 src/test/auxiliary/issue-31702-1.rs           |  26 ---
 src/test/auxiliary/issue-31702-2.rs           |  30 ---
 src/test/auxiliary/issue-4208-cc.rs           |  20 --
 src/test/auxiliary/issue-4545.rs              |  12 --
 src/test/auxiliary/issue-5518.rs              |  14 --
 src/test/auxiliary/issue-5521.rs              |  14 --
 src/test/auxiliary/issue-7178.rs              |  17 --
 src/test/auxiliary/issue-7899.rs              |  11 --
 src/test/auxiliary/issue-8044.rs              |  25 ---
 src/test/auxiliary/issue-8259.rs              |  15 --
 src/test/auxiliary/issue-9906.rs              |  25 ---
 src/test/auxiliary/issue-9968.rs              |  32 ----
 src/test/auxiliary/issue13213aux.rs           |  29 ---
 src/test/auxiliary/issue13507.rs              |  99 ----------
 src/test/auxiliary/issue2170lib.rs            |  28 ---
 src/test/auxiliary/issue24687_lib.rs          |  20 --
 src/test/auxiliary/issue_10031_aux.rs         |  11 --
 src/test/auxiliary/issue_11680.rs             |  19 --
 src/test/auxiliary/issue_12612_1.rs           |  13 --
 src/test/auxiliary/issue_12612_2.rs           |  11 --
 .../issue_16723_multiple_items_syntax_ext.rs  |  36 ----
 src/test/auxiliary/issue_16725.rs             |  13 --
 .../auxiliary/issue_17718_const_privacy.rs    |  18 --
 src/test/auxiliary/issue_19293.rs             |  14 --
 src/test/auxiliary/issue_20389.rs             |  14 --
 src/test/auxiliary/issue_21202.rs             |  16 --
 src/test/auxiliary/issue_2316_a.rs            |  13 --
 src/test/auxiliary/issue_2316_b.rs            |  21 --
 src/test/auxiliary/issue_2472_b.rs            |  24 ---
 src/test/auxiliary/issue_2723_a.rs            |  14 --
 src/test/auxiliary/issue_30123_aux.rs         |  33 ----
 src/test/auxiliary/issue_3136_a.rc            |  13 --
 src/test/auxiliary/issue_3136_a.rs            |  24 ---
 src/test/auxiliary/issue_3907.rs              |  13 --
 src/test/auxiliary/issue_3907_1.rs            |  13 --
 src/test/auxiliary/issue_3979_traits.rs       |  25 ---
 src/test/auxiliary/issue_5844_aux.rs          |  17 --
 src/test/auxiliary/issue_8401.rs              |  26 ---
 src/test/auxiliary/issue_9123.rs              |  19 --
 src/test/auxiliary/issue_9155.rs              |  17 --
 src/test/auxiliary/issue_9188.rs              |  23 ---
 src/test/auxiliary/kinds_in_metadata.rs       |  18 --
 src/test/auxiliary/lang-item-public.rs        |  28 ---
 .../lifetime_bound_will_change_warning_lib.rs |  21 --
 src/test/auxiliary/linkage-visibility.rs      |  45 -----
 src/test/auxiliary/linkage1.rs                |  14 --
 src/test/auxiliary/lint_for_crate.rs          |  47 -----
 src/test/auxiliary/lint_group_plugin_test.rs  |  51 -----
 src/test/auxiliary/lint_output_format.rs      |  30 ---
 src/test/auxiliary/lint_plugin_test.rs        |  48 -----
 src/test/auxiliary/lint_stability.rs          | 179 ------------------
 src/test/auxiliary/lint_stability_fields.rs   |  61 ------
 .../auxiliary/lint_unused_extern_crate.rs     |  11 --
 src/test/auxiliary/llvm_pass_plugin.rs        |  29 ---
 src/test/auxiliary/logging_right_crate.rs     |  18 --
 .../auxiliary/lto-syntax-extension-lib.rs     |  15 --
 .../auxiliary/lto-syntax-extension-plugin.rs  |  22 ---
 .../auxiliary/macro_crate_MacroRulesTT.rs     |  26 ---
 src/test/auxiliary/macro_crate_def_only.rs    |  14 --
 src/test/auxiliary/macro_crate_nonterminal.rs |  22 ---
 src/test/auxiliary/macro_crate_test.rs        | 141 --------------
 .../auxiliary/macro_export_inner_module.rs    |  16 --
 src/test/auxiliary/macro_non_reexport_2.rs    |  19 --
 src/test/auxiliary/macro_reexport_1.rs        |  15 --
 src/test/auxiliary/macro_reexport_2.rs        |  16 --
 src/test/auxiliary/macro_reexport_2_no_use.rs |  16 --
 src/test/auxiliary/macro_with_super_1.rs      |  26 ---
 src/test/auxiliary/method_self_arg1.rs        |  48 -----
 src/test/auxiliary/method_self_arg2.rs        |  65 -------
 src/test/auxiliary/mir_external_refs.rs       |  28 ---
 src/test/auxiliary/moves_based_on_type_lib.rs |  27 ---
 src/test/auxiliary/msvc-data-only-lib.rs      |  15 --
 .../auxiliary/namespaced_enum_emulate_flat.rs |  35 ----
 src/test/auxiliary/namespaced_enums.rs        |  20 --
 src/test/auxiliary/needs_allocator.rs         |  16 --
 src/test/auxiliary/nested_item.rs             |  40 ----
 src/test/auxiliary/newtype_struct_xc.rs       |  13 --
 .../auxiliary/no_method_suggested_traits.rs   |  46 -----
 src/test/auxiliary/no_std_crate.rs            |  13 --
 src/test/auxiliary/noexporttypelib.rs         |  12 --
 .../auxiliary/orphan_check_diagnostics.rs     |  11 --
 src/test/auxiliary/overloaded_autoderef_xc.rs |  40 ----
 src/test/auxiliary/packed.rs                  |  15 --
 src/test/auxiliary/plugin_args.rs             |  52 -----
 .../plugin_crate_outlive_expansion_phase.rs   |  35 ----
 src/test/auxiliary/plugin_with_plugin_lib.rs  |  23 ---
 src/test/auxiliary/priv-impl-prim-ty.rs       |  19 --
 src/test/auxiliary/privacy_reexport.rs        |  16 --
 src/test/auxiliary/privacy_tuple_struct.rs    |  14 --
 src/test/auxiliary/private_trait_xc.rs        |  11 --
 src/test/auxiliary/procedural_mbe_matching.rs |  70 -------
 src/test/auxiliary/pub_restricted.rs          |  23 ---
 src/test/auxiliary/pub_static_array.rs        |  11 --
 src/test/auxiliary/pub_use_mods_xcrate.rs     |  20 --
 src/test/auxiliary/pub_use_xcrate1.rs         |  13 --
 src/test/auxiliary/pub_use_xcrate2.rs         |  13 --
 src/test/auxiliary/rbmtp_cross_crate_lib.rs   |  42 ----
 .../auxiliary/reachable-unnameable-items.rs   | 116 ------------
 src/test/auxiliary/reexp_stripped.rs          |  21 --
 .../auxiliary/reexport-should-still-link.rs   |  15 --
 .../auxiliary/reexported_static_methods.rs    |  53 ------
 src/test/auxiliary/rlib_crate_test.rs         |  22 ---
 src/test/auxiliary/roman_numerals.rs          |  79 --------
 src/test/auxiliary/rustdoc-default-impl.rs    |  36 ----
 .../rustdoc-extern-default-method.rs          |  21 --
 src/test/auxiliary/rustdoc-extern-method.rs   |  17 --
 src/test/auxiliary/rustdoc-ffi.rs             |  16 --
 src/test/auxiliary/rustdoc-hidden-sig.rs      |  22 ---
 .../rustdoc-impl-parts-crosscrate.rs          |  15 --
 .../auxiliary/rustdoc-nonreachable-impls.rs   |  44 -----
 src/test/auxiliary/sepcomp-extern-lib.rs      |  14 --
 src/test/auxiliary/sepcomp_cci_lib.rs         |  16 --
 src/test/auxiliary/sepcomp_lib.rs             |  31 ---
 .../auxiliary/specialization_cross_crate.rs   |  82 --------
 .../specialization_cross_crate_defaults.rs    |  49 -----
 .../auxiliary/stability_attribute_issue.rs    |  19 --
 src/test/auxiliary/stability_cfg1.rs          |  13 --
 src/test/auxiliary/stability_cfg2.rs          |  15 --
 .../auxiliary/static-function-pointer-aux.rs  |  15 --
 src/test/auxiliary/static-methods-crate.rs    |  39 ----
 src/test/auxiliary/static_fn_inline_xc_aux.rs |  23 ---
 src/test/auxiliary/static_fn_trait_xc_aux.rs  |  21 --
 src/test/auxiliary/static_mut_xc.rs           |  11 --
 src/test/auxiliary/static_priv_by_default.rs  |  61 ------
 .../struct_destructuring_cross_crate.rs       |  16 --
 src/test/auxiliary/struct_field_privacy.rs    |  19 --
 src/test/auxiliary/struct_variant_privacy.rs  |  13 --
 src/test/auxiliary/struct_variant_xc_aux.rs   |  18 --
 src/test/auxiliary/svh-a-base.rs              |  35 ----
 src/test/auxiliary/svh-a-change-lit.rs        |  35 ----
 .../auxiliary/svh-a-change-significant-cfg.rs |  37 ----
 .../auxiliary/svh-a-change-trait-bound.rs     |  35 ----
 src/test/auxiliary/svh-a-change-type-arg.rs   |  35 ----
 src/test/auxiliary/svh-a-change-type-ret.rs   |  35 ----
 .../auxiliary/svh-a-change-type-static.rs     |  36 ----
 src/test/auxiliary/svh-a-comment.rs           |  36 ----
 src/test/auxiliary/svh-a-doc.rs               |  38 ----
 src/test/auxiliary/svh-a-macro.rs             |  37 ----
 src/test/auxiliary/svh-a-no-change.rs         |  35 ----
 src/test/auxiliary/svh-a-redundant-cfg.rs     |  37 ----
 src/test/auxiliary/svh-a-whitespace.rs        |  37 ----
 src/test/auxiliary/svh-b.rs                   |  23 ---
 src/test/auxiliary/svh-uta-base.rs            |  32 ----
 .../auxiliary/svh-uta-change-use-trait.rs     |  32 ----
 src/test/auxiliary/svh-utb.rs                 |  22 ---
 .../syntax_extension_with_dll_deps_1.rs       |  17 --
 .../syntax_extension_with_dll_deps_2.rs       |  35 ----
 src/test/auxiliary/tdticc_coherence_lib.rs    |  17 --
 .../auxiliary/thread-local-extern-static.rs   |  17 --
 .../trait_bounds_on_structs_and_enums_xc.rs   |  23 ---
 .../auxiliary/trait_default_method_xc_aux.rs  |  50 -----
 .../trait_default_method_xc_aux_2.rs          |  27 ---
 src/test/auxiliary/trait_impl_conflict.rs     |  15 --
 .../trait_inheritance_auto_xc_2_aux.rs        |  19 --
 .../trait_inheritance_auto_xc_aux.rs          |  17 --
 ...ait_inheritance_cross_trait_call_xc_aux.rs |  22 ---
 .../trait_inheritance_overloading_xc.rs       |  48 -----
 src/test/auxiliary/trait_safety_lib.rs        |  19 --
 .../auxiliary/trait_superkinds_in_metadata.rs |  18 --
 src/test/auxiliary/traitimpl.rs               |  17 --
 src/test/auxiliary/two_macros.rs              |  15 --
 src/test/auxiliary/typeid-intrinsic-aux1.rs   |  34 ----
 src/test/auxiliary/typeid-intrinsic-aux2.rs   |  34 ----
 .../auxiliary/unboxed-closures-cross-crate.rs |  28 ---
 src/test/auxiliary/unreachable_variant.rs     |  15 --
 src/test/auxiliary/use_from_trait_xc.rs       |  41 ----
 src/test/auxiliary/variant-namespacing.rs     |  15 --
 src/test/auxiliary/variant-struct.rs          |  15 --
 src/test/auxiliary/weak-lang-items.rs         |  32 ----
 src/test/auxiliary/where_clauses_xc.rs        |  29 ---
 src/test/auxiliary/xc_private_method_lib.rs   |  43 -----
 .../auxiliary/xcrate-trait-lifetime-param.rs  |  13 --
 .../auxiliary/xcrate_address_insignificant.rs |  18 --
 .../xcrate_associated_type_defaults.rs        |  22 ---
 src/test/auxiliary/xcrate_static_addresses.rs |  27 ---
 src/test/auxiliary/xcrate_struct_aliases.rs   |  16 --
 src/test/auxiliary/xcrate_unit_struct.rs      |  38 ----
 .../aux}/issue-21146-inc.rs                   |   0
 src/test/compile-fail/issue-21146.rs          |   2 +-
 .../aux}/macro-include-items-expr.rs          |   0
 .../aux}/macro-include-items-item.rs          |   0
 src/test/run-pass/macro-include-items.rs      |   4 +-
 src/tools/compiletest/src/common.rs           |   3 -
 src/tools/compiletest/src/main.rs             |   2 -
 339 files changed, 3 insertions(+), 8805 deletions(-)
 delete mode 100644 src/test/auxiliary/allocator-dummy.rs
 delete mode 100644 src/test/auxiliary/allocator-dylib.rs
 delete mode 100644 src/test/auxiliary/allocator-dylib2.rs
 delete mode 100644 src/test/auxiliary/allocator1.rs
 delete mode 100644 src/test/auxiliary/allocator2.rs
 delete mode 100644 src/test/auxiliary/allocator3.rs
 delete mode 100644 src/test/auxiliary/ambig_impl_2_lib.rs
 delete mode 100644 src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
 delete mode 100644 src/test/auxiliary/anon_trait_static_method_lib.rs
 delete mode 100644 src/test/auxiliary/associated-const-cc-lib.rs
 delete mode 100644 src/test/auxiliary/associated-types-cc-lib.rs
 delete mode 100644 src/test/auxiliary/attr_plugin_test.rs
 delete mode 100644 src/test/auxiliary/augmented_assignments.rs
 delete mode 100644 src/test/auxiliary/blind-item-mixed-crate-use-item-foo.rs
 delete mode 100644 src/test/auxiliary/blind-item-mixed-crate-use-item-foo2.rs
 delete mode 100644 src/test/auxiliary/cci_borrow_lib.rs
 delete mode 100644 src/test/auxiliary/cci_capture_clause.rs
 delete mode 100644 src/test/auxiliary/cci_class.rs
 delete mode 100644 src/test/auxiliary/cci_class_2.rs
 delete mode 100644 src/test/auxiliary/cci_class_3.rs
 delete mode 100644 src/test/auxiliary/cci_class_4.rs
 delete mode 100644 src/test/auxiliary/cci_class_5.rs
 delete mode 100644 src/test/auxiliary/cci_class_6.rs
 delete mode 100644 src/test/auxiliary/cci_class_cast.rs
 delete mode 100644 src/test/auxiliary/cci_class_trait.rs
 delete mode 100644 src/test/auxiliary/cci_const.rs
 delete mode 100644 src/test/auxiliary/cci_const_block.rs
 delete mode 100644 src/test/auxiliary/cci_impl_lib.rs
 delete mode 100644 src/test/auxiliary/cci_intrinsic.rs
 delete mode 100644 src/test/auxiliary/cci_iter_lib.rs
 delete mode 100644 src/test/auxiliary/cci_nested_lib.rs
 delete mode 100644 src/test/auxiliary/cci_no_inline_lib.rs
 delete mode 100644 src/test/auxiliary/cfg_inner_static.rs
 delete mode 100644 src/test/auxiliary/cgu_explicit_inlining.rs
 delete mode 100644 src/test/auxiliary/cgu_export_trait_method.rs
 delete mode 100644 src/test/auxiliary/cgu_extern_closures.rs
 delete mode 100644 src/test/auxiliary/cgu_extern_drop_glue.rs
 delete mode 100644 src/test/auxiliary/cgu_generic_function.rs
 delete mode 100644 src/test/auxiliary/cgu_test.rs
 delete mode 100644 src/test/auxiliary/cgu_test_a.rs
 delete mode 100644 src/test/auxiliary/cgu_test_b.rs
 delete mode 100644 src/test/auxiliary/changing-crates-a1.rs
 delete mode 100644 src/test/auxiliary/changing-crates-a2.rs
 delete mode 100644 src/test/auxiliary/changing-crates-b.rs
 delete mode 100644 src/test/auxiliary/check_static_recursion_foreign_helper.rs
 delete mode 100644 src/test/auxiliary/coherence_copy_like_lib.rs
 delete mode 100644 src/test/auxiliary/coherence_inherent_cc_lib.rs
 delete mode 100644 src/test/auxiliary/coherence_lib.rs
 delete mode 100644 src/test/auxiliary/coherence_orphan_lib.rs
 delete mode 100644 src/test/auxiliary/const_fn_lib.rs
 delete mode 100644 src/test/auxiliary/crate-attributes-using-cfg_attr.rs
 delete mode 100644 src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs
 delete mode 100644 src/test/auxiliary/crate_a1.rs
 delete mode 100644 src/test/auxiliary/crate_a2.rs
 delete mode 100644 src/test/auxiliary/crate_with_invalid_spans.rs
 delete mode 100644 src/test/auxiliary/crateresolve1-1.rs
 delete mode 100644 src/test/auxiliary/crateresolve1-2.rs
 delete mode 100644 src/test/auxiliary/crateresolve1-3.rs
 delete mode 100644 src/test/auxiliary/cross_crate_debuginfo_type_uniquing.rs
 delete mode 100644 src/test/auxiliary/cross_crate_spans.rs
 delete mode 100644 src/test/auxiliary/custom_derive_plugin.rs
 delete mode 100644 src/test/auxiliary/custom_derive_plugin_attr.rs
 delete mode 100644 src/test/auxiliary/default_ty_param_cross_crate_crate.rs
 delete mode 100644 src/test/auxiliary/default_type_params_xc.rs
 delete mode 100644 src/test/auxiliary/deprecation-lint.rs
 delete mode 100644 src/test/auxiliary/derive-no-std.rs
 delete mode 100644 src/test/auxiliary/dummy_mir_pass.rs
 delete mode 100644 src/test/auxiliary/empty-struct.rs
 delete mode 100644 src/test/auxiliary/empty.rs
 delete mode 100644 src/test/auxiliary/explicit_self_xcrate.rs
 delete mode 100644 src/test/auxiliary/extern-crosscrate-source.rs
 delete mode 100644 src/test/auxiliary/extern-take-value.rs
 delete mode 100644 src/test/auxiliary/extern_calling_convention.rs
 delete mode 100644 src/test/auxiliary/extern_mod_ordering_lib.rs
 delete mode 100644 src/test/auxiliary/fat_drop.rs
 delete mode 100644 src/test/auxiliary/fn-abi.rs
 delete mode 100644 src/test/auxiliary/foreign_lib.rs
 delete mode 100644 src/test/auxiliary/go_trait.rs
 delete mode 100644 src/test/auxiliary/i8.rs
 delete mode 100644 src/test/auxiliary/impl_privacy_xc_1.rs
 delete mode 100644 src/test/auxiliary/impl_privacy_xc_2.rs
 delete mode 100644 src/test/auxiliary/inherited_stability.rs
 delete mode 100644 src/test/auxiliary/inline-default-methods.rs
 delete mode 100644 src/test/auxiliary/inline_dtor.rs
 delete mode 100644 src/test/auxiliary/inner_static.rs
 delete mode 100644 src/test/auxiliary/internal_unstable.rs
 delete mode 100644 src/test/auxiliary/iss.rs
 delete mode 100644 src/test/auxiliary/issue-10028.rs
 delete mode 100644 src/test/auxiliary/issue-11224.rs
 delete mode 100644 src/test/auxiliary/issue-11225-1.rs
 delete mode 100644 src/test/auxiliary/issue-11225-2.rs
 delete mode 100644 src/test/auxiliary/issue-11225-3.rs
 delete mode 100644 src/test/auxiliary/issue-11508.rs
 delete mode 100644 src/test/auxiliary/issue-11529.rs
 delete mode 100644 src/test/auxiliary/issue-12133-dylib.rs
 delete mode 100644 src/test/auxiliary/issue-12133-dylib2.rs
 delete mode 100644 src/test/auxiliary/issue-12133-rlib.rs
 delete mode 100644 src/test/auxiliary/issue-12660-aux.rs
 delete mode 100644 src/test/auxiliary/issue-13560-1.rs
 delete mode 100644 src/test/auxiliary/issue-13560-2.rs
 delete mode 100644 src/test/auxiliary/issue-13560-3.rs
 delete mode 100644 src/test/auxiliary/issue-13620-1.rs
 delete mode 100644 src/test/auxiliary/issue-13620-2.rs
 delete mode 100644 src/test/auxiliary/issue-13698.rs
 delete mode 100644 src/test/auxiliary/issue-13872-1.rs
 delete mode 100644 src/test/auxiliary/issue-13872-2.rs
 delete mode 100644 src/test/auxiliary/issue-13872-3.rs
 delete mode 100644 src/test/auxiliary/issue-14344-1.rs
 delete mode 100644 src/test/auxiliary/issue-14344-2.rs
 delete mode 100644 src/test/auxiliary/issue-14421.rs
 delete mode 100644 src/test/auxiliary/issue-14422.rs
 delete mode 100644 src/test/auxiliary/issue-15318.rs
 delete mode 100644 src/test/auxiliary/issue-15562.rs
 delete mode 100644 src/test/auxiliary/issue-16643.rs
 delete mode 100644 src/test/auxiliary/issue-16822.rs
 delete mode 100644 src/test/auxiliary/issue-17476.rs
 delete mode 100644 src/test/auxiliary/issue-17662.rs
 delete mode 100644 src/test/auxiliary/issue-17718-aux.rs
 delete mode 100644 src/test/auxiliary/issue-18501.rs
 delete mode 100644 src/test/auxiliary/issue-18502.rs
 delete mode 100644 src/test/auxiliary/issue-18514.rs
 delete mode 100644 src/test/auxiliary/issue-18711.rs
 delete mode 100644 src/test/auxiliary/issue-18913-1.rs
 delete mode 100644 src/test/auxiliary/issue-18913-2.rs
 delete mode 100644 src/test/auxiliary/issue-19163.rs
 delete mode 100644 src/test/auxiliary/issue-19190-3.rs
 delete mode 100644 src/test/auxiliary/issue-19340-1.rs
 delete mode 100644 src/test/auxiliary/issue-20646.rs
 delete mode 100644 src/test/auxiliary/issue-20727.rs
 delete mode 100644 src/test/auxiliary/issue-21092.rs
 delete mode 100644 src/test/auxiliary/issue-21221-3.rs
 delete mode 100644 src/test/auxiliary/issue-21221-4.rs
 delete mode 100644 src/test/auxiliary/issue-21801.rs
 delete mode 100644 src/test/auxiliary/issue-22025.rs
 delete mode 100644 src/test/auxiliary/issue-23207-1.rs
 delete mode 100644 src/test/auxiliary/issue-23207-2.rs
 delete mode 100644 src/test/auxiliary/issue-2380.rs
 delete mode 100644 src/test/auxiliary/issue-2414-a.rs
 delete mode 100644 src/test/auxiliary/issue-2414-b.rs
 delete mode 100644 src/test/auxiliary/issue-25185-1.rs
 delete mode 100644 src/test/auxiliary/issue-25185-2.rs
 delete mode 100644 src/test/auxiliary/issue-2526.rs
 delete mode 100644 src/test/auxiliary/issue-25467.rs
 delete mode 100644 src/test/auxiliary/issue-2631-a.rs
 delete mode 100644 src/test/auxiliary/issue-26606-macro.rs
 delete mode 100644 src/test/auxiliary/issue-27362.rs
 delete mode 100644 src/test/auxiliary/issue-28927-1.rs
 delete mode 100644 src/test/auxiliary/issue-28927-2.rs
 delete mode 100644 src/test/auxiliary/issue-29181.rs
 delete mode 100644 src/test/auxiliary/issue-29485.rs
 delete mode 100644 src/test/auxiliary/issue-29584.rs
 delete mode 100644 src/test/auxiliary/issue-30109-1.rs
 delete mode 100644 src/test/auxiliary/issue-3012-1.rs
 delete mode 100644 src/test/auxiliary/issue-30535.rs
 delete mode 100644 src/test/auxiliary/issue-31702-1.rs
 delete mode 100644 src/test/auxiliary/issue-31702-2.rs
 delete mode 100644 src/test/auxiliary/issue-4208-cc.rs
 delete mode 100644 src/test/auxiliary/issue-4545.rs
 delete mode 100644 src/test/auxiliary/issue-5518.rs
 delete mode 100644 src/test/auxiliary/issue-5521.rs
 delete mode 100644 src/test/auxiliary/issue-7178.rs
 delete mode 100644 src/test/auxiliary/issue-7899.rs
 delete mode 100644 src/test/auxiliary/issue-8044.rs
 delete mode 100644 src/test/auxiliary/issue-8259.rs
 delete mode 100644 src/test/auxiliary/issue-9906.rs
 delete mode 100644 src/test/auxiliary/issue-9968.rs
 delete mode 100644 src/test/auxiliary/issue13213aux.rs
 delete mode 100644 src/test/auxiliary/issue13507.rs
 delete mode 100644 src/test/auxiliary/issue2170lib.rs
 delete mode 100644 src/test/auxiliary/issue24687_lib.rs
 delete mode 100644 src/test/auxiliary/issue_10031_aux.rs
 delete mode 100644 src/test/auxiliary/issue_11680.rs
 delete mode 100644 src/test/auxiliary/issue_12612_1.rs
 delete mode 100644 src/test/auxiliary/issue_12612_2.rs
 delete mode 100644 src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs
 delete mode 100644 src/test/auxiliary/issue_16725.rs
 delete mode 100644 src/test/auxiliary/issue_17718_const_privacy.rs
 delete mode 100644 src/test/auxiliary/issue_19293.rs
 delete mode 100644 src/test/auxiliary/issue_20389.rs
 delete mode 100644 src/test/auxiliary/issue_21202.rs
 delete mode 100644 src/test/auxiliary/issue_2316_a.rs
 delete mode 100644 src/test/auxiliary/issue_2316_b.rs
 delete mode 100644 src/test/auxiliary/issue_2472_b.rs
 delete mode 100644 src/test/auxiliary/issue_2723_a.rs
 delete mode 100644 src/test/auxiliary/issue_30123_aux.rs
 delete mode 100644 src/test/auxiliary/issue_3136_a.rc
 delete mode 100644 src/test/auxiliary/issue_3136_a.rs
 delete mode 100644 src/test/auxiliary/issue_3907.rs
 delete mode 100644 src/test/auxiliary/issue_3907_1.rs
 delete mode 100644 src/test/auxiliary/issue_3979_traits.rs
 delete mode 100644 src/test/auxiliary/issue_5844_aux.rs
 delete mode 100644 src/test/auxiliary/issue_8401.rs
 delete mode 100644 src/test/auxiliary/issue_9123.rs
 delete mode 100644 src/test/auxiliary/issue_9155.rs
 delete mode 100644 src/test/auxiliary/issue_9188.rs
 delete mode 100644 src/test/auxiliary/kinds_in_metadata.rs
 delete mode 100644 src/test/auxiliary/lang-item-public.rs
 delete mode 100644 src/test/auxiliary/lifetime_bound_will_change_warning_lib.rs
 delete mode 100644 src/test/auxiliary/linkage-visibility.rs
 delete mode 100644 src/test/auxiliary/linkage1.rs
 delete mode 100644 src/test/auxiliary/lint_for_crate.rs
 delete mode 100644 src/test/auxiliary/lint_group_plugin_test.rs
 delete mode 100644 src/test/auxiliary/lint_output_format.rs
 delete mode 100644 src/test/auxiliary/lint_plugin_test.rs
 delete mode 100644 src/test/auxiliary/lint_stability.rs
 delete mode 100644 src/test/auxiliary/lint_stability_fields.rs
 delete mode 100644 src/test/auxiliary/lint_unused_extern_crate.rs
 delete mode 100644 src/test/auxiliary/llvm_pass_plugin.rs
 delete mode 100644 src/test/auxiliary/logging_right_crate.rs
 delete mode 100644 src/test/auxiliary/lto-syntax-extension-lib.rs
 delete mode 100644 src/test/auxiliary/lto-syntax-extension-plugin.rs
 delete mode 100644 src/test/auxiliary/macro_crate_MacroRulesTT.rs
 delete mode 100644 src/test/auxiliary/macro_crate_def_only.rs
 delete mode 100644 src/test/auxiliary/macro_crate_nonterminal.rs
 delete mode 100644 src/test/auxiliary/macro_crate_test.rs
 delete mode 100644 src/test/auxiliary/macro_export_inner_module.rs
 delete mode 100644 src/test/auxiliary/macro_non_reexport_2.rs
 delete mode 100644 src/test/auxiliary/macro_reexport_1.rs
 delete mode 100644 src/test/auxiliary/macro_reexport_2.rs
 delete mode 100644 src/test/auxiliary/macro_reexport_2_no_use.rs
 delete mode 100644 src/test/auxiliary/macro_with_super_1.rs
 delete mode 100644 src/test/auxiliary/method_self_arg1.rs
 delete mode 100644 src/test/auxiliary/method_self_arg2.rs
 delete mode 100644 src/test/auxiliary/mir_external_refs.rs
 delete mode 100644 src/test/auxiliary/moves_based_on_type_lib.rs
 delete mode 100644 src/test/auxiliary/msvc-data-only-lib.rs
 delete mode 100644 src/test/auxiliary/namespaced_enum_emulate_flat.rs
 delete mode 100644 src/test/auxiliary/namespaced_enums.rs
 delete mode 100644 src/test/auxiliary/needs_allocator.rs
 delete mode 100644 src/test/auxiliary/nested_item.rs
 delete mode 100644 src/test/auxiliary/newtype_struct_xc.rs
 delete mode 100644 src/test/auxiliary/no_method_suggested_traits.rs
 delete mode 100644 src/test/auxiliary/no_std_crate.rs
 delete mode 100644 src/test/auxiliary/noexporttypelib.rs
 delete mode 100644 src/test/auxiliary/orphan_check_diagnostics.rs
 delete mode 100644 src/test/auxiliary/overloaded_autoderef_xc.rs
 delete mode 100644 src/test/auxiliary/packed.rs
 delete mode 100644 src/test/auxiliary/plugin_args.rs
 delete mode 100644 src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs
 delete mode 100644 src/test/auxiliary/plugin_with_plugin_lib.rs
 delete mode 100644 src/test/auxiliary/priv-impl-prim-ty.rs
 delete mode 100644 src/test/auxiliary/privacy_reexport.rs
 delete mode 100644 src/test/auxiliary/privacy_tuple_struct.rs
 delete mode 100644 src/test/auxiliary/private_trait_xc.rs
 delete mode 100644 src/test/auxiliary/procedural_mbe_matching.rs
 delete mode 100644 src/test/auxiliary/pub_restricted.rs
 delete mode 100644 src/test/auxiliary/pub_static_array.rs
 delete mode 100644 src/test/auxiliary/pub_use_mods_xcrate.rs
 delete mode 100644 src/test/auxiliary/pub_use_xcrate1.rs
 delete mode 100644 src/test/auxiliary/pub_use_xcrate2.rs
 delete mode 100644 src/test/auxiliary/rbmtp_cross_crate_lib.rs
 delete mode 100644 src/test/auxiliary/reachable-unnameable-items.rs
 delete mode 100644 src/test/auxiliary/reexp_stripped.rs
 delete mode 100644 src/test/auxiliary/reexport-should-still-link.rs
 delete mode 100644 src/test/auxiliary/reexported_static_methods.rs
 delete mode 100644 src/test/auxiliary/rlib_crate_test.rs
 delete mode 100644 src/test/auxiliary/roman_numerals.rs
 delete mode 100644 src/test/auxiliary/rustdoc-default-impl.rs
 delete mode 100644 src/test/auxiliary/rustdoc-extern-default-method.rs
 delete mode 100644 src/test/auxiliary/rustdoc-extern-method.rs
 delete mode 100644 src/test/auxiliary/rustdoc-ffi.rs
 delete mode 100644 src/test/auxiliary/rustdoc-hidden-sig.rs
 delete mode 100644 src/test/auxiliary/rustdoc-impl-parts-crosscrate.rs
 delete mode 100644 src/test/auxiliary/rustdoc-nonreachable-impls.rs
 delete mode 100644 src/test/auxiliary/sepcomp-extern-lib.rs
 delete mode 100644 src/test/auxiliary/sepcomp_cci_lib.rs
 delete mode 100644 src/test/auxiliary/sepcomp_lib.rs
 delete mode 100644 src/test/auxiliary/specialization_cross_crate.rs
 delete mode 100644 src/test/auxiliary/specialization_cross_crate_defaults.rs
 delete mode 100644 src/test/auxiliary/stability_attribute_issue.rs
 delete mode 100644 src/test/auxiliary/stability_cfg1.rs
 delete mode 100644 src/test/auxiliary/stability_cfg2.rs
 delete mode 100644 src/test/auxiliary/static-function-pointer-aux.rs
 delete mode 100644 src/test/auxiliary/static-methods-crate.rs
 delete mode 100644 src/test/auxiliary/static_fn_inline_xc_aux.rs
 delete mode 100644 src/test/auxiliary/static_fn_trait_xc_aux.rs
 delete mode 100644 src/test/auxiliary/static_mut_xc.rs
 delete mode 100644 src/test/auxiliary/static_priv_by_default.rs
 delete mode 100644 src/test/auxiliary/struct_destructuring_cross_crate.rs
 delete mode 100644 src/test/auxiliary/struct_field_privacy.rs
 delete mode 100644 src/test/auxiliary/struct_variant_privacy.rs
 delete mode 100644 src/test/auxiliary/struct_variant_xc_aux.rs
 delete mode 100644 src/test/auxiliary/svh-a-base.rs
 delete mode 100644 src/test/auxiliary/svh-a-change-lit.rs
 delete mode 100644 src/test/auxiliary/svh-a-change-significant-cfg.rs
 delete mode 100644 src/test/auxiliary/svh-a-change-trait-bound.rs
 delete mode 100644 src/test/auxiliary/svh-a-change-type-arg.rs
 delete mode 100644 src/test/auxiliary/svh-a-change-type-ret.rs
 delete mode 100644 src/test/auxiliary/svh-a-change-type-static.rs
 delete mode 100644 src/test/auxiliary/svh-a-comment.rs
 delete mode 100644 src/test/auxiliary/svh-a-doc.rs
 delete mode 100644 src/test/auxiliary/svh-a-macro.rs
 delete mode 100644 src/test/auxiliary/svh-a-no-change.rs
 delete mode 100644 src/test/auxiliary/svh-a-redundant-cfg.rs
 delete mode 100644 src/test/auxiliary/svh-a-whitespace.rs
 delete mode 100644 src/test/auxiliary/svh-b.rs
 delete mode 100644 src/test/auxiliary/svh-uta-base.rs
 delete mode 100644 src/test/auxiliary/svh-uta-change-use-trait.rs
 delete mode 100644 src/test/auxiliary/svh-utb.rs
 delete mode 100644 src/test/auxiliary/syntax_extension_with_dll_deps_1.rs
 delete mode 100644 src/test/auxiliary/syntax_extension_with_dll_deps_2.rs
 delete mode 100644 src/test/auxiliary/tdticc_coherence_lib.rs
 delete mode 100644 src/test/auxiliary/thread-local-extern-static.rs
 delete mode 100644 src/test/auxiliary/trait_bounds_on_structs_and_enums_xc.rs
 delete mode 100644 src/test/auxiliary/trait_default_method_xc_aux.rs
 delete mode 100644 src/test/auxiliary/trait_default_method_xc_aux_2.rs
 delete mode 100644 src/test/auxiliary/trait_impl_conflict.rs
 delete mode 100644 src/test/auxiliary/trait_inheritance_auto_xc_2_aux.rs
 delete mode 100644 src/test/auxiliary/trait_inheritance_auto_xc_aux.rs
 delete mode 100644 src/test/auxiliary/trait_inheritance_cross_trait_call_xc_aux.rs
 delete mode 100644 src/test/auxiliary/trait_inheritance_overloading_xc.rs
 delete mode 100644 src/test/auxiliary/trait_safety_lib.rs
 delete mode 100644 src/test/auxiliary/trait_superkinds_in_metadata.rs
 delete mode 100644 src/test/auxiliary/traitimpl.rs
 delete mode 100644 src/test/auxiliary/two_macros.rs
 delete mode 100644 src/test/auxiliary/typeid-intrinsic-aux1.rs
 delete mode 100644 src/test/auxiliary/typeid-intrinsic-aux2.rs
 delete mode 100644 src/test/auxiliary/unboxed-closures-cross-crate.rs
 delete mode 100644 src/test/auxiliary/unreachable_variant.rs
 delete mode 100644 src/test/auxiliary/use_from_trait_xc.rs
 delete mode 100644 src/test/auxiliary/variant-namespacing.rs
 delete mode 100644 src/test/auxiliary/variant-struct.rs
 delete mode 100644 src/test/auxiliary/weak-lang-items.rs
 delete mode 100644 src/test/auxiliary/where_clauses_xc.rs
 delete mode 100644 src/test/auxiliary/xc_private_method_lib.rs
 delete mode 100644 src/test/auxiliary/xcrate-trait-lifetime-param.rs
 delete mode 100644 src/test/auxiliary/xcrate_address_insignificant.rs
 delete mode 100644 src/test/auxiliary/xcrate_associated_type_defaults.rs
 delete mode 100644 src/test/auxiliary/xcrate_static_addresses.rs
 delete mode 100644 src/test/auxiliary/xcrate_struct_aliases.rs
 delete mode 100644 src/test/auxiliary/xcrate_unit_struct.rs
 rename src/test/{auxiliary => compile-fail/aux}/issue-21146-inc.rs (100%)
 rename src/test/{auxiliary => run-pass/aux}/macro-include-items-expr.rs (100%)
 rename src/test/{auxiliary => run-pass/aux}/macro-include-items-item.rs (100%)

diff --git a/mk/tests.mk b/mk/tests.mk
index 90a7888af09..db41950f469 100644
--- a/mk/tests.mk
+++ b/mk/tests.mk
@@ -622,7 +622,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
         --rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
         --rustdoc-path $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
         --llvm-filecheck $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin/FileCheck \
-        --aux-base $$(S)src/test/auxiliary/ \
         --stage-id stage$(1)-$(2) \
         --target $(2) \
         --host $(3) \
diff --git a/src/test/auxiliary/allocator-dummy.rs b/src/test/auxiliary/allocator-dummy.rs
deleted file mode 100644
index a1d21db8f4d..00000000000
--- a/src/test/auxiliary/allocator-dummy.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![feature(allocator, core_intrinsics, libc)]
-#![allocator]
-#![crate_type = "rlib"]
-#![no_std]
-
-extern crate libc;
-
-pub static mut HITS: usize = 0;
-
-#[no_mangle]
-pub extern fn __rust_allocate(size: usize, align: usize) -> *mut u8 {
-    unsafe {
-        HITS += 1;
-        libc::malloc(size as libc::size_t) as *mut u8
-    }
-}
-
-#[no_mangle]
-pub extern fn __rust_deallocate(ptr: *mut u8, old_size: usize, align: usize) {
-    unsafe {
-        HITS += 1;
-        libc::free(ptr as *mut _)
-    }
-}
-
-#[no_mangle]
-pub extern fn __rust_reallocate(ptr: *mut u8, old_size: usize, size: usize,
-                                align: usize) -> *mut u8 {
-    unsafe {
-        libc::realloc(ptr as *mut _, size as libc::size_t) as *mut u8
-    }
-}
-
-#[no_mangle]
-pub extern fn __rust_reallocate_inplace(ptr: *mut u8, old_size: usize,
-                                        size: usize, align: usize) -> usize {
-    unsafe { core::intrinsics::abort() }
-}
-
-#[no_mangle]
-pub extern fn __rust_usable_size(size: usize, align: usize) -> usize {
-    unsafe { core::intrinsics::abort() }
-}
diff --git a/src/test/auxiliary/allocator-dylib.rs b/src/test/auxiliary/allocator-dylib.rs
deleted file mode 100644
index 568b247ecdb..00000000000
--- a/src/test/auxiliary/allocator-dylib.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "dylib"]
-
-pub fn foo() {}
diff --git a/src/test/auxiliary/allocator-dylib2.rs b/src/test/auxiliary/allocator-dylib2.rs
deleted file mode 100644
index 0d76c0e5eb8..00000000000
--- a/src/test/auxiliary/allocator-dylib2.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub fn foo() {}
-
diff --git a/src/test/auxiliary/allocator1.rs b/src/test/auxiliary/allocator1.rs
deleted file mode 100644
index b24784838d0..00000000000
--- a/src/test/auxiliary/allocator1.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![feature(allocator)]
-#![allocator]
-#![crate_type = "rlib"]
-#![no_std]
diff --git a/src/test/auxiliary/allocator2.rs b/src/test/auxiliary/allocator2.rs
deleted file mode 100644
index b24784838d0..00000000000
--- a/src/test/auxiliary/allocator2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![feature(allocator)]
-#![allocator]
-#![crate_type = "rlib"]
-#![no_std]
diff --git a/src/test/auxiliary/allocator3.rs b/src/test/auxiliary/allocator3.rs
deleted file mode 100644
index d3eb1f6f7ab..00000000000
--- a/src/test/auxiliary/allocator3.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![feature(allocator)]
-#![no_std]
-#![allocator]
-#![crate_type = "rlib"]
-
-extern crate needs_allocator;
-
diff --git a/src/test/auxiliary/ambig_impl_2_lib.rs b/src/test/auxiliary/ambig_impl_2_lib.rs
deleted file mode 100644
index 4ba0ccdba9b..00000000000
--- a/src/test/auxiliary/ambig_impl_2_lib.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait me {
-    fn me(&self) -> usize;
-}
-impl me for usize { fn me(&self) -> usize { *self } }
diff --git a/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs b/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
deleted file mode 100644
index 197fb9a6d01..00000000000
--- a/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="anonexternmod"]
-#![feature(libc)]
-
-extern crate libc;
-
-#[link(name="rust_test_helpers")]
-extern {
-    pub fn rust_get_test_int() -> libc::intptr_t;
-}
diff --git a/src/test/auxiliary/anon_trait_static_method_lib.rs b/src/test/auxiliary/anon_trait_static_method_lib.rs
deleted file mode 100644
index 9d93d9689e7..00000000000
--- a/src/test/auxiliary/anon_trait_static_method_lib.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo {
-    pub x: isize
-}
-
-impl Foo {
-    pub fn new() -> Foo {
-        Foo { x: 3 }
-    }
-}
diff --git a/src/test/auxiliary/associated-const-cc-lib.rs b/src/test/auxiliary/associated-const-cc-lib.rs
deleted file mode 100644
index 1fd8fee0117..00000000000
--- a/src/test/auxiliary/associated-const-cc-lib.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(associated_consts)]
-
-#![crate_type="lib"]
-
-// These items are for testing that associated consts work cross-crate.
-pub trait Foo {
-    const BAR: usize;
-}
-
-pub struct FooNoDefault;
-
-impl Foo for FooNoDefault {
-    const BAR: usize = 0;
-}
-
-// These test that defaults and default resolution work cross-crate.
-pub trait FooDefault {
-    const BAR: usize = 1;
-}
-
-pub struct FooOverwriteDefault;
-
-impl FooDefault for FooOverwriteDefault {
-    const BAR: usize = 2;
-}
-
-pub struct FooUseDefault;
-
-impl FooDefault for FooUseDefault {}
-
-// Test inherent impls.
-pub struct InherentBar;
-
-impl InherentBar {
-    pub const BAR: usize = 3;
-}
diff --git a/src/test/auxiliary/associated-types-cc-lib.rs b/src/test/auxiliary/associated-types-cc-lib.rs
deleted file mode 100644
index 175e8730cbc..00000000000
--- a/src/test/auxiliary/associated-types-cc-lib.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Helper for test issue-18048, which tests associated types in a
-// cross-crate scenario.
-
-#![crate_type="lib"]
-
-pub trait Bar: Sized {
-    type T;
-
-    fn get(x: Option<Self>) -> <Self as Bar>::T;
-}
-
-impl Bar for isize {
-    type T = usize;
-
-    fn get(_: Option<isize>) -> usize { 22 }
-}
diff --git a/src/test/auxiliary/attr_plugin_test.rs b/src/test/auxiliary/attr_plugin_test.rs
deleted file mode 100644
index bab3721a313..00000000000
--- a/src/test/auxiliary/attr_plugin_test.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(rustc_private)]
-
-extern crate syntax;
-
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::feature_gate::AttributeType;
-use rustc_plugin::Registry;
-
-
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_attribute("foo".to_owned(), AttributeType::Normal);
-    reg.register_attribute("bar".to_owned(), AttributeType::CrateLevel);
-    reg.register_attribute("baz".to_owned(), AttributeType::Whitelisted);
-}
diff --git a/src/test/auxiliary/augmented_assignments.rs b/src/test/auxiliary/augmented_assignments.rs
deleted file mode 100644
index 6601e7240a7..00000000000
--- a/src/test/auxiliary/augmented_assignments.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::ops::AddAssign;
-
-pub struct Int(pub i32);
-
-impl AddAssign<i32> for Int {
-    fn add_assign(&mut self, _: i32) {
-    }
-}
diff --git a/src/test/auxiliary/blind-item-mixed-crate-use-item-foo.rs b/src/test/auxiliary/blind-item-mixed-crate-use-item-foo.rs
deleted file mode 100644
index f129b4b77bb..00000000000
--- a/src/test/auxiliary/blind-item-mixed-crate-use-item-foo.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub const X: () = ();
diff --git a/src/test/auxiliary/blind-item-mixed-crate-use-item-foo2.rs b/src/test/auxiliary/blind-item-mixed-crate-use-item-foo2.rs
deleted file mode 100644
index 91fa9124551..00000000000
--- a/src/test/auxiliary/blind-item-mixed-crate-use-item-foo2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub const Y: () = ();
diff --git a/src/test/auxiliary/cci_borrow_lib.rs b/src/test/auxiliary/cci_borrow_lib.rs
deleted file mode 100644
index 9c90510a857..00000000000
--- a/src/test/auxiliary/cci_borrow_lib.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub fn foo(x: &usize) -> usize {
-    *x
-}
diff --git a/src/test/auxiliary/cci_capture_clause.rs b/src/test/auxiliary/cci_capture_clause.rs
deleted file mode 100644
index b38e955231e..00000000000
--- a/src/test/auxiliary/cci_capture_clause.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::thread;
-use std::sync::mpsc::{Receiver, channel};
-
-pub fn foo<T:'static + Send + Clone>(x: T) -> Receiver<T> {
-    let (tx, rx) = channel();
-    thread::spawn(move|| {
-        tx.send(x.clone());
-    });
-    rx
-}
diff --git a/src/test/auxiliary/cci_class.rs b/src/test/auxiliary/cci_class.rs
deleted file mode 100644
index 08a13fd8bcc..00000000000
--- a/src/test/auxiliary/cci_class.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod kitties {
-    pub struct cat {
-      meows : usize,
-
-      pub how_hungry : isize,
-    }
-
-    pub fn cat(in_x : usize, in_y : isize) -> cat  {
-        cat {
-            meows: in_x,
-            how_hungry: in_y
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_class_2.rs b/src/test/auxiliary/cci_class_2.rs
deleted file mode 100644
index 7d147832f09..00000000000
--- a/src/test/auxiliary/cci_class_2.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod kitties {
-    pub struct cat {
-      meows : usize,
-
-      pub how_hungry : isize,
-
-    }
-
-    impl cat {
-        pub fn speak(&self) {}
-    }
-
-    pub fn cat(in_x : usize, in_y : isize) -> cat {
-        cat {
-            meows: in_x,
-            how_hungry: in_y
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_class_3.rs b/src/test/auxiliary/cci_class_3.rs
deleted file mode 100644
index ec1bf108dcb..00000000000
--- a/src/test/auxiliary/cci_class_3.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod kitties {
-    pub struct cat {
-        meows : usize,
-
-        pub how_hungry : isize,
-    }
-
-    impl cat {
-        pub fn speak(&mut self) { self.meows += 1; }
-        pub fn meow_count(&mut self) -> usize { self.meows }
-    }
-
-    pub fn cat(in_x : usize, in_y : isize) -> cat {
-        cat {
-            meows: in_x,
-            how_hungry: in_y
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_class_4.rs b/src/test/auxiliary/cci_class_4.rs
deleted file mode 100644
index 300cc31632e..00000000000
--- a/src/test/auxiliary/cci_class_4.rs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod kitties {
-    pub struct cat {
-        meows : usize,
-
-        pub how_hungry : isize,
-        pub name : String,
-    }
-
-    impl cat {
-        pub fn speak(&mut self) { self.meow(); }
-
-        pub fn eat(&mut self) -> bool {
-            if self.how_hungry > 0 {
-                println!("OM NOM NOM");
-                self.how_hungry -= 2;
-                return true;
-            } else {
-                println!("Not hungry!");
-                return false;
-            }
-        }
-    }
-
-    impl cat {
-        pub fn meow(&mut self) {
-            println!("Meow");
-            self.meows += 1;
-            if self.meows % 5 == 0 {
-                self.how_hungry += 1;
-            }
-        }
-    }
-
-    pub fn cat(in_x : usize, in_y : isize, in_name: String) -> cat {
-        cat {
-            meows: in_x,
-            how_hungry: in_y,
-            name: in_name
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_class_5.rs b/src/test/auxiliary/cci_class_5.rs
deleted file mode 100644
index 7fe608f1634..00000000000
--- a/src/test/auxiliary/cci_class_5.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod kitties {
-    pub struct cat {
-        meows : usize,
-        pub how_hungry : isize,
-    }
-
-    impl cat {
-        fn nap(&self) {}
-    }
-
-    pub fn cat(in_x : usize, in_y : isize) -> cat {
-        cat {
-            meows: in_x,
-            how_hungry: in_y
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_class_6.rs b/src/test/auxiliary/cci_class_6.rs
deleted file mode 100644
index c902a6c7dca..00000000000
--- a/src/test/auxiliary/cci_class_6.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod kitties {
-
-    pub struct cat<U> {
-        info : Vec<U> ,
-        meows : usize,
-
-        pub how_hungry : isize,
-    }
-
-    impl<U> cat<U> {
-        pub fn speak<T>(&mut self, stuff: Vec<T> ) {
-            self.meows += stuff.len();
-        }
-
-        pub fn meow_count(&mut self) -> usize { self.meows }
-    }
-
-    pub fn cat<U>(in_x : usize, in_y : isize, in_info: Vec<U> ) -> cat<U> {
-        cat {
-            meows: in_x,
-            how_hungry: in_y,
-            info: in_info
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_class_cast.rs b/src/test/auxiliary/cci_class_cast.rs
deleted file mode 100644
index f54a39d61ef..00000000000
--- a/src/test/auxiliary/cci_class_cast.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod kitty {
-    use std::fmt;
-
-    pub struct cat {
-      meows : usize,
-      pub how_hungry : isize,
-      pub name : String,
-    }
-
-    impl fmt::Display for cat {
-        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-            write!(f, "{}", self.name)
-        }
-    }
-
-    impl cat {
-        fn meow(&mut self) {
-            println!("Meow");
-            self.meows += 1;
-            if self.meows % 5 == 0 {
-                self.how_hungry += 1;
-            }
-        }
-
-    }
-
-    impl cat {
-        pub fn speak(&mut self) { self.meow(); }
-
-        pub fn eat(&mut self) -> bool {
-            if self.how_hungry > 0 {
-                println!("OM NOM NOM");
-                self.how_hungry -= 2;
-                return true;
-            }
-            else {
-                println!("Not hungry!");
-                return false;
-            }
-        }
-    }
-
-    pub fn cat(in_x : usize, in_y : isize, in_name: String) -> cat {
-        cat {
-            meows: in_x,
-            how_hungry: in_y,
-            name: in_name
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_class_trait.rs b/src/test/auxiliary/cci_class_trait.rs
deleted file mode 100644
index 7ca3d7c4ac9..00000000000
--- a/src/test/auxiliary/cci_class_trait.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod animals {
-    pub trait noisy {
-        fn speak(&mut self);
-    }
-}
diff --git a/src/test/auxiliary/cci_const.rs b/src/test/auxiliary/cci_const.rs
deleted file mode 100644
index ee8290050f9..00000000000
--- a/src/test/auxiliary/cci_const.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub extern fn bar() {
-}
-
-pub const foopy: &'static str = "hi there";
-pub const uint_val: usize = 12;
-pub const uint_expr: usize = (1 << uint_val) - 1;
diff --git a/src/test/auxiliary/cci_const_block.rs b/src/test/auxiliary/cci_const_block.rs
deleted file mode 100644
index 76fe9fe5aa4..00000000000
--- a/src/test/auxiliary/cci_const_block.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub static BLOCK_FN_DEF: fn(usize) -> usize = {
-    fn foo(a: usize) -> usize {
-        a + 10
-    }
-    foo
-};
diff --git a/src/test/auxiliary/cci_impl_lib.rs b/src/test/auxiliary/cci_impl_lib.rs
deleted file mode 100644
index d8921f4e09a..00000000000
--- a/src/test/auxiliary/cci_impl_lib.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="cci_impl_lib"]
-
-pub trait uint_helpers {
-    fn to<F>(&self, v: usize, f: F) where F: FnMut(usize);
-}
-
-impl uint_helpers for usize {
-    #[inline]
-    fn to<F>(&self, v: usize, mut f: F) where F: FnMut(usize) {
-        let mut i = *self;
-        while i < v {
-            f(i);
-            i += 1;
-        }
-    }
-}
diff --git a/src/test/auxiliary/cci_intrinsic.rs b/src/test/auxiliary/cci_intrinsic.rs
deleted file mode 100644
index b6e69d29f70..00000000000
--- a/src/test/auxiliary/cci_intrinsic.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(intrinsics)]
-
-pub mod rusti {
-    extern "rust-intrinsic" {
-        pub fn atomic_xchg<T>(dst: *mut T, src: T) -> T;
-    }
-}
-
-#[inline(always)]
-pub fn atomic_xchg(dst: *mut isize, src: isize) -> isize {
-    unsafe {
-        rusti::atomic_xchg(dst, src)
-    }
-}
diff --git a/src/test/auxiliary/cci_iter_lib.rs b/src/test/auxiliary/cci_iter_lib.rs
deleted file mode 100644
index 07d03b4c759..00000000000
--- a/src/test/auxiliary/cci_iter_lib.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="cci_iter_lib"]
-
-#[inline]
-pub fn iter<T, F>(v: &[T], mut f: F) where F: FnMut(&T) {
-    let mut i = 0;
-    let n = v.len();
-    while i < n {
-        f(&v[i]);
-        i += 1;
-    }
-}
diff --git a/src/test/auxiliary/cci_nested_lib.rs b/src/test/auxiliary/cci_nested_lib.rs
deleted file mode 100644
index 8c1a283a72d..00000000000
--- a/src/test/auxiliary/cci_nested_lib.rs
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![allow(unknown_features)]
-#![feature(box_syntax)]
-
-use std::cell::RefCell;
-
-pub struct Entry<A,B> {
-    key: A,
-    value: B
-}
-
-pub struct alist<A,B> {
-    eq_fn: extern "Rust" fn(A,A) -> bool,
-    data: Box<RefCell<Vec<Entry<A,B>>>>,
-}
-
-pub fn alist_add<A:'static,B:'static>(lst: &alist<A,B>, k: A, v: B) {
-    let mut data = lst.data.borrow_mut();
-    (*data).push(Entry{key:k, value:v});
-}
-
-pub fn alist_get<A:Clone + 'static,
-                 B:Clone + 'static>(
-                 lst: &alist<A,B>,
-                 k: A)
-                 -> B {
-    let eq_fn = lst.eq_fn;
-    let data = lst.data.borrow();
-    for entry in &(*data) {
-        if eq_fn(entry.key.clone(), k.clone()) {
-            return entry.value.clone();
-        }
-    }
-    panic!();
-}
-
-#[inline]
-pub fn new_int_alist<B:'static>() -> alist<isize, B> {
-    fn eq_int(a: isize, b: isize) -> bool { a == b }
-    return alist {
-        eq_fn: eq_int,
-        data: box RefCell::new(Vec::new()),
-    };
-}
-
-#[inline]
-pub fn new_int_alist_2<B:'static>() -> alist<isize, B> {
-    #[inline]
-    fn eq_int(a: isize, b: isize) -> bool { a == b }
-    return alist {
-        eq_fn: eq_int,
-        data: box RefCell::new(Vec::new()),
-    };
-}
diff --git a/src/test/auxiliary/cci_no_inline_lib.rs b/src/test/auxiliary/cci_no_inline_lib.rs
deleted file mode 100644
index 4c6f808c619..00000000000
--- a/src/test/auxiliary/cci_no_inline_lib.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="cci_no_inline_lib"]
-
-
-// same as cci_iter_lib, more-or-less, but not marked inline
-pub fn iter<F>(v: Vec<usize> , mut f: F) where F: FnMut(usize) {
-    let mut i = 0;
-    let n = v.len();
-    while i < n {
-        f(v[i]);
-        i += 1;
-    }
-}
diff --git a/src/test/auxiliary/cfg_inner_static.rs b/src/test/auxiliary/cfg_inner_static.rs
deleted file mode 100644
index b5b4390657b..00000000000
--- a/src/test/auxiliary/cfg_inner_static.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// this used to just ICE on compiling
-pub fn foo() {
-    if cfg!(foo) {
-        static a: isize = 3;
-        a
-    } else { 3 };
-}
diff --git a/src/test/auxiliary/cgu_explicit_inlining.rs b/src/test/auxiliary/cgu_explicit_inlining.rs
deleted file mode 100644
index e4ba9fae412..00000000000
--- a/src/test/auxiliary/cgu_explicit_inlining.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-#[inline]
-pub fn inlined() {}
-
-#[inline(always)]
-pub fn always_inlined() {}
-
-#[inline(never)]
-pub fn never_inlined() {}
diff --git a/src/test/auxiliary/cgu_export_trait_method.rs b/src/test/auxiliary/cgu_export_trait_method.rs
deleted file mode 100644
index 49b8e43836e..00000000000
--- a/src/test/auxiliary/cgu_export_trait_method.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub trait Trait : Sized {
-    fn without_self() -> u32;
-    fn without_self_default() -> u32 { 0 }
-
-    fn with_default_impl(self) -> Self { self }
-    fn with_default_impl_generic<T>(self, x: T) -> (Self, T) { (self, x) }
-
-    fn without_default_impl(x: u32) -> (Self, u32);
-    fn without_default_impl_generic<T>(x: T) -> (Self, T);
-}
-
-impl Trait for char {
-    fn without_self() -> u32 { 2 }
-    fn without_default_impl(x: u32) -> (Self, u32) { ('c', x) }
-    fn without_default_impl_generic<T>(x: T) -> (Self, T) { ('c', x) }
-}
-
-impl Trait for u32 {
-    fn without_self() -> u32 { 1 }
-    fn without_default_impl(x: u32) -> (Self, u32) { (0, x) }
-    fn without_default_impl_generic<T>(x: T) -> (Self, T) { (0, x) }
-}
diff --git a/src/test/auxiliary/cgu_extern_closures.rs b/src/test/auxiliary/cgu_extern_closures.rs
deleted file mode 100644
index 944d85db508..00000000000
--- a/src/test/auxiliary/cgu_extern_closures.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-#[inline]
-pub fn inlined_fn(x: i32, y: i32) -> i32 {
-
-    let closure = |a, b| { a + b };
-
-    closure(x, y)
-}
-
-pub fn inlined_fn_generic<T>(x: i32, y: i32, z: T) -> (i32, T) {
-
-    let closure = |a, b| { a + b };
-
-    (closure(x, y), z)
-}
-
-pub fn non_inlined_fn(x: i32, y: i32) -> i32 {
-
-    let closure = |a, b| { a + b };
-
-    closure(x, y)
-}
diff --git a/src/test/auxiliary/cgu_extern_drop_glue.rs b/src/test/auxiliary/cgu_extern_drop_glue.rs
deleted file mode 100644
index 049bdb46579..00000000000
--- a/src/test/auxiliary/cgu_extern_drop_glue.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub struct Struct(pub u32);
-
-impl Drop for Struct {
-    fn drop(&mut self) {}
-}
diff --git a/src/test/auxiliary/cgu_generic_function.rs b/src/test/auxiliary/cgu_generic_function.rs
deleted file mode 100644
index 04c68748eca..00000000000
--- a/src/test/auxiliary/cgu_generic_function.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-struct Struct(u32);
-
-#[inline(never)]
-pub fn foo<T>(x: T) -> (T, u32, i8) {
-    let (x, Struct(y)) = bar(x);
-    (x, y, 2)
-}
-
-#[inline(never)]
-fn bar<T>(x: T) -> (T, Struct) {
-    let _ = not_exported_and_not_generic(0);
-    (x, Struct(1))
-}
-
-// These should not contribute to the codegen items of other crates.
-#[inline(never)]
-pub fn exported_but_not_generic(x: i32) -> i64 {
-    x as i64
-}
-
-#[inline(never)]
-fn not_exported_and_not_generic(x: u32) -> u64 {
-    x as u64
-}
-
diff --git a/src/test/auxiliary/cgu_test.rs b/src/test/auxiliary/cgu_test.rs
deleted file mode 100644
index 7c88d3d37e3..00000000000
--- a/src/test/auxiliary/cgu_test.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-// compile-flags: --crate-type=lib
-
-pub fn id<T>(t: T) -> T {
-  t
-}
diff --git a/src/test/auxiliary/cgu_test_a.rs b/src/test/auxiliary/cgu_test_a.rs
deleted file mode 100644
index 0f0d1cd87e1..00000000000
--- a/src/test/auxiliary/cgu_test_a.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-// compile-flags: -Ccodegen-units=2 --crate-type=lib
-
-extern crate cgu_test;
-
-pub mod a {
-    pub fn a() {
-        ::cgu_test::id(0);
-    }
-}
-pub mod b {
-    pub fn a() {
-        ::cgu_test::id(0);
-    }
-}
diff --git a/src/test/auxiliary/cgu_test_b.rs b/src/test/auxiliary/cgu_test_b.rs
deleted file mode 100644
index 0f0d1cd87e1..00000000000
--- a/src/test/auxiliary/cgu_test_b.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-// compile-flags: -Ccodegen-units=2 --crate-type=lib
-
-extern crate cgu_test;
-
-pub mod a {
-    pub fn a() {
-        ::cgu_test::id(0);
-    }
-}
-pub mod b {
-    pub fn a() {
-        ::cgu_test::id(0);
-    }
-}
diff --git a/src/test/auxiliary/changing-crates-a1.rs b/src/test/auxiliary/changing-crates-a1.rs
deleted file mode 100644
index 18162c5f756..00000000000
--- a/src/test/auxiliary/changing-crates-a1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name = "a"]
-
-pub fn foo<T>() {}
diff --git a/src/test/auxiliary/changing-crates-a2.rs b/src/test/auxiliary/changing-crates-a2.rs
deleted file mode 100644
index 28eae023d68..00000000000
--- a/src/test/auxiliary/changing-crates-a2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name = "a"]
-
-pub fn foo<T>() { println!("hello!"); }
diff --git a/src/test/auxiliary/changing-crates-b.rs b/src/test/auxiliary/changing-crates-b.rs
deleted file mode 100644
index 7b1190fc085..00000000000
--- a/src/test/auxiliary/changing-crates-b.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name = "b"]
-
-extern crate a;
-
-pub fn foo() { a::foo::<isize>(); }
diff --git a/src/test/auxiliary/check_static_recursion_foreign_helper.rs b/src/test/auxiliary/check_static_recursion_foreign_helper.rs
deleted file mode 100644
index c0d81cd8e1b..00000000000
--- a/src/test/auxiliary/check_static_recursion_foreign_helper.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Helper definition for test/run-pass/check-static-recursion-foreign.rs.
-
-#![feature(libc)]
-
-#[crate_id = "check_static_recursion_foreign_helper"]
-#[crate_type = "lib"]
-
-extern crate libc;
-
-#[no_mangle]
-pub static test_static: libc::c_int = 0;
diff --git a/src/test/auxiliary/coherence_copy_like_lib.rs b/src/test/auxiliary/coherence_copy_like_lib.rs
deleted file mode 100644
index d3d389c6a8b..00000000000
--- a/src/test/auxiliary/coherence_copy_like_lib.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "rlib"]
-#![feature(fundamental)]
-
-pub trait MyCopy { }
-impl MyCopy for i32 { }
-
-pub struct MyStruct<T>(T);
-
-#[fundamental]
-pub struct MyFundamentalStruct<T>(T);
diff --git a/src/test/auxiliary/coherence_inherent_cc_lib.rs b/src/test/auxiliary/coherence_inherent_cc_lib.rs
deleted file mode 100644
index 0458636a401..00000000000
--- a/src/test/auxiliary/coherence_inherent_cc_lib.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// See coherence_inherent_cc.rs
-
-pub trait TheTrait {
-    fn the_fn(&self);
-}
-
-pub struct TheStruct;
-
-impl TheTrait for TheStruct {
-    fn the_fn(&self) {}
-}
diff --git a/src/test/auxiliary/coherence_lib.rs b/src/test/auxiliary/coherence_lib.rs
deleted file mode 100644
index daa123849e4..00000000000
--- a/src/test/auxiliary/coherence_lib.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub trait Remote {
-    fn foo(&self) { }
-}
-
-pub trait Remote1<T> {
-    fn foo(&self, t: T) { }
-}
-
-pub trait Remote2<T, U> {
-    fn foo(&self, t: T, u: U) { }
-}
-
-pub struct Pair<T,U>(T,U);
diff --git a/src/test/auxiliary/coherence_orphan_lib.rs b/src/test/auxiliary/coherence_orphan_lib.rs
deleted file mode 100644
index b22d12300c7..00000000000
--- a/src/test/auxiliary/coherence_orphan_lib.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait TheTrait<T> {
-    fn the_fn(&self);
-}
diff --git a/src/test/auxiliary/const_fn_lib.rs b/src/test/auxiliary/const_fn_lib.rs
deleted file mode 100644
index b0d5a6b1272..00000000000
--- a/src/test/auxiliary/const_fn_lib.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Crate that exports a const fn. Used for testing cross-crate.
-
-#![crate_type="rlib"]
-#![feature(const_fn)]
-
-pub const fn foo() -> usize { 22 } //~ ERROR const fn is unstable
diff --git a/src/test/auxiliary/crate-attributes-using-cfg_attr.rs b/src/test/auxiliary/crate-attributes-using-cfg_attr.rs
deleted file mode 100644
index 0028b51f9d1..00000000000
--- a/src/test/auxiliary/crate-attributes-using-cfg_attr.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-// compile-flags: --cfg foo
-
-#![cfg_attr(foo, crate_type="lib")]
-
-pub fn foo() {}
diff --git a/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs b/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs
deleted file mode 100644
index f3d5bf2d65e..00000000000
--- a/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="crate_method_reexport_grrrrrrr2"]
-
-pub use name_pool::add;
-
-pub mod name_pool {
-    pub type name_pool = ();
-
-    pub trait add {
-        fn add(&self, s: String);
-    }
-
-    impl add for name_pool {
-        fn add(&self, _s: String) {
-        }
-    }
-}
-
-pub mod rust {
-    pub use name_pool::add;
-
-    pub type rt = Box<()>;
-
-    pub trait cx {
-        fn cx(&self);
-    }
-
-    impl cx for rt {
-        fn cx(&self) {
-        }
-    }
-}
diff --git a/src/test/auxiliary/crate_a1.rs b/src/test/auxiliary/crate_a1.rs
deleted file mode 100644
index 70f7cac94de..00000000000
--- a/src/test/auxiliary/crate_a1.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo;
-
-pub trait Bar{}
-
-pub fn bar() -> Box<Bar> {
-    unimplemented!()
-}
-
-
-pub fn try_foo(x: Foo){}
-pub fn try_bar(x: Box<Bar>){}
diff --git a/src/test/auxiliary/crate_a2.rs b/src/test/auxiliary/crate_a2.rs
deleted file mode 100644
index d801f25ba2e..00000000000
--- a/src/test/auxiliary/crate_a2.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo;
-
-pub trait Bar{}
-
-pub fn bar() -> Box<Bar> {
-    unimplemented!()
-}
diff --git a/src/test/auxiliary/crate_with_invalid_spans.rs b/src/test/auxiliary/crate_with_invalid_spans.rs
deleted file mode 100644
index b37533d2da7..00000000000
--- a/src/test/auxiliary/crate_with_invalid_spans.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "rlib"]
-// no-prefer-dynamic
-
-// compile-flags: -g
-
-#[macro_use]
-mod crate_with_invalid_spans_macros;
-
-pub fn exported_generic<T>(x: T, y: u32) -> (T, u32) {
-    // Using the add1 macro will produce an invalid span, because the `y` passed
-    // to the macro will have a span from this file, but the rest of the code
-    // generated from the macro will have spans from the macro-defining file.
-    // The AST node for the (1 + y) expression generated by the macro will then
-    // take it's `lo` span bound from the `1` literal in the macro-defining file
-    // and it's `hi` bound from `y` in this file, which should be lower than the
-    // `lo` and even lower than the lower bound of the FileMap it is supposedly
-    // contained in because the FileMap for this file was allocated earlier than
-    // the FileMap of the macro-defining file.
-    return (x, add1!(y));
-}
diff --git a/src/test/auxiliary/crateresolve1-1.rs b/src/test/auxiliary/crateresolve1-1.rs
deleted file mode 100644
index 050f2fe7329..00000000000
--- a/src/test/auxiliary/crateresolve1-1.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags:-C extra-filename=-1
-#![crate_name = "crateresolve1"]
-#![crate_type = "lib"]
-
-pub fn f() -> isize { 10 }
diff --git a/src/test/auxiliary/crateresolve1-2.rs b/src/test/auxiliary/crateresolve1-2.rs
deleted file mode 100644
index d19b3bafba5..00000000000
--- a/src/test/auxiliary/crateresolve1-2.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags:-C extra-filename=-2
-#![crate_name = "crateresolve1"]
-#![crate_type = "lib"]
-
-pub fn f() -> isize { 20 }
diff --git a/src/test/auxiliary/crateresolve1-3.rs b/src/test/auxiliary/crateresolve1-3.rs
deleted file mode 100644
index c5096ac49a8..00000000000
--- a/src/test/auxiliary/crateresolve1-3.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags:-C extra-filename=-3
-#![crate_name = "crateresolve1"]
-#![crate_type = "lib"]
-
-pub fn f() -> isize { 30 }
diff --git a/src/test/auxiliary/cross_crate_debuginfo_type_uniquing.rs b/src/test/auxiliary/cross_crate_debuginfo_type_uniquing.rs
deleted file mode 100644
index f4bc72305a0..00000000000
--- a/src/test/auxiliary/cross_crate_debuginfo_type_uniquing.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-#![crate_type = "rlib"]
-// compile-flags:-g
-
-struct S1;
-
-impl S1 {
-    fn f(&mut self) { }
-}
-
-
-struct S2;
-
-impl S2 {
-    fn f(&mut self) { }
-}
diff --git a/src/test/auxiliary/cross_crate_spans.rs b/src/test/auxiliary/cross_crate_spans.rs
deleted file mode 100644
index 9b6b6221bda..00000000000
--- a/src/test/auxiliary/cross_crate_spans.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "rlib"]
-
-#![allow(unused_variables)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
-// no-prefer-dynamic
-// compile-flags:-g
-
-pub fn generic_function<T: Clone>(val: T) -> (T, T) {
-    let result = (val.clone(), val.clone());
-    let a_variable: u32 = 123456789;
-    let another_variable: f64 = 123456789.5;
-    zzz();
-    result
-}
-
-#[inline(never)]
-fn zzz() {()}
diff --git a/src/test/auxiliary/custom_derive_plugin.rs b/src/test/auxiliary/custom_derive_plugin.rs
deleted file mode 100644
index 5f0ef4de491..00000000000
--- a/src/test/auxiliary/custom_derive_plugin.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(box_syntax)]
-#![feature(rustc_private)]
-
-extern crate syntax;
-extern crate syntax_ext;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::ast;
-use syntax::codemap::Span;
-use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable};
-use syntax::ext::build::AstBuilder;
-use syntax::parse::token;
-use syntax::ptr::P;
-use syntax_ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
-use syntax_ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_syntax_extension(
-        token::intern("derive_TotalSum"),
-        MultiDecorator(box expand));
-}
-
-fn expand(cx: &mut ExtCtxt,
-          span: Span,
-          mitem: &ast::MetaItem,
-          item: &Annotatable,
-          push: &mut FnMut(Annotatable)) {
-    let trait_def = TraitDef {
-        span: span,
-        attributes: vec![],
-        path: Path::new(vec!["TotalSum"]),
-        additional_bounds: vec![],
-        generics: LifetimeBounds::empty(),
-        associated_types: vec![],
-        is_unsafe: false,
-        methods: vec![
-            MethodDef {
-                name: "total_sum",
-                generics: LifetimeBounds::empty(),
-                explicit_self: borrowed_explicit_self(),
-                args: vec![],
-                ret_ty: Literal(Path::new_local("isize")),
-                attributes: vec![],
-                is_unsafe: false,
-                combine_substructure: combine_substructure(box |cx, span, substr| {
-                    let zero = cx.expr_isize(span, 0);
-                    cs_fold(false,
-                            |cx, span, subexpr, field, _| {
-                                cx.expr_binary(span, ast::BinOpKind::Add, subexpr,
-                                    cx.expr_method_call(span, field,
-                                        token::str_to_ident("total_sum"), vec![]))
-                            },
-                            zero,
-                            box |cx, span, _, _| { cx.span_bug(span, "wtf??"); },
-                            cx, span, substr)
-                }),
-            },
-        ],
-    };
-
-    trait_def.expand(cx, mitem, item, push)
-}
diff --git a/src/test/auxiliary/custom_derive_plugin_attr.rs b/src/test/auxiliary/custom_derive_plugin_attr.rs
deleted file mode 100644
index 2878674f0ea..00000000000
--- a/src/test/auxiliary/custom_derive_plugin_attr.rs
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(box_syntax)]
-#![feature(rustc_private)]
-
-extern crate syntax;
-extern crate syntax_ext;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::ast;
-use syntax::attr::AttrMetaMethods;
-use syntax::codemap::Span;
-use syntax::ext::base::{MultiDecorator, ExtCtxt, Annotatable};
-use syntax::ext::build::AstBuilder;
-use syntax::parse::token;
-use syntax::ptr::P;
-use syntax_ext::deriving::generic::{cs_fold, TraitDef, MethodDef, combine_substructure};
-use syntax_ext::deriving::generic::{Substructure, Struct, EnumMatching};
-use syntax_ext::deriving::generic::ty::{Literal, LifetimeBounds, Path, borrowed_explicit_self};
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_syntax_extension(
-        token::intern("derive_TotalSum"),
-        MultiDecorator(box expand));
-}
-
-fn expand(cx: &mut ExtCtxt,
-          span: Span,
-          mitem: &ast::MetaItem,
-          item: &Annotatable,
-          push: &mut FnMut(Annotatable)) {
-    let trait_def = TraitDef {
-        span: span,
-        attributes: vec![],
-        path: Path::new(vec!["TotalSum"]),
-        additional_bounds: vec![],
-        generics: LifetimeBounds::empty(),
-        associated_types: vec![],
-        is_unsafe: false,
-        methods: vec![
-            MethodDef {
-                name: "total_sum",
-                generics: LifetimeBounds::empty(),
-                explicit_self: borrowed_explicit_self(),
-                args: vec![],
-                ret_ty: Literal(Path::new_local("isize")),
-                attributes: vec![],
-                is_unsafe: false,
-                combine_substructure: combine_substructure(Box::new(totalsum_substructure)),
-            },
-        ],
-    };
-
-    trait_def.expand(cx, mitem, item, push)
-}
-
-// Mostly copied from syntax::ext::deriving::hash
-/// Defines how the implementation for `trace()` is to be generated
-fn totalsum_substructure(cx: &mut ExtCtxt, trait_span: Span,
-                         substr: &Substructure) -> P<ast::Expr> {
-    let fields = match *substr.fields {
-        Struct(_, ref fs) | EnumMatching(_, _, ref fs) => fs,
-        _ => cx.span_bug(trait_span, "impossible substructure")
-    };
-
-    fields.iter().fold(cx.expr_isize(trait_span, 0), |acc, ref item| {
-        if item.attrs.iter().find(|a| a.check_name("ignore")).is_some() {
-            acc
-        } else {
-            cx.expr_binary(item.span, ast::BinOpKind::Add, acc,
-                           cx.expr_method_call(item.span,
-                                               item.self_.clone(),
-                                               substr.method_ident,
-                                               Vec::new()))
-        }
-    })
-}
diff --git a/src/test/auxiliary/default_ty_param_cross_crate_crate.rs b/src/test/auxiliary/default_ty_param_cross_crate_crate.rs
deleted file mode 100644
index 4bd8ecacb96..00000000000
--- a/src/test/auxiliary/default_ty_param_cross_crate_crate.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-#![crate_name = "default_param_test"]
-#![feature(default_type_parameter_fallback)]
-
-use std::marker::PhantomData;
-
-pub struct Foo<A, B>(PhantomData<(A, B)>);
-
-pub fn bleh<A=i32, X=char>() -> Foo<A, X> { Foo(PhantomData) }
-
diff --git a/src/test/auxiliary/default_type_params_xc.rs b/src/test/auxiliary/default_type_params_xc.rs
deleted file mode 100644
index fe852e5d8ea..00000000000
--- a/src/test/auxiliary/default_type_params_xc.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Heap;
-
-pub struct FakeHeap;
-
-pub struct FakeVec<T, A = FakeHeap> { pub f: Option<(T,A)> }
diff --git a/src/test/auxiliary/deprecation-lint.rs b/src/test/auxiliary/deprecation-lint.rs
deleted file mode 100644
index ff872efb7bd..00000000000
--- a/src/test/auxiliary/deprecation-lint.rs
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(deprecated)]
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub fn deprecated() {}
-#[deprecated(since = "1.0.0", note = "text")]
-pub fn deprecated_text() {}
-
-pub struct MethodTester;
-
-impl MethodTester {
-    #[deprecated(since = "1.0.0", note = "text")]
-    pub fn method_deprecated(&self) {}
-    #[deprecated(since = "1.0.0", note = "text")]
-    pub fn method_deprecated_text(&self) {}
-}
-
-pub trait Trait {
-    #[deprecated(since = "1.0.0", note = "text")]
-    fn trait_deprecated(&self) {}
-    #[deprecated(since = "1.0.0", note = "text")]
-    fn trait_deprecated_text(&self) {}
-}
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub trait DeprecatedTrait { fn dummy(&self) { } }
-
-impl Trait for MethodTester {}
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub struct DeprecatedStruct {
-    pub i: isize
-}
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub struct DeprecatedUnitStruct;
-
-pub enum Enum {
-    #[deprecated(since = "1.0.0", note = "text")]
-    DeprecatedVariant,
-}
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub struct DeprecatedTupleStruct(pub isize);
-
-pub struct Stable {
-    #[deprecated(since = "1.0.0", note = "text")]
-    pub override2: u8,
-}
-
-pub struct Stable2(pub u8, pub u8, #[deprecated(since = "1.0.0", note = "text")] pub u8);
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub struct Deprecated {
-    pub inherit: u8,
-}
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub struct Deprecated2(pub u8,
-                       pub u8,
-                       pub u8);
-
-#[deprecated(since = "1.0.0", note = "text")]
-pub mod deprecated_mod {
-    pub fn deprecated() {}
-}
-
-#[macro_export]
-macro_rules! macro_test {
-    () => (deprecated());
-}
-
-#[macro_export]
-macro_rules! macro_test_arg {
-    ($func:expr) => ($func);
-}
-
-#[macro_export]
-macro_rules! macro_test_arg_nested {
-    ($func:ident) => (macro_test_arg!($func()));
-}
diff --git a/src/test/auxiliary/derive-no-std.rs b/src/test/auxiliary/derive-no-std.rs
deleted file mode 100644
index f083e10bfdb..00000000000
--- a/src/test/auxiliary/derive-no-std.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-#![no_std]
-
-// Issue #16803
-
-#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
-         Debug, Default, Copy)]
-pub struct Foo {
-    pub x: u32,
-}
-
-#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
-         Debug, Copy)]
-pub enum Bar {
-    Qux,
-    Quux(u32),
-}
-
-#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
-         Debug, Copy)]
-pub enum Void {}
-#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
-         Debug, Copy)]
-pub struct Empty;
-#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
-         Debug, Copy)]
-pub struct AlsoEmpty {}
-
diff --git a/src/test/auxiliary/dummy_mir_pass.rs b/src/test/auxiliary/dummy_mir_pass.rs
deleted file mode 100644
index b5234af937b..00000000000
--- a/src/test/auxiliary/dummy_mir_pass.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar, rustc_private)]
-#![feature(box_syntax)]
-
-#[macro_use] extern crate rustc;
-extern crate rustc_plugin;
-extern crate rustc_const_math;
-extern crate syntax;
-
-use rustc::mir::transform::{self, MirPass};
-use rustc::mir::repr::{Mir, Literal};
-use rustc::mir::visit::MutVisitor;
-use rustc::ty;
-use rustc::middle::const_val::ConstVal;
-use rustc_const_math::ConstInt;
-use rustc_plugin::Registry;
-
-use syntax::ast::NodeId;
-
-struct Pass;
-
-impl transform::Pass for Pass {}
-impl<'tcx> MirPass<'tcx> for Pass {
-    fn run_pass(&mut self, _: &ty::TyCtxt<'tcx>, _: NodeId, mir: &mut Mir<'tcx>) {
-        Visitor.visit_mir(mir)
-    }
-}
-
-struct Visitor;
-
-impl<'tcx> MutVisitor<'tcx> for Visitor {
-    fn visit_literal(&mut self, literal: &mut Literal<'tcx>) {
-        if let Literal::Value { ref mut value } = *literal {
-            if let ConstVal::Integral(ConstInt::I32(ref mut i @ 11)) = *value {
-                *i = 42;
-            }
-        }
-    }
-}
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_mir_pass(box Pass);
-}
diff --git a/src/test/auxiliary/empty-struct.rs b/src/test/auxiliary/empty-struct.rs
deleted file mode 100644
index 22f65c2b0d8..00000000000
--- a/src/test/auxiliary/empty-struct.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct XEmpty1 {}
-pub struct XEmpty2;
-
-pub enum XE {
-    XEmpty3 {},
-    XEmpty4,
-}
diff --git a/src/test/auxiliary/empty.rs b/src/test/auxiliary/empty.rs
deleted file mode 100644
index 30669470522..00000000000
--- a/src/test/auxiliary/empty.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
diff --git a/src/test/auxiliary/explicit_self_xcrate.rs b/src/test/auxiliary/explicit_self_xcrate.rs
deleted file mode 100644
index dafa66d9286..00000000000
--- a/src/test/auxiliary/explicit_self_xcrate.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Foo {
-    #[inline(always)]
-    fn f(&self);
-}
-
-pub struct Bar {
-    pub x: String
-}
-
-impl Foo for Bar {
-    #[inline(always)]
-    fn f(&self) {
-        println!("{}", (*self).x);
-    }
-}
diff --git a/src/test/auxiliary/extern-crosscrate-source.rs b/src/test/auxiliary/extern-crosscrate-source.rs
deleted file mode 100644
index fc2e328f686..00000000000
--- a/src/test/auxiliary/extern-crosscrate-source.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="externcallback"]
-#![crate_type = "lib"]
-#![feature(libc)]
-
-extern crate libc;
-
-pub mod rustrt {
-    extern crate libc;
-
-    #[link(name = "rust_test_helpers")]
-    extern {
-        pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
-                             data: libc::uintptr_t)
-                             -> libc::uintptr_t;
-    }
-}
-
-pub fn fact(n: libc::uintptr_t) -> libc::uintptr_t {
-    unsafe {
-        println!("n = {}", n);
-        rustrt::rust_dbg_call(cb, n)
-    }
-}
-
-pub extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t {
-    if data == 1 {
-        data
-    } else {
-        fact(data - 1) * data
-    }
-}
diff --git a/src/test/auxiliary/extern-take-value.rs b/src/test/auxiliary/extern-take-value.rs
deleted file mode 100644
index 500c455136b..00000000000
--- a/src/test/auxiliary/extern-take-value.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub extern fn f() -> i32 { 1 }
-pub extern fn g() -> i32 { 2 }
-
-pub fn get_f() -> extern fn() -> i32 { f }
-pub fn get_g() -> extern fn() -> i32 { g }
diff --git a/src/test/auxiliary/extern_calling_convention.rs b/src/test/auxiliary/extern_calling_convention.rs
deleted file mode 100644
index 55a4226c663..00000000000
--- a/src/test/auxiliary/extern_calling_convention.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Make sure Rust generates the correct calling convention for extern
-// functions.
-
-#[inline(never)]
-#[cfg(target_arch = "x86_64")]
-pub extern "win64" fn foo(a: isize, b: isize, c: isize, d: isize) {
-    assert_eq!(a, 1);
-    assert_eq!(b, 2);
-    assert_eq!(c, 3);
-    assert_eq!(d, 4);
-
-    println!("a: {}, b: {}, c: {}, d: {}",
-             a, b, c, d)
-}
-
-#[inline(never)]
-#[cfg(not(target_arch = "x86_64"))]
-pub extern fn foo(a: isize, b: isize, c: isize, d: isize) {
-    assert_eq!(a, 1);
-    assert_eq!(b, 2);
-    assert_eq!(c, 3);
-    assert_eq!(d, 4);
-
-    println!("a: {}, b: {}, c: {}, d: {}",
-             a, b, c, d)
-}
diff --git a/src/test/auxiliary/extern_mod_ordering_lib.rs b/src/test/auxiliary/extern_mod_ordering_lib.rs
deleted file mode 100644
index 0fb6adfcda1..00000000000
--- a/src/test/auxiliary/extern_mod_ordering_lib.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub mod extern_mod_ordering_lib {
-    pub fn f() {}
-}
diff --git a/src/test/auxiliary/fat_drop.rs b/src/test/auxiliary/fat_drop.rs
deleted file mode 100644
index 1f944b6ed32..00000000000
--- a/src/test/auxiliary/fat_drop.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub static mut DROPPED: bool = false;
-
-pub struct S {
-    _unsized: [u8]
-}
-
-impl Drop for S {
-    fn drop(&mut self) {
-        unsafe {
-            DROPPED = true;
-        }
-    }
-}
diff --git a/src/test/auxiliary/fn-abi.rs b/src/test/auxiliary/fn-abi.rs
deleted file mode 100644
index 5d380ea6a5a..00000000000
--- a/src/test/auxiliary/fn-abi.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[no_mangle]
-pub extern fn foo() {}
diff --git a/src/test/auxiliary/foreign_lib.rs b/src/test/auxiliary/foreign_lib.rs
deleted file mode 100644
index 460d0a0088c..00000000000
--- a/src/test/auxiliary/foreign_lib.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="foreign_lib"]
-
-#![feature(libc)]
-
-pub mod rustrt {
-    extern crate libc;
-
-    #[link(name = "rust_test_helpers")]
-    extern {
-        pub fn rust_get_test_int() -> libc::intptr_t;
-    }
-}
-
-pub mod rustrt2 {
-    extern crate libc;
-
-    extern {
-        pub fn rust_get_test_int() -> libc::intptr_t;
-    }
-}
-
-pub mod rustrt3 {
-    // Different type, but same ABI (on all supported platforms).
-    // Ensures that we don't ICE or trigger LLVM asserts when
-    // importing the same symbol under different types.
-    // See https://github.com/rust-lang/rust/issues/32740.
-    extern {
-        pub fn rust_get_test_int() -> *const u8;
-    }
-}
-
-pub fn local_uses() {
-    unsafe {
-        let x = rustrt::rust_get_test_int();
-        assert_eq!(x, rustrt2::rust_get_test_int());
-        assert_eq!(x as *const _, rustrt3::rust_get_test_int());
-    }
-}
diff --git a/src/test/auxiliary/go_trait.rs b/src/test/auxiliary/go_trait.rs
deleted file mode 100644
index 044bb606b40..00000000000
--- a/src/test/auxiliary/go_trait.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(specialization)]
-
-// Common code used for tests that model the Fn/FnMut/FnOnce hierarchy.
-
-pub trait Go {
-    fn go(&self, arg: isize);
-}
-
-pub fn go<G:Go>(this: &G, arg: isize) {
-    this.go(arg)
-}
-
-pub trait GoMut {
-    fn go_mut(&mut self, arg: isize);
-}
-
-pub fn go_mut<G:GoMut>(this: &mut G, arg: isize) {
-    this.go_mut(arg)
-}
-
-pub trait GoOnce {
-    fn go_once(self, arg: isize);
-}
-
-pub fn go_once<G:GoOnce>(this: G, arg: isize) {
-    this.go_once(arg)
-}
-
-impl<G> GoMut for G
-    where G : Go
-{
-    default fn go_mut(&mut self, arg: isize) {
-        go(&*self, arg)
-    }
-}
-
-impl<G> GoOnce for G
-    where G : GoMut
-{
-    default fn go_once(mut self, arg: isize) {
-        go_mut(&mut self, arg)
-    }
-}
diff --git a/src/test/auxiliary/i8.rs b/src/test/auxiliary/i8.rs
deleted file mode 100644
index 44e62b99a96..00000000000
--- a/src/test/auxiliary/i8.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// A crate named after a built-in type.
-
-pub struct Test;
diff --git a/src/test/auxiliary/impl_privacy_xc_1.rs b/src/test/auxiliary/impl_privacy_xc_1.rs
deleted file mode 100644
index ad3cdedf7ea..00000000000
--- a/src/test/auxiliary/impl_privacy_xc_1.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub struct Fish {
-    pub x: isize
-}
-
-impl Fish {
-    pub fn swim(&self) {}
-}
diff --git a/src/test/auxiliary/impl_privacy_xc_2.rs b/src/test/auxiliary/impl_privacy_xc_2.rs
deleted file mode 100644
index c3212b0fc6d..00000000000
--- a/src/test/auxiliary/impl_privacy_xc_2.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub struct Fish {
-    pub x: isize
-}
-
-mod unexported {
-    use super::Fish;
-    impl PartialEq for Fish {
-        fn eq(&self, _: &Fish) -> bool { true }
-        fn ne(&self, _: &Fish) -> bool { false }
-    }
-}
diff --git a/src/test/auxiliary/inherited_stability.rs b/src/test/auxiliary/inherited_stability.rs
deleted file mode 100644
index 0b1aee68f44..00000000000
--- a/src/test/auxiliary/inherited_stability.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-#![crate_name="inherited_stability"]
-#![crate_type = "lib"]
-#![unstable(feature = "test_feature", issue = "0")]
-#![feature(staged_api)]
-
-pub fn unstable() {}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub fn stable() {}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub mod stable_mod {
-    #[unstable(feature = "test_feature", issue = "0")]
-    pub fn unstable() {}
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn stable() {}
-}
-
-#[unstable(feature = "test_feature", issue = "0")]
-pub mod unstable_mod {
-    #[stable(feature = "test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn deprecated() {}
-
-    pub fn unstable() {}
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub trait Stable {
-    #[unstable(feature = "test_feature", issue = "0")]
-    fn unstable(&self);
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn stable(&self);
-}
-
-impl Stable for usize {
-    fn unstable(&self) {}
-    fn stable(&self) {}
-}
-
-pub enum Unstable {
-    UnstableVariant,
-    #[stable(feature = "rust1", since = "1.0.0")]
-    StableVariant
-}
diff --git a/src/test/auxiliary/inline-default-methods.rs b/src/test/auxiliary/inline-default-methods.rs
deleted file mode 100644
index e21e6ad2043..00000000000
--- a/src/test/auxiliary/inline-default-methods.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub trait Foo {
-    fn bar(&self);
-    fn foo(&mut self) {}
-}
diff --git a/src/test/auxiliary/inline_dtor.rs b/src/test/auxiliary/inline_dtor.rs
deleted file mode 100644
index dd1fdc2e498..00000000000
--- a/src/test/auxiliary/inline_dtor.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="inline_dtor"]
-
-pub struct Foo;
-
-impl Drop for Foo {
-    #[inline]
-    fn drop(&mut self) {}
-}
diff --git a/src/test/auxiliary/inner_static.rs b/src/test/auxiliary/inner_static.rs
deleted file mode 100644
index 0d15c13a4ef..00000000000
--- a/src/test/auxiliary/inner_static.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct A<T> { pub v: T }
-pub struct B<T> { pub v: T }
-
-pub mod test {
-    pub struct A<T> { pub v: T }
-
-    impl<T> A<T> {
-        pub fn foo(&self) -> isize {
-            static a: isize = 5;
-            return a
-        }
-
-        pub fn bar(&self) -> isize {
-            static a: isize = 6;
-            return a;
-        }
-    }
-}
-
-impl<T> A<T> {
-    pub fn foo(&self) -> isize {
-        static a: isize = 1;
-        return a
-    }
-
-    pub fn bar(&self) -> isize {
-        static a: isize = 2;
-        return a;
-    }
-}
-
-impl<T> B<T> {
-    pub fn foo(&self) -> isize {
-        static a: isize = 3;
-        return a
-    }
-
-    pub fn bar(&self) -> isize {
-        static a: isize = 4;
-        return a;
-    }
-}
-
-pub fn foo() -> isize {
-    let a = A { v: () };
-    let b = B { v: () };
-    let c = test::A { v: () };
-    return a.foo() + a.bar() +
-           b.foo() + b.bar() +
-           c.foo() + c.bar();
-}
diff --git a/src/test/auxiliary/internal_unstable.rs b/src/test/auxiliary/internal_unstable.rs
deleted file mode 100644
index a4cd487eb65..00000000000
--- a/src/test/auxiliary/internal_unstable.rs
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(staged_api, allow_internal_unstable)]
-#![stable(feature = "stable", since = "1.0.0")]
-
-#[unstable(feature = "function", issue = "0")]
-pub fn unstable() {}
-
-
-#[stable(feature = "stable", since = "1.0.0")]
-pub struct Foo {
-    #[unstable(feature = "struct_field", issue = "0")]
-    pub x: u8
-}
-
-impl Foo {
-    #[unstable(feature = "method", issue = "0")]
-    pub fn method(&self) {}
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-pub struct Bar {
-    #[unstable(feature = "struct2_field", issue = "0")]
-    pub x: u8
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
-#[macro_export]
-macro_rules! call_unstable_allow {
-    () => { $crate::unstable() }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
-#[macro_export]
-macro_rules! construct_unstable_allow {
-    ($e: expr) => {
-        $crate::Foo { x: $e }
-    }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
-#[macro_export]
-macro_rules! call_method_allow {
-    ($e: expr) => { $e.method() }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
-#[macro_export]
-macro_rules! access_field_allow {
-    ($e: expr) => { $e.x }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[allow_internal_unstable]
-#[macro_export]
-macro_rules! pass_through_allow {
-    ($e: expr) => { $e }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[macro_export]
-macro_rules! call_unstable_noallow {
-    () => { $crate::unstable() }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[macro_export]
-macro_rules! construct_unstable_noallow {
-    ($e: expr) => {
-        $crate::Foo { x: $e }
-    }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[macro_export]
-macro_rules! call_method_noallow {
-    ($e: expr) => { $e.method() }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[macro_export]
-macro_rules! access_field_noallow {
-    ($e: expr) => { $e.x }
-}
-
-#[stable(feature = "stable", since = "1.0.0")]
-#[macro_export]
-macro_rules! pass_through_noallow {
-    ($e: expr) => { $e }
-}
diff --git a/src/test/auxiliary/iss.rs b/src/test/auxiliary/iss.rs
deleted file mode 100644
index b231efa0fec..00000000000
--- a/src/test/auxiliary/iss.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="issue6919_3"]
-
-// part of issue-6919.rs
-
-pub struct C<K> where K: FnOnce() {
-    pub k: K,
-}
-
-fn no_op() { }
-pub const D : C<fn()> = C {
-    k: no_op as fn()
-};
diff --git a/src/test/auxiliary/issue-10028.rs b/src/test/auxiliary/issue-10028.rs
deleted file mode 100644
index a21deb44fcc..00000000000
--- a/src/test/auxiliary/issue-10028.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(unsafe_no_drop_flag)]
-
-#[unsafe_no_drop_flag]
-pub struct ZeroLengthThingWithDestructor;
-impl Drop for ZeroLengthThingWithDestructor {
-    fn drop(&mut self) {}
-}
-impl ZeroLengthThingWithDestructor {
-    pub fn new() -> ZeroLengthThingWithDestructor {
-        ZeroLengthThingWithDestructor
-    }
-}
diff --git a/src/test/auxiliary/issue-11224.rs b/src/test/auxiliary/issue-11224.rs
deleted file mode 100644
index 15b72b37781..00000000000
--- a/src/test/auxiliary/issue-11224.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![deny(dead_code)]
-
-mod inner {
-    pub trait Trait {
-        fn f(&self) { f(); }
-    }
-
-    impl Trait for isize {}
-
-    fn f() {}
-}
-
-pub fn foo() {
-    let a = &1isize as &inner::Trait;
-    a.f();
-}
diff --git a/src/test/auxiliary/issue-11225-1.rs b/src/test/auxiliary/issue-11225-1.rs
deleted file mode 100644
index e1ec15be927..00000000000
--- a/src/test/auxiliary/issue-11225-1.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod inner {
-    pub trait Trait {
-        fn f(&self) { f(); }
-        fn f_ufcs(&self) { f_ufcs(); }
-    }
-
-    impl Trait for isize {}
-
-    fn f() {}
-    fn f_ufcs() {}
-}
-
-pub fn foo<T: inner::Trait>(t: T) {
-    t.f();
-}
-pub fn foo_ufcs<T: inner::Trait>(t: T) {
-    T::f_ufcs(&t);
-}
diff --git a/src/test/auxiliary/issue-11225-2.rs b/src/test/auxiliary/issue-11225-2.rs
deleted file mode 100644
index 25110edda27..00000000000
--- a/src/test/auxiliary/issue-11225-2.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use inner::Trait;
-
-mod inner {
-    pub struct Foo;
-    pub trait Trait {
-        fn f(&self);
-        fn f_ufcs(&self);
-    }
-
-    impl Trait for Foo {
-        fn f(&self) { }
-        fn f_ufcs(&self) { }
-    }
-}
-
-pub trait Outer {
-    fn foo<T: Trait>(&self, t: T) { t.f(); }
-    fn foo_ufcs<T: Trait>(&self, t: T) { T::f(&t); }
-}
-
-impl Outer for isize {}
-
-pub fn foo<T: Outer>(t: T) {
-    t.foo(inner::Foo);
-}
-pub fn foo_ufcs<T: Outer>(t: T) {
-    T::foo_ufcs(&t, inner::Foo)
-}
diff --git a/src/test/auxiliary/issue-11225-3.rs b/src/test/auxiliary/issue-11225-3.rs
deleted file mode 100644
index d48fb68ba0f..00000000000
--- a/src/test/auxiliary/issue-11225-3.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait PrivateTrait {
-    fn private_trait_method(&self);
-    fn private_trait_method_ufcs(&self);
-}
-
-struct PrivateStruct;
-
-impl PrivateStruct {
-    fn private_inherent_method(&self) { }
-    fn private_inherent_method_ufcs(&self) { }
-}
-
-impl PrivateTrait for PrivateStruct {
-    fn private_trait_method(&self) { }
-    fn private_trait_method_ufcs(&self) { }
-}
-
-#[inline]
-pub fn public_inlinable_function() {
-    PrivateStruct.private_trait_method();
-    PrivateStruct.private_inherent_method();
-}
-
-#[inline]
-pub fn public_inlinable_function_ufcs() {
-    PrivateStruct::private_trait_method(&PrivateStruct);
-    PrivateStruct::private_inherent_method(&PrivateStruct);
-}
diff --git a/src/test/auxiliary/issue-11508.rs b/src/test/auxiliary/issue-11508.rs
deleted file mode 100644
index c5dc3439f2f..00000000000
--- a/src/test/auxiliary/issue-11508.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Closed01<F>(pub F);
-
-pub trait Bar { fn new() -> Self; }
-
-impl<T: Bar> Bar for Closed01<T> {
-    fn new() -> Closed01<T> { Closed01(Bar::new()) }
-}
-impl Bar for f32 { fn new() -> f32 { 1.0 } }
-
-pub fn random<T: Bar>() -> T { Bar::new() }
diff --git a/src/test/auxiliary/issue-11529.rs b/src/test/auxiliary/issue-11529.rs
deleted file mode 100644
index 21ef99e3c3d..00000000000
--- a/src/test/auxiliary/issue-11529.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct A<'a>(pub &'a isize);
diff --git a/src/test/auxiliary/issue-12133-dylib.rs b/src/test/auxiliary/issue-12133-dylib.rs
deleted file mode 100644
index ea22258f67d..00000000000
--- a/src/test/auxiliary/issue-12133-dylib.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "dylib"]
diff --git a/src/test/auxiliary/issue-12133-dylib2.rs b/src/test/auxiliary/issue-12133-dylib2.rs
deleted file mode 100644
index fa5722ae6a3..00000000000
--- a/src/test/auxiliary/issue-12133-dylib2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "dylib"]
-
-extern crate issue_12133_rlib as a;
-extern crate issue_12133_dylib as b;
diff --git a/src/test/auxiliary/issue-12133-rlib.rs b/src/test/auxiliary/issue-12133-rlib.rs
deleted file mode 100644
index 8e46acca124..00000000000
--- a/src/test/auxiliary/issue-12133-rlib.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
diff --git a/src/test/auxiliary/issue-12660-aux.rs b/src/test/auxiliary/issue-12660-aux.rs
deleted file mode 100644
index 9f2bd5d0e93..00000000000
--- a/src/test/auxiliary/issue-12660-aux.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-#![crate_name="issue12660aux"]
-
-pub use my_mod::{MyStruct, my_fn};
-
-mod my_mod {
-    pub struct MyStruct;
-
-    pub fn my_fn(my_struct: MyStruct) {
-    }
-}
diff --git a/src/test/auxiliary/issue-13560-1.rs b/src/test/auxiliary/issue-13560-1.rs
deleted file mode 100644
index 858d7269cd8..00000000000
--- a/src/test/auxiliary/issue-13560-1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "dylib"]
diff --git a/src/test/auxiliary/issue-13560-2.rs b/src/test/auxiliary/issue-13560-2.rs
deleted file mode 100644
index 8e46acca124..00000000000
--- a/src/test/auxiliary/issue-13560-2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
diff --git a/src/test/auxiliary/issue-13560-3.rs b/src/test/auxiliary/issue-13560-3.rs
deleted file mode 100644
index c0539aa1b6e..00000000000
--- a/src/test/auxiliary/issue-13560-3.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-
-#[macro_use] #[no_link] extern crate issue_13560_1 as t1;
-#[macro_use] extern crate issue_13560_2 as t2;
diff --git a/src/test/auxiliary/issue-13620-1.rs b/src/test/auxiliary/issue-13620-1.rs
deleted file mode 100644
index e373421fabf..00000000000
--- a/src/test/auxiliary/issue-13620-1.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo {
-    pub foo: extern fn()
-}
-
-extern fn the_foo() {}
-
-pub const FOO: Foo = Foo {
-    foo: the_foo
-};
diff --git a/src/test/auxiliary/issue-13620-2.rs b/src/test/auxiliary/issue-13620-2.rs
deleted file mode 100644
index 554170bc130..00000000000
--- a/src/test/auxiliary/issue-13620-2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate issue_13620_1 as crate1;
-
-pub static FOO2: crate1::Foo = crate1::FOO;
diff --git a/src/test/auxiliary/issue-13698.rs b/src/test/auxiliary/issue-13698.rs
deleted file mode 100644
index ecddfe99b3b..00000000000
--- a/src/test/auxiliary/issue-13698.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub trait Foo {
-    #[doc(hidden)]
-    fn foo(&self) {}
-}
-
-impl Foo for i32 {}
diff --git a/src/test/auxiliary/issue-13872-1.rs b/src/test/auxiliary/issue-13872-1.rs
deleted file mode 100644
index 941b67eb2da..00000000000
--- a/src/test/auxiliary/issue-13872-1.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub enum A { B }
diff --git a/src/test/auxiliary/issue-13872-2.rs b/src/test/auxiliary/issue-13872-2.rs
deleted file mode 100644
index bb51417528a..00000000000
--- a/src/test/auxiliary/issue-13872-2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate issue_13872_1 as foo;
-
-pub use foo::A::B;
diff --git a/src/test/auxiliary/issue-13872-3.rs b/src/test/auxiliary/issue-13872-3.rs
deleted file mode 100644
index e20618f1ec0..00000000000
--- a/src/test/auxiliary/issue-13872-3.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate issue_13872_2 as bar;
-
-use bar::B;
-
-pub fn foo() {
-    match B {
-        B => {}
-    }
-}
diff --git a/src/test/auxiliary/issue-14344-1.rs b/src/test/auxiliary/issue-14344-1.rs
deleted file mode 100644
index 78c03bac33f..00000000000
--- a/src/test/auxiliary/issue-14344-1.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-
-pub fn foo() {}
diff --git a/src/test/auxiliary/issue-14344-2.rs b/src/test/auxiliary/issue-14344-2.rs
deleted file mode 100644
index 9df35e50adb..00000000000
--- a/src/test/auxiliary/issue-14344-2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate issue_14344_1;
-
-pub fn bar() {}
diff --git a/src/test/auxiliary/issue-14421.rs b/src/test/auxiliary/issue-14421.rs
deleted file mode 100644
index a48088609f9..00000000000
--- a/src/test/auxiliary/issue-14421.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-#![deny(warnings)]
-#![allow(dead_code)]
-
-pub use src::aliases::B;
-pub use src::hidden_core::make;
-
-mod src {
-    pub mod aliases {
-        use super::hidden_core::A;
-        pub type B = A<f32>;
-    }
-
-    pub mod hidden_core {
-        use super::aliases::B;
-
-        pub struct A<T> { t: T }
-
-        pub fn make() -> B { A { t: 1.0 } }
-
-        impl<T> A<T> {
-            pub fn foo(&mut self) { println!("called foo"); }
-        }
-    }
-}
diff --git a/src/test/auxiliary/issue-14422.rs b/src/test/auxiliary/issue-14422.rs
deleted file mode 100644
index 32af6d9255e..00000000000
--- a/src/test/auxiliary/issue-14422.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-#![deny(warnings)]
-
-pub use src::aliases::B;
-pub use src::hidden_core::make;
-
-mod src {
-    pub mod aliases {
-        use super::hidden_core::A;
-        pub type B = A;
-    }
-
-    pub mod hidden_core {
-        use super::aliases::B;
-
-        #[derive(Copy, Clone)]
-        pub struct A;
-
-        pub fn make() -> B { A }
-
-        impl A {
-            pub fn foo(&mut self) { println!("called foo"); }
-        }
-    }
-}
diff --git a/src/test/auxiliary/issue-15318.rs b/src/test/auxiliary/issue-15318.rs
deleted file mode 100644
index 145b4df6299..00000000000
--- a/src/test/auxiliary/issue-15318.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-#![doc(html_root_url = "http://example.com/")]
-
-/// dox
-#[doc(primitive = "pointer")]
-pub mod ptr {}
diff --git a/src/test/auxiliary/issue-15562.rs b/src/test/auxiliary/issue-15562.rs
deleted file mode 100644
index 76243d3bced..00000000000
--- a/src/test/auxiliary/issue-15562.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-extern {
-    pub fn transmute();
-}
diff --git a/src/test/auxiliary/issue-16643.rs b/src/test/auxiliary/issue-16643.rs
deleted file mode 100644
index b590160a0c2..00000000000
--- a/src/test/auxiliary/issue-16643.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub struct TreeBuilder<H> { pub h: H }
-
-impl<H> TreeBuilder<H> {
-    pub fn process_token(&mut self) {
-        match self {
-            _ => for _y in self.by_ref() {}
-        }
-    }
-}
-
-impl<H> Iterator for TreeBuilder<H> {
-    type Item = H;
-
-    fn next(&mut self) -> Option<H> {
-        None
-    }
-}
diff --git a/src/test/auxiliary/issue-16822.rs b/src/test/auxiliary/issue-16822.rs
deleted file mode 100644
index 0e3041c1174..00000000000
--- a/src/test/auxiliary/issue-16822.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-use std::cell::RefCell;
-
-pub struct Window<Data>{
-    pub data: RefCell<Data>
-}
-
-impl<Data:  Update> Window<Data> {
-    pub fn update(&self, e: i32) {
-        match e {
-            1 => self.data.borrow_mut().update(),
-            _ => {}
-        }
-    }
-}
-
-pub trait Update {
-    fn update(&mut self);
-}
diff --git a/src/test/auxiliary/issue-17476.rs b/src/test/auxiliary/issue-17476.rs
deleted file mode 100644
index 644d1634e9d..00000000000
--- a/src/test/auxiliary/issue-17476.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-#![doc(html_root_url = "http://example.com")]
-
-pub trait Foo {
-    fn foo(&self) {}
-}
diff --git a/src/test/auxiliary/issue-17662.rs b/src/test/auxiliary/issue-17662.rs
deleted file mode 100644
index fb55a077005..00000000000
--- a/src/test/auxiliary/issue-17662.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub trait Foo<'a, T> {
-    fn foo(&'a self) -> T;
-}
-
-pub fn foo<'a, T>(x: &'a Foo<'a, T>) -> T {
-    let x: &'a Foo<T> = x;
-    //            ^ the lifetime parameter of Foo is left to be inferred.
-    x.foo()
-    // ^ encoding this method call in metadata triggers an ICE.
-}
diff --git a/src/test/auxiliary/issue-17718-aux.rs b/src/test/auxiliary/issue-17718-aux.rs
deleted file mode 100644
index 373fc042175..00000000000
--- a/src/test/auxiliary/issue-17718-aux.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(const_fn)]
-
-use std::sync::atomic;
-
-pub const C1: usize = 1;
-pub const C2: atomic::AtomicUsize = atomic::AtomicUsize::new(0);
-pub const C3: fn() = foo;
-pub const C4: usize = C1 * C1 + C1 / C1;
-pub const C5: &'static usize = &C4;
-
-pub static S1: usize = 3;
-pub static S2: atomic::AtomicUsize = atomic::AtomicUsize::new(0);
-
-fn foo() {}
diff --git a/src/test/auxiliary/issue-18501.rs b/src/test/auxiliary/issue-18501.rs
deleted file mode 100644
index af3bc20378c..00000000000
--- a/src/test/auxiliary/issue-18501.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "rlib"]
-struct Foo;
-
-trait Tr {
-    fn tr(&self);
-}
-
-impl Tr for Foo {
-    fn tr(&self) {}
-}
-
-fn take_method<T>(f: fn(&T), t: &T) {}
-
-#[inline]
-pub fn pass_method() {
-    take_method(Tr::tr, &Foo);
-}
diff --git a/src/test/auxiliary/issue-18502.rs b/src/test/auxiliary/issue-18502.rs
deleted file mode 100644
index 718b046e1e4..00000000000
--- a/src/test/auxiliary/issue-18502.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-struct Foo;
-// This is the ICE trigger
-struct Formatter;
-
-trait Show {
-    fn fmt(&self);
-}
-
-impl Show for Foo {
-    fn fmt(&self) {}
-}
-
-fn bar<T>(f: extern "Rust" fn(&T), t: &T) { }
-
-// ICE requirement: this has to be marked as inline
-#[inline]
-pub fn baz() {
-    bar(Show::fmt, &Foo);
-}
diff --git a/src/test/auxiliary/issue-18514.rs b/src/test/auxiliary/issue-18514.rs
deleted file mode 100644
index 2a5e07a3285..00000000000
--- a/src/test/auxiliary/issue-18514.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "rlib"]
-
-pub trait Tr {
-    fn tr(&self);
-}
-
-pub struct St<V>(pub Vec<V>);
-
-impl<V> Tr for St<V> {
-    fn tr(&self) {
-        match self {
-            &St(ref v) => {
-                v.iter();
-            }
-        }
-    }
-}
diff --git a/src/test/auxiliary/issue-18711.rs b/src/test/auxiliary/issue-18711.rs
deleted file mode 100644
index a29dcc00cdd..00000000000
--- a/src/test/auxiliary/issue-18711.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(unboxed_closures)]
-#![crate_type = "rlib"]
-
-pub fn inner<F>(f: F) -> F {
-    (move || f)()
-}
diff --git a/src/test/auxiliary/issue-18913-1.rs b/src/test/auxiliary/issue-18913-1.rs
deleted file mode 100644
index 4315e27797f..00000000000
--- a/src/test/auxiliary/issue-18913-1.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-#![crate_name = "foo"]
-
-pub fn foo() -> i32 { 0 }
diff --git a/src/test/auxiliary/issue-18913-2.rs b/src/test/auxiliary/issue-18913-2.rs
deleted file mode 100644
index dcdeaec48f5..00000000000
--- a/src/test/auxiliary/issue-18913-2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-#![crate_name = "foo"]
-
-pub fn foo() -> i32 { 1 }
diff --git a/src/test/auxiliary/issue-19163.rs b/src/test/auxiliary/issue-19163.rs
deleted file mode 100644
index 76c5cdafd7c..00000000000
--- a/src/test/auxiliary/issue-19163.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-#[macro_export]
-macro_rules! mywrite {
-    ($dst:expr, $($arg:tt)*) => ($dst.write_fmt(format_args!($($arg)*)))
-}
diff --git a/src/test/auxiliary/issue-19190-3.rs b/src/test/auxiliary/issue-19190-3.rs
deleted file mode 100644
index 2c9271202a6..00000000000
--- a/src/test/auxiliary/issue-19190-3.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-use std::ops::Deref;
-
-pub struct Foo;
-
-impl Deref for Foo {
-    type Target = i32;
-    fn deref(&self) -> &i32 { loop {} }
-}
-
-pub struct Bar;
-pub struct Baz;
-
-impl Baz {
-    pub fn baz(&self) {}
-    pub fn static_baz() {}
-}
-
-impl Deref for Bar {
-    type Target = Baz;
-    fn deref(&self) -> &Baz { loop {} }
-}
diff --git a/src/test/auxiliary/issue-19340-1.rs b/src/test/auxiliary/issue-19340-1.rs
deleted file mode 100644
index fc61b78d8a7..00000000000
--- a/src/test/auxiliary/issue-19340-1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub enum Homura {
-    Madoka { name: String },
-}
diff --git a/src/test/auxiliary/issue-20646.rs b/src/test/auxiliary/issue-20646.rs
deleted file mode 100644
index 815b78a91d9..00000000000
--- a/src/test/auxiliary/issue-20646.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub trait Trait {
-    type Output;
-}
-
-pub fn fun<T>(_: T) where T: Trait<Output=i32> {}
diff --git a/src/test/auxiliary/issue-20727.rs b/src/test/auxiliary/issue-20727.rs
deleted file mode 100644
index 2ec761fad96..00000000000
--- a/src/test/auxiliary/issue-20727.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub trait Deref {
-    type Target: ?Sized;
-
-    fn deref<'a>(&'a self) -> &'a Self::Target;
-}
-
-pub trait Add<RHS = Self> {
-    type Output;
-
-    fn add(self, rhs: RHS) -> Self::Output;
-}
-
-
-pub trait Bar {}
-pub trait Deref2 {
-    type Target: Bar;
-
-    fn deref(&self) -> Self::Target;
-}
-
-pub trait Index<Idx: ?Sized> {
-    type Output: ?Sized;
-    fn index(&self, index: Idx) -> &Self::Output;
-}
-
-pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
-    fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
-}
diff --git a/src/test/auxiliary/issue-21092.rs b/src/test/auxiliary/issue-21092.rs
deleted file mode 100644
index e906311e3ae..00000000000
--- a/src/test/auxiliary/issue-21092.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub trait Foo {
-    type Bar;
-    fn foo(&self) {}
-}
-
-pub struct Bar;
-
-impl Foo for Bar {
-    type Bar = i32;
-}
diff --git a/src/test/auxiliary/issue-21221-3.rs b/src/test/auxiliary/issue-21221-3.rs
deleted file mode 100644
index fae0fe16a26..00000000000
--- a/src/test/auxiliary/issue-21221-3.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// testing whether the lookup mechanism picks up types
-// defined in the outside crate
-
-#![crate_type="lib"]
-
-pub mod outer {
-    // should suggest this
-    pub trait OuterTrait {}
-
-    // should not suggest this since the module is private
-    mod private_module {
-        pub trait OuterTrait {}
-    }
-
-    // should not suggest since the trait is private
-    pub mod public_module {
-        trait OuterTrait {}
-    }
-}
diff --git a/src/test/auxiliary/issue-21221-4.rs b/src/test/auxiliary/issue-21221-4.rs
deleted file mode 100644
index fffe060ee24..00000000000
--- a/src/test/auxiliary/issue-21221-4.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// testing whether the lookup mechanism picks up types
-// defined in the outside crate
-
-#![crate_type="lib"]
-
-mod foo {
-    // should not be suggested => foo is private
-    pub trait T {}
-}
-
-// should be suggested
-pub use foo::T;
diff --git a/src/test/auxiliary/issue-21801.rs b/src/test/auxiliary/issue-21801.rs
deleted file mode 100644
index f618edec598..00000000000
--- a/src/test/auxiliary/issue-21801.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub struct Foo;
-
-impl Foo {
-    pub fn new<F>(f: F) -> Foo where F: FnMut() -> i32 {
-        loop {}
-    }
-}
diff --git a/src/test/auxiliary/issue-22025.rs b/src/test/auxiliary/issue-22025.rs
deleted file mode 100644
index 35a37e27d91..00000000000
--- a/src/test/auxiliary/issue-22025.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub mod foo {
-
-    pub trait Foo {}
-    pub struct Bar;
-
-    impl Foo for Bar {}
-
-}
diff --git a/src/test/auxiliary/issue-23207-1.rs b/src/test/auxiliary/issue-23207-1.rs
deleted file mode 100644
index ec9f2004ebf..00000000000
--- a/src/test/auxiliary/issue-23207-1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod fmt {
-    pub struct Error;
-}
diff --git a/src/test/auxiliary/issue-23207-2.rs b/src/test/auxiliary/issue-23207-2.rs
deleted file mode 100644
index 5e9c540ab69..00000000000
--- a/src/test/auxiliary/issue-23207-2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate issue_23207_1;
-
-pub mod fmt {
-    pub use issue_23207_1::fmt::Error;
-}
-
diff --git a/src/test/auxiliary/issue-2380.rs b/src/test/auxiliary/issue-2380.rs
deleted file mode 100644
index cfebc4abaaa..00000000000
--- a/src/test/auxiliary/issue-2380.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="a"]
-#![crate_type = "lib"]
-
-#![allow(unknown_features)]
-#![feature(box_syntax)]
-
-pub trait i<T>
-{
-    fn dummy(&self, t: T) -> T { panic!() }
-}
-
-pub fn f<T>() -> Box<i<T>+'static> {
-    impl<T> i<T> for () { }
-
-    box () as Box<i<T>+'static>
-}
diff --git a/src/test/auxiliary/issue-2414-a.rs b/src/test/auxiliary/issue-2414-a.rs
deleted file mode 100644
index 8c414193bd6..00000000000
--- a/src/test/auxiliary/issue-2414-a.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="a"]
-#![crate_type = "lib"]
-
-type t1 = usize;
-
-trait foo {
-    fn foo(&self);
-}
-
-impl foo for String {
-    fn foo(&self) {}
-}
diff --git a/src/test/auxiliary/issue-2414-b.rs b/src/test/auxiliary/issue-2414-b.rs
deleted file mode 100644
index b1c95bcb430..00000000000
--- a/src/test/auxiliary/issue-2414-b.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-#![crate_name="b"]
-#![crate_type = "lib"]
-
-extern crate a;
diff --git a/src/test/auxiliary/issue-25185-1.rs b/src/test/auxiliary/issue-25185-1.rs
deleted file mode 100644
index 1ec29501b76..00000000000
--- a/src/test/auxiliary/issue-25185-1.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![feature(linked_from)]
-
-#![crate_type = "rlib"]
-
-#[link(name = "rust_test_helpers", kind = "static")]
-#[linked_from = "rust_test_helpers"]
-extern {
-    pub fn rust_dbg_extern_identity_u32(u: u32) -> u32;
-}
diff --git a/src/test/auxiliary/issue-25185-2.rs b/src/test/auxiliary/issue-25185-2.rs
deleted file mode 100644
index 00b5277d6c0..00000000000
--- a/src/test/auxiliary/issue-25185-2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate issue_25185_1;
-
-pub use issue_25185_1::rust_dbg_extern_identity_u32;
diff --git a/src/test/auxiliary/issue-2526.rs b/src/test/auxiliary/issue-2526.rs
deleted file mode 100644
index 3d777d01d50..00000000000
--- a/src/test/auxiliary/issue-2526.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="issue_2526"]
-#![crate_type = "lib"]
-
-use std::marker;
-
-pub struct arc_destruct<T: Sync> {
-    _data: isize,
-    _marker: marker::PhantomData<T>
-}
-
-impl<T: Sync> Drop for arc_destruct<T> {
-    fn drop(&mut self) {}
-}
-
-fn arc_destruct<T: Sync>(data: isize) -> arc_destruct<T> {
-    arc_destruct {
-        _data: data,
-        _marker: marker::PhantomData
-    }
-}
-
-fn arc<T: Sync>(_data: T) -> arc_destruct<T> {
-    arc_destruct(0)
-}
-
-fn init() -> arc_destruct<context_res> {
-    arc(context_res())
-}
-
-pub struct context_res {
-    ctx : isize,
-}
-
-impl Drop for context_res {
-    fn drop(&mut self) {}
-}
-
-fn context_res() -> context_res {
-    context_res {
-        ctx: 0
-    }
-}
-
-pub type context = arc_destruct<context_res>;
diff --git a/src/test/auxiliary/issue-25467.rs b/src/test/auxiliary/issue-25467.rs
deleted file mode 100644
index e358cde1573..00000000000
--- a/src/test/auxiliary/issue-25467.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub trait Trait {
-    // the issue is sensitive to interning order - so use names
-    // unlikely to appear in libstd.
-    type Issue25467FooT;
-    type Issue25467BarT;
-}
-
-pub type Object = Option<Box<Trait<Issue25467FooT=(),Issue25467BarT=()>>>;
diff --git a/src/test/auxiliary/issue-2631-a.rs b/src/test/auxiliary/issue-2631-a.rs
deleted file mode 100644
index 604a3e69a21..00000000000
--- a/src/test/auxiliary/issue-2631-a.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="req"]
-#![crate_type = "lib"]
-
-use std::cell::RefCell;
-use std::collections::HashMap;
-use std::rc::Rc;
-
-pub type header_map = HashMap<String, Rc<RefCell<Vec<Rc<String>>>>>;
-
-// the unused ty param is necessary so this gets monomorphized
-pub fn request<T>(req: &header_map) {
-  let data = req[&"METHOD".to_string()].clone();
-  let _x = data.borrow().clone()[0].clone();
-}
diff --git a/src/test/auxiliary/issue-26606-macro.rs b/src/test/auxiliary/issue-26606-macro.rs
deleted file mode 100644
index 6059a252bce..00000000000
--- a/src/test/auxiliary/issue-26606-macro.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[macro_export]
-macro_rules! make_item (
-    ($name: ident) => (pub const $name: usize = 42;)
-);
diff --git a/src/test/auxiliary/issue-27362.rs b/src/test/auxiliary/issue-27362.rs
deleted file mode 100644
index 25de698cad1..00000000000
--- a/src/test/auxiliary/issue-27362.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-#![feature(const_fn)]
-
-pub const fn foo() {}
-pub const unsafe fn bar() {}
-
-pub struct Foo;
-
-impl Foo {
-    pub const unsafe fn baz() {}
-}
diff --git a/src/test/auxiliary/issue-28927-1.rs b/src/test/auxiliary/issue-28927-1.rs
deleted file mode 100644
index 7d6b448df43..00000000000
--- a/src/test/auxiliary/issue-28927-1.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate issue_28927_2 as inner2;
-pub use inner2 as bar;
diff --git a/src/test/auxiliary/issue-28927-2.rs b/src/test/auxiliary/issue-28927-2.rs
deleted file mode 100644
index c5117005049..00000000000
--- a/src/test/auxiliary/issue-28927-2.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Baz;
diff --git a/src/test/auxiliary/issue-29181.rs b/src/test/auxiliary/issue-29181.rs
deleted file mode 100644
index 361f1ea5509..00000000000
--- a/src/test/auxiliary/issue-29181.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub mod foo {
-    pub use super::*;
-}
diff --git a/src/test/auxiliary/issue-29485.rs b/src/test/auxiliary/issue-29485.rs
deleted file mode 100644
index 825c4497021..00000000000
--- a/src/test/auxiliary/issue-29485.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="a"]
-#![crate_type = "lib"]
-
-pub struct X(pub u8);
-
-impl Drop for X {
-    fn drop(&mut self) {
-        assert_eq!(self.0, 1)
-    }
-}
-
-pub fn f(x: &mut X, g: fn()) {
-    x.0 = 1;
-    g();
-    x.0 = 0;
-}
diff --git a/src/test/auxiliary/issue-29584.rs b/src/test/auxiliary/issue-29584.rs
deleted file mode 100644
index 63c79f875ef..00000000000
--- a/src/test/auxiliary/issue-29584.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Cmetadata=aux
-
-pub struct Foo;
-
-#[doc(hidden)]
-mod bar {
-    trait Bar {}
-
-    impl Bar for ::Foo {}
-}
diff --git a/src/test/auxiliary/issue-30109-1.rs b/src/test/auxiliary/issue-30109-1.rs
deleted file mode 100644
index 59f952a0b29..00000000000
--- a/src/test/auxiliary/issue-30109-1.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Bar;
diff --git a/src/test/auxiliary/issue-3012-1.rs b/src/test/auxiliary/issue-3012-1.rs
deleted file mode 100644
index b6199f59ebe..00000000000
--- a/src/test/auxiliary/issue-3012-1.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="socketlib"]
-#![crate_type = "lib"]
-#![feature(libc)]
-
-pub mod socket {
-    extern crate libc;
-
-    pub struct socket_handle {
-        sockfd: libc::c_int,
-    }
-
-    impl Drop for socket_handle {
-        fn drop(&mut self) {
-            /* c::close(self.sockfd); */
-        }
-    }
-
-    pub fn socket_handle(x: libc::c_int) -> socket_handle {
-        socket_handle {
-            sockfd: x
-        }
-    }
-}
diff --git a/src/test/auxiliary/issue-30535.rs b/src/test/auxiliary/issue-30535.rs
deleted file mode 100644
index 8d44e8d1016..00000000000
--- a/src/test/auxiliary/issue-30535.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub enum Foo {
-    FooV { data: () }
-}
diff --git a/src/test/auxiliary/issue-31702-1.rs b/src/test/auxiliary/issue-31702-1.rs
deleted file mode 100644
index 50a31630df3..00000000000
--- a/src/test/auxiliary/issue-31702-1.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[derive(Copy)]
-pub struct U256(pub [u64; 4]);
-
-impl Clone for U256 {
-    fn clone(&self) -> U256 {
-        *self
-    }
-}
-
-impl U256 {
-    pub fn new(value: u64) -> U256 {
-        let mut ret = [0; 4];
-        ret[0] = value;
-        U256(ret)
-    }
-}
diff --git a/src/test/auxiliary/issue-31702-2.rs b/src/test/auxiliary/issue-31702-2.rs
deleted file mode 100644
index c5b1bc6dfb0..00000000000
--- a/src/test/auxiliary/issue-31702-2.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -g
-
-extern crate issue_31702_1;
-
-use std::collections::HashMap;
-use issue_31702_1::U256;
-
-pub struct Ethash {
-    engine_params: for<'a> fn() -> Option<&'a Vec<u8>>,
-    u256_params: HashMap<String, U256>,
-}
-
-impl Ethash {
-    pub fn u256_param(&mut self, name: &str) -> U256 {
-        let engine = self.engine_params;
-        *self.u256_params.entry(name.to_owned()).or_insert_with(|| {
-            engine().map_or(U256::new(0u64), |_a| loop {})
-        })
-    }
-}
diff --git a/src/test/auxiliary/issue-4208-cc.rs b/src/test/auxiliary/issue-4208-cc.rs
deleted file mode 100644
index a7c1633784d..00000000000
--- a/src/test/auxiliary/issue-4208-cc.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="numeric"]
-#![crate_type = "lib"]
-
-pub trait Trig<T> {
-    fn sin(&self) -> T;
-}
-
-pub fn sin<T:Trig<R>, R>(theta: &T) -> R { theta.sin() }
-
-pub trait Angle<T>: Trig<T> {}
diff --git a/src/test/auxiliary/issue-4545.rs b/src/test/auxiliary/issue-4545.rs
deleted file mode 100644
index 29feeaa7d92..00000000000
--- a/src/test/auxiliary/issue-4545.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct S<T>(Option<T>);
-pub fn mk<T>() -> S<T> { S(None) }
diff --git a/src/test/auxiliary/issue-5518.rs b/src/test/auxiliary/issue-5518.rs
deleted file mode 100644
index cea227e050f..00000000000
--- a/src/test/auxiliary/issue-5518.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait A<'a, T> {
-    fn f(&mut self) -> &'a mut T;
-    fn p() -> T;
-}
diff --git a/src/test/auxiliary/issue-5521.rs b/src/test/auxiliary/issue-5521.rs
deleted file mode 100644
index 82bd2b64204..00000000000
--- a/src/test/auxiliary/issue-5521.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-use std::collections::HashMap;
-
-pub type map = Box<HashMap<usize, usize>>;
diff --git a/src/test/auxiliary/issue-7178.rs b/src/test/auxiliary/issue-7178.rs
deleted file mode 100644
index 18b464bd924..00000000000
--- a/src/test/auxiliary/issue-7178.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo<'a, A:'a>(&'a A);
-
-impl<'a, A> Foo<'a, A> {
-    pub fn new(a: &'a A) -> Foo<'a, A> {
-        Foo(a)
-    }
-}
diff --git a/src/test/auxiliary/issue-7899.rs b/src/test/auxiliary/issue-7899.rs
deleted file mode 100644
index e197e84442b..00000000000
--- a/src/test/auxiliary/issue-7899.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct V2<T>(pub T, pub T);
diff --git a/src/test/auxiliary/issue-8044.rs b/src/test/auxiliary/issue-8044.rs
deleted file mode 100644
index 8f328699ae0..00000000000
--- a/src/test/auxiliary/issue-8044.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct BTree<V> {
-    pub node: TreeItem<V>,
-}
-
-pub enum TreeItem<V> {
-    TreeLeaf { value: V },
-}
-
-pub fn leaf<V>(value: V) -> TreeItem<V> {
-    TreeItem::TreeLeaf { value: value }
-}
-
-fn main() {
-    BTree::<isize> { node: leaf(1) };
-}
diff --git a/src/test/auxiliary/issue-8259.rs b/src/test/auxiliary/issue-8259.rs
deleted file mode 100644
index 91167e8e32b..00000000000
--- a/src/test/auxiliary/issue-8259.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub enum Foo<'a> {
-    A,
-    B(&'a str),
-}
diff --git a/src/test/auxiliary/issue-9906.rs b/src/test/auxiliary/issue-9906.rs
deleted file mode 100644
index 5eb48985bf9..00000000000
--- a/src/test/auxiliary/issue-9906.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use other::FooBar;
-pub use other::foo;
-
-mod other {
-    pub struct FooBar{value: isize}
-    impl FooBar{
-        pub fn new(val: isize) -> FooBar {
-            FooBar{value: val}
-        }
-    }
-
-    pub fn foo(){
-        1+1;
-    }
-}
diff --git a/src/test/auxiliary/issue-9968.rs b/src/test/auxiliary/issue-9968.rs
deleted file mode 100644
index d04d761e112..00000000000
--- a/src/test/auxiliary/issue-9968.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use internal::core::{Trait, Struct};
-
-mod internal {
-    pub mod core {
-        pub struct Struct;
-        impl Struct {
-            pub fn init() -> Struct {
-                Struct
-            }
-        }
-
-        pub trait Trait {
-            fn test(&self) {
-                private();
-            }
-        }
-
-        impl Trait for Struct {}
-
-        fn private() { }
-    }
-}
diff --git a/src/test/auxiliary/issue13213aux.rs b/src/test/auxiliary/issue13213aux.rs
deleted file mode 100644
index d0566a1e091..00000000000
--- a/src/test/auxiliary/issue13213aux.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-// compile-flags:-g
-
-pub use private::P;
-
-#[derive(Copy, Clone)]
-pub struct S {
-    p: P,
-}
-
-mod private {
-    #[derive(Copy, Clone)]
-    pub struct P {
-        p: i32,
-    }
-    pub const THREE: P = P { p: 3 };
-}
-
-pub static A: S = S { p: private::THREE };
diff --git a/src/test/auxiliary/issue13507.rs b/src/test/auxiliary/issue13507.rs
deleted file mode 100644
index 4cb846b5186..00000000000
--- a/src/test/auxiliary/issue13507.rs
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(core)]
-
-pub mod testtypes {
-    use std::any::TypeId;
-
-    pub fn type_ids() -> Vec<TypeId> {
-        vec![
-            TypeId::of::<FooBool>(),
-            TypeId::of::<FooInt>(),
-            TypeId::of::<FooUint>(),
-            TypeId::of::<FooFloat>(),
-            TypeId::of::<FooStr>(),
-            TypeId::of::<FooArray>(),
-            TypeId::of::<FooSlice>(),
-            TypeId::of::<FooBox>(),
-            TypeId::of::<FooPtr>(),
-            TypeId::of::<FooRef>(),
-            TypeId::of::<FooFnPtr>(),
-            TypeId::of::<FooNil>(),
-            TypeId::of::<FooTuple>(),
-            TypeId::of::<FooTrait>(),
-            TypeId::of::<FooStruct>(),
-            TypeId::of::<FooEnum>()
-        ]
-    }
-
-    // Tests TyBool
-    pub type FooBool = bool;
-
-    // Tests TyChar
-    pub type FooChar = char;
-
-    // Tests TyInt (does not test all variants of IntTy)
-    pub type FooInt = isize;
-
-    // Tests TyUint (does not test all variants of UintTy)
-    pub type FooUint = usize;
-
-    // Tests TyFloat (does not test all variants of FloatTy)
-    pub type FooFloat = f64;
-
-    // Tests TyStr
-    pub type FooStr = str;
-
-    // Tests TyArray
-    pub type FooArray = [u8; 1];
-
-    // Tests TySlice
-    pub type FooSlice = [u8];
-
-    // Tests TyBox (of u8)
-    pub type FooBox = Box<u8>;
-
-    // Tests TyRawPtr
-    pub type FooPtr = *const u8;
-
-    // Tests TyRef
-    pub type FooRef = &'static u8;
-
-    // Tests TyFnPtr
-    pub type FooFnPtr = fn(u8) -> bool;
-
-    // Tests TyTrait
-    pub trait FooTrait {
-        fn foo_method(&self) -> usize;
-    }
-
-    // Tests TyStruct
-    pub struct FooStruct {
-        pub pub_foo_field: usize,
-        foo_field: usize
-    }
-
-    // Tests TyEnum
-    pub enum FooEnum {
-        VarA(usize),
-        VarB(usize, usize)
-    }
-
-    // Tests TyTuple
-    pub type FooNil = ();
-    pub type FooTuple = (u8, i8, bool);
-
-    // Skipping TyParam
-
-    // Skipping TyInfer
-
-    // Skipping TyError
-}
diff --git a/src/test/auxiliary/issue2170lib.rs b/src/test/auxiliary/issue2170lib.rs
deleted file mode 100644
index b311ee35674..00000000000
--- a/src/test/auxiliary/issue2170lib.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo(_x: i32) {
-}
-
-pub struct rsrc {
-  x: i32,
-}
-
-impl Drop for rsrc {
-    fn drop(&mut self) {
-        foo(self.x);
-    }
-}
-
-pub fn rsrc(x: i32) -> rsrc {
-    rsrc {
-        x: x
-    }
-}
diff --git a/src/test/auxiliary/issue24687_lib.rs b/src/test/auxiliary/issue24687_lib.rs
deleted file mode 100644
index f1624fd2e58..00000000000
--- a/src/test/auxiliary/issue24687_lib.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-// This is a file that pulls in a separate file as a submodule, where
-// that separate file has many multi-byte characters, to try to
-// encourage the compiler to trip on them.
-
-mod issue24687_mbcs_in_comments;
-
-pub use issue24687_mbcs_in_comments::D;
-
diff --git a/src/test/auxiliary/issue_10031_aux.rs b/src/test/auxiliary/issue_10031_aux.rs
deleted file mode 100644
index f0f1af2e3a3..00000000000
--- a/src/test/auxiliary/issue_10031_aux.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Wrap<A>(pub A);
diff --git a/src/test/auxiliary/issue_11680.rs b/src/test/auxiliary/issue_11680.rs
deleted file mode 100644
index 18f78750b15..00000000000
--- a/src/test/auxiliary/issue_11680.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Foo {
-    Bar(isize)
-}
-
-pub mod test {
-    enum Foo {
-        Bar(isize)
-    }
-}
diff --git a/src/test/auxiliary/issue_12612_1.rs b/src/test/auxiliary/issue_12612_1.rs
deleted file mode 100644
index a0234c1185a..00000000000
--- a/src/test/auxiliary/issue_12612_1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod bar {
-    pub fn foo() {}
-}
diff --git a/src/test/auxiliary/issue_12612_2.rs b/src/test/auxiliary/issue_12612_2.rs
deleted file mode 100644
index b4ae4374b2e..00000000000
--- a/src/test/auxiliary/issue_12612_2.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub fn baz() {}
diff --git a/src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs b/src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs
deleted file mode 100644
index 25a75c2d295..00000000000
--- a/src/test/auxiliary/issue_16723_multiple_items_syntax_ext.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar, quote, rustc_private)]
-#![crate_type = "dylib"]
-
-extern crate syntax;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::ast;
-use syntax::codemap;
-use syntax::ext::base::{ExtCtxt, MacResult, MacEager};
-use syntax::util::small_vector::SmallVector;
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_macro("multiple_items", expand)
-}
-
-fn expand(cx: &mut ExtCtxt, _: codemap::Span, _: &[ast::TokenTree]) -> Box<MacResult+'static> {
-    MacEager::items(SmallVector::many(vec![
-        quote_item!(cx, struct Struct1;).unwrap(),
-        quote_item!(cx, struct Struct2;).unwrap()
-    ]))
-}
diff --git a/src/test/auxiliary/issue_16725.rs b/src/test/auxiliary/issue_16725.rs
deleted file mode 100644
index b3b04b4a5ac..00000000000
--- a/src/test/auxiliary/issue_16725.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern {
-    fn bar();
-}
diff --git a/src/test/auxiliary/issue_17718_const_privacy.rs b/src/test/auxiliary/issue_17718_const_privacy.rs
deleted file mode 100644
index 3901d73382f..00000000000
--- a/src/test/auxiliary/issue_17718_const_privacy.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use foo::FOO2;
-
-pub const FOO: usize = 3;
-const BAR: usize = 3;
-
-mod foo {
-    pub const FOO2: usize = 3;
-}
diff --git a/src/test/auxiliary/issue_19293.rs b/src/test/auxiliary/issue_19293.rs
deleted file mode 100644
index 12894ad72e1..00000000000
--- a/src/test/auxiliary/issue_19293.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo (pub isize);
-pub enum MyEnum {
-    Foo(Foo),
-}
diff --git a/src/test/auxiliary/issue_20389.rs b/src/test/auxiliary/issue_20389.rs
deleted file mode 100644
index 4ce7e3079e3..00000000000
--- a/src/test/auxiliary/issue_20389.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait T {
-    type C;
-    fn dummy(&self) { }
-}
diff --git a/src/test/auxiliary/issue_21202.rs b/src/test/auxiliary/issue_21202.rs
deleted file mode 100644
index afdbf78aa82..00000000000
--- a/src/test/auxiliary/issue_21202.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod A {
-    pub struct Foo;
-    impl Foo {
-        fn foo(&self) { }
-    }
-}
diff --git a/src/test/auxiliary/issue_2316_a.rs b/src/test/auxiliary/issue_2316_a.rs
deleted file mode 100644
index 6bd1e7335ad..00000000000
--- a/src/test/auxiliary/issue_2316_a.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum cat {
-  tabby, calico, tortoiseshell
-}
diff --git a/src/test/auxiliary/issue_2316_b.rs b/src/test/auxiliary/issue_2316_b.rs
deleted file mode 100644
index 8a212f6e5a9..00000000000
--- a/src/test/auxiliary/issue_2316_b.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![allow(unused_imports)]
-
-extern crate issue_2316_a;
-
-pub mod cloth {
-    use issue_2316_a::*;
-
-    pub enum fabric {
-        gingham, flannel, calico
-    }
-}
diff --git a/src/test/auxiliary/issue_2472_b.rs b/src/test/auxiliary/issue_2472_b.rs
deleted file mode 100644
index 5f55476427f..00000000000
--- a/src/test/auxiliary/issue_2472_b.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub struct S(pub ());
-
-impl S {
-    pub fn foo(&self) { }
-}
-
-pub trait T {
-    fn bar(&self);
-}
-
-impl T for S {
-    fn bar(&self) { }
-}
diff --git a/src/test/auxiliary/issue_2723_a.rs b/src/test/auxiliary/issue_2723_a.rs
deleted file mode 100644
index 44bea136a7c..00000000000
--- a/src/test/auxiliary/issue_2723_a.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub unsafe fn f(xs: Vec<isize> ) {
-    xs.iter().map(|_x| { unsafe fn q() { panic!(); } }).collect::<Vec<()>>();
-}
diff --git a/src/test/auxiliary/issue_30123_aux.rs b/src/test/auxiliary/issue_30123_aux.rs
deleted file mode 100644
index f60311a9400..00000000000
--- a/src/test/auxiliary/issue_30123_aux.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::marker::PhantomData;
-
-pub struct Directed;
-pub struct Undirected;
-
-pub struct Graph<N, E, Ty = Directed> {
-    nodes: Vec<PhantomData<N>>,
-    edges: Vec<PhantomData<E>>,
-    ty: PhantomData<Ty>,
-}
-
-
-impl<N, E> Graph<N, E, Directed> {
-    pub fn new() -> Self {
-        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
-    }
-}
-
-impl<N, E> Graph<N, E, Undirected> {
-    pub fn new_undirected() -> Self {
-        Graph{nodes: Vec::new(), edges: Vec::new(), ty: PhantomData}
-    }
-}
diff --git a/src/test/auxiliary/issue_3136_a.rc b/src/test/auxiliary/issue_3136_a.rc
deleted file mode 100644
index 320e0ceed0f..00000000000
--- a/src/test/auxiliary/issue_3136_a.rc
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub mod issue_3136_a;
diff --git a/src/test/auxiliary/issue_3136_a.rs b/src/test/auxiliary/issue_3136_a.rs
deleted file mode 100644
index 55de208cc90..00000000000
--- a/src/test/auxiliary/issue_3136_a.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait x {
-    fn use_x<T>(&self);
-}
-struct y(());
-impl x for y {
-    fn use_x<T>(&self) {
-        struct foo { //~ ERROR quux
-            i: ()
-        }
-        fn new_foo<T>(i: ()) -> foo {
-            foo { i: i }
-        }
-    }
-}
diff --git a/src/test/auxiliary/issue_3907.rs b/src/test/auxiliary/issue_3907.rs
deleted file mode 100644
index 6472c08c222..00000000000
--- a/src/test/auxiliary/issue_3907.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Foo {
-    fn bar();
-}
diff --git a/src/test/auxiliary/issue_3907_1.rs b/src/test/auxiliary/issue_3907_1.rs
deleted file mode 100644
index 25d2e3399cf..00000000000
--- a/src/test/auxiliary/issue_3907_1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Foo {
-        fn bar();
-}
diff --git a/src/test/auxiliary/issue_3979_traits.rs b/src/test/auxiliary/issue_3979_traits.rs
deleted file mode 100644
index 5c306be69c4..00000000000
--- a/src/test/auxiliary/issue_3979_traits.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="issue_3979_traits"]
-
-#![crate_type = "lib"]
-
-pub trait Positioned {
-  fn SetX(&mut self, isize);
-  fn X(&self) -> isize;
-}
-
-pub trait Movable: Positioned {
-  fn translate(&mut self, dx: isize) {
-    let x = self.X() + dx;
-    self.SetX(x);
-  }
-}
diff --git a/src/test/auxiliary/issue_5844_aux.rs b/src/test/auxiliary/issue_5844_aux.rs
deleted file mode 100644
index 5c878b1e667..00000000000
--- a/src/test/auxiliary/issue_5844_aux.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(libc)]
-
-extern crate libc;
-
-extern "C" {
-    pub fn rand() -> libc::c_int;
-}
diff --git a/src/test/auxiliary/issue_8401.rs b/src/test/auxiliary/issue_8401.rs
deleted file mode 100644
index 40e01c1474a..00000000000
--- a/src/test/auxiliary/issue_8401.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// for this issue, this code must be built in a library
-
-use std::mem;
-
-trait A {
-    fn dummy(&self) { }
-}
-struct B;
-impl A for B {}
-
-fn bar<T>(_: &mut A, _: &T) {}
-
-fn foo<T>(t: &T) {
-    let mut b = B;
-    bar(&mut b as &mut A, t)
-}
diff --git a/src/test/auxiliary/issue_9123.rs b/src/test/auxiliary/issue_9123.rs
deleted file mode 100644
index 8c2546e76cf..00000000000
--- a/src/test/auxiliary/issue_9123.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-pub trait X {
-    fn x() {
-        fn f() { }
-        f();
-    }
-    fn dummy(&self) { }
-}
diff --git a/src/test/auxiliary/issue_9155.rs b/src/test/auxiliary/issue_9155.rs
deleted file mode 100644
index 486eb8fd6f6..00000000000
--- a/src/test/auxiliary/issue_9155.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo<T>(T);
-
-impl<T> Foo<T> {
-    pub fn new(t: T) -> Foo<T> {
-        Foo(t)
-    }
-}
diff --git a/src/test/auxiliary/issue_9188.rs b/src/test/auxiliary/issue_9188.rs
deleted file mode 100644
index 8ff85cc359d..00000000000
--- a/src/test/auxiliary/issue_9188.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub fn foo<T>() -> &'static isize {
-    if false {
-        static a: isize = 4;
-        return &a;
-    } else {
-        static a: isize = 5;
-        return &a;
-    }
-}
-
-pub fn bar() -> &'static isize {
-    foo::<isize>()
-}
diff --git a/src/test/auxiliary/kinds_in_metadata.rs b/src/test/auxiliary/kinds_in_metadata.rs
deleted file mode 100644
index 82f182c04bd..00000000000
--- a/src/test/auxiliary/kinds_in_metadata.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests that metadata serialization works for the `Copy` kind.
-
-#![crate_type="lib"]
-
-pub fn f<T:Copy>() {}
diff --git a/src/test/auxiliary/lang-item-public.rs b/src/test/auxiliary/lang-item-public.rs
deleted file mode 100644
index 41ceb924ab3..00000000000
--- a/src/test/auxiliary/lang-item-public.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(libc)]
-#![no_std]
-#![feature(lang_items)]
-
-extern crate core;
-extern crate libc;
-
-#[lang = "eh_personality"]
-extern fn eh_personality() {}
-
-#[lang = "eh_unwind_resume"]
-extern fn eh_unwind_resume() {}
-
-#[lang = "panic_fmt"]
-extern fn rust_begin_unwind(msg: core::fmt::Arguments, file: &'static str,
-                            line: u32) -> ! {
-    loop {}
-}
diff --git a/src/test/auxiliary/lifetime_bound_will_change_warning_lib.rs b/src/test/auxiliary/lifetime_bound_will_change_warning_lib.rs
deleted file mode 100644
index 95f8b39c487..00000000000
--- a/src/test/auxiliary/lifetime_bound_will_change_warning_lib.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "rlib"]
-
-// Helper for testing that we get suitable warnings when lifetime
-// bound change will cause breakage.
-
-pub fn just_ref(x: &Fn()) {
-}
-
-pub fn ref_obj(x: &Box<Fn()>) {
-    // this will change to &Box<Fn()+'static>...
-}
diff --git a/src/test/auxiliary/linkage-visibility.rs b/src/test/auxiliary/linkage-visibility.rs
deleted file mode 100644
index 09a2e8ecd87..00000000000
--- a/src/test/auxiliary/linkage-visibility.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(rustc_private)]
-
-// We're testing linkage visibility; the compiler warns us, but we want to
-// do the runtime check that these functions aren't exported.
-#![allow(private_no_mangle_fns)]
-
-extern crate rustc_back;
-
-use rustc_back::dynamic_lib::DynamicLibrary;
-
-#[no_mangle]
-pub fn foo() { bar(); }
-
-pub fn foo2<T>() {
-    fn bar2() {
-        bar();
-    }
-    bar2();
-}
-
-#[no_mangle]
-fn bar() { }
-
-#[allow(dead_code)]
-#[no_mangle]
-fn baz() { }
-
-pub fn test() {
-    let lib = DynamicLibrary::open(None).unwrap();
-    unsafe {
-        assert!(lib.symbol::<isize>("foo").is_ok());
-        assert!(lib.symbol::<isize>("baz").is_err());
-        assert!(lib.symbol::<isize>("bar").is_err());
-    }
-}
diff --git a/src/test/auxiliary/linkage1.rs b/src/test/auxiliary/linkage1.rs
deleted file mode 100644
index ca4046d8163..00000000000
--- a/src/test/auxiliary/linkage1.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[no_mangle]
-pub static foo: isize = 3;
-
-pub fn bar() {}
diff --git a/src/test/auxiliary/lint_for_crate.rs b/src/test/auxiliary/lint_for_crate.rs
deleted file mode 100644
index a424517da12..00000000000
--- a/src/test/auxiliary/lint_for_crate.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar, rustc_private)]
-#![feature(box_syntax)]
-
-#[macro_use] extern crate rustc;
-extern crate rustc_plugin;
-extern crate syntax;
-
-use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPassObject, LintArray};
-use rustc_plugin::Registry;
-use rustc::hir;
-use syntax::attr;
-
-declare_lint!(CRATE_NOT_OKAY, Warn, "crate not marked with #![crate_okay]");
-
-struct Pass;
-
-impl LintPass for Pass {
-    fn get_lints(&self) -> LintArray {
-        lint_array!(CRATE_NOT_OKAY)
-    }
-}
-
-impl LateLintPass for Pass {
-    fn check_crate(&mut self, cx: &LateContext, krate: &hir::Crate) {
-        if !attr::contains_name(&krate.attrs, "crate_okay") {
-            cx.span_lint(CRATE_NOT_OKAY, krate.span,
-                         "crate is not marked with #![crate_okay]");
-        }
-    }
-}
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_late_lint_pass(box Pass as LateLintPassObject);
-}
diff --git a/src/test/auxiliary/lint_group_plugin_test.rs b/src/test/auxiliary/lint_group_plugin_test.rs
deleted file mode 100644
index 1e9a77724a8..00000000000
--- a/src/test/auxiliary/lint_group_plugin_test.rs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(box_syntax, rustc_private)]
-
-// Load rustc as a plugin to get macros
-#[macro_use]
-extern crate rustc;
-extern crate rustc_plugin;
-
-use rustc::hir;
-use rustc::lint::{LateContext, LintContext, LintPass, LateLintPass, LateLintPassObject, LintArray};
-use rustc_plugin::Registry;
-
-declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
-
-declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
-
-struct Pass;
-
-impl LintPass for Pass {
-    fn get_lints(&self) -> LintArray {
-        lint_array!(TEST_LINT, PLEASE_LINT)
-    }
-}
-
-impl LateLintPass for Pass {
-    fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
-        match &*it.name.as_str() {
-            "lintme" => cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'"),
-            "pleaselintme" => cx.span_lint(PLEASE_LINT, it.span, "item is named 'pleaselintme'"),
-            _ => {}
-        }
-    }
-}
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_late_lint_pass(box Pass as LateLintPassObject);
-    reg.register_lint_group("lint_me", vec![TEST_LINT, PLEASE_LINT]);
-}
diff --git a/src/test/auxiliary/lint_output_format.rs b/src/test/auxiliary/lint_output_format.rs
deleted file mode 100644
index 0553b4a49b7..00000000000
--- a/src/test/auxiliary/lint_output_format.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="lint_output_format"]
-#![crate_type = "lib"]
-#![feature(staged_api)]
-#![unstable(feature = "test_feature", issue = "0")]
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn foo() -> usize {
-    20
-}
-
-#[unstable(feature = "test_feature", issue = "0")]
-pub fn bar() -> usize {
-    40
-}
-
-#[unstable(feature = "test_feature", issue = "0")]
-pub fn baz() -> usize {
-    30
-}
diff --git a/src/test/auxiliary/lint_plugin_test.rs b/src/test/auxiliary/lint_plugin_test.rs
deleted file mode 100644
index 8ea131da338..00000000000
--- a/src/test/auxiliary/lint_plugin_test.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(box_syntax, rustc_private)]
-
-extern crate syntax;
-
-// Load rustc as a plugin to get macros
-#[macro_use]
-extern crate rustc;
-extern crate rustc_plugin;
-
-use rustc::lint::{EarlyContext, LintContext, LintPass, EarlyLintPass,
-                  EarlyLintPassObject, LintArray};
-use rustc_plugin::Registry;
-use syntax::ast;
-declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
-
-struct Pass;
-
-impl LintPass for Pass {
-    fn get_lints(&self) -> LintArray {
-        lint_array!(TEST_LINT)
-    }
-}
-
-impl EarlyLintPass for Pass {
-    fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
-        if it.ident.name.as_str() == "lintme" {
-            cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
-        }
-    }
-}
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_early_lint_pass(box Pass as EarlyLintPassObject);
-}
diff --git a/src/test/auxiliary/lint_stability.rs b/src/test/auxiliary/lint_stability.rs
deleted file mode 100644
index 3100aba4b72..00000000000
--- a/src/test/auxiliary/lint_stability.rs
+++ /dev/null
@@ -1,179 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-#![crate_name="lint_stability"]
-#![crate_type = "lib"]
-#![feature(staged_api)]
-#![stable(feature = "lint_stability", since = "1.0.0")]
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated() {}
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated_text() {}
-
-#[unstable(feature = "test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated_unstable() {}
-#[unstable(feature = "test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub fn deprecated_unstable_text() {}
-
-#[unstable(feature = "test_feature", issue = "0")]
-pub fn unstable() {}
-#[unstable(feature = "test_feature", reason = "text", issue = "0")]
-pub fn unstable_text() {}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub fn stable() {}
-#[stable(feature = "rust1", since = "1.0.0")]
-pub fn stable_text() {}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct MethodTester;
-
-impl MethodTester {
-    #[stable(feature = "test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated(&self) {}
-    #[stable(feature = "test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated_text(&self) {}
-
-    #[unstable(feature = "test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated_unstable(&self) {}
-    #[unstable(feature = "test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    pub fn method_deprecated_unstable_text(&self) {}
-
-    #[unstable(feature = "test_feature", issue = "0")]
-    pub fn method_unstable(&self) {}
-    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
-    pub fn method_unstable_text(&self) {}
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn method_stable(&self) {}
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub fn method_stable_text(&self) {}
-}
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-pub trait Trait {
-    #[stable(feature = "test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated(&self) {}
-    #[stable(feature = "test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated_text(&self) {}
-
-    #[unstable(feature = "test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated_unstable(&self) {}
-    #[unstable(feature = "test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    fn trait_deprecated_unstable_text(&self) {}
-
-    #[unstable(feature = "test_feature", issue = "0")]
-    fn trait_unstable(&self) {}
-    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
-    fn trait_unstable_text(&self) {}
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn trait_stable(&self) {}
-    #[stable(feature = "rust1", since = "1.0.0")]
-    fn trait_stable_text(&self) {}
-}
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-impl Trait for MethodTester {}
-
-#[unstable(feature = "test_feature", issue = "0")]
-pub trait UnstableTrait { fn dummy(&self) { } }
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub trait DeprecatedTrait {
-    #[stable(feature = "test_feature", since = "1.0.0")] fn dummy(&self) { }
-}
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
-}
-#[unstable(feature = "test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnstableStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
-}
-#[unstable(feature = "test_feature", issue = "0")]
-pub struct UnstableStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
-}
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct StableStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
-}
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnitStruct;
-#[unstable(feature = "test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnstableUnitStruct;
-#[unstable(feature = "test_feature", issue = "0")]
-pub struct UnstableUnitStruct;
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct StableUnitStruct;
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-pub enum Enum {
-    #[stable(feature = "test_feature", since = "1.0.0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    DeprecatedVariant,
-    #[unstable(feature = "test_feature", issue = "0")]
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    DeprecatedUnstableVariant,
-    #[unstable(feature = "test_feature", issue = "0")]
-    UnstableVariant,
-
-    #[stable(feature = "rust1", since = "1.0.0")]
-    StableVariant,
-}
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[unstable(feature = "test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[unstable(feature = "test_feature", issue = "0")]
-pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[macro_export]
-macro_rules! macro_test {
-    () => (deprecated());
-}
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[macro_export]
-macro_rules! macro_test_arg {
-    ($func:expr) => ($func);
-}
-
-#[stable(feature = "test_feature", since = "1.0.0")]
-#[macro_export]
-macro_rules! macro_test_arg_nested {
-    ($func:ident) => (macro_test_arg!($func()));
-}
diff --git a/src/test/auxiliary/lint_stability_fields.rs b/src/test/auxiliary/lint_stability_fields.rs
deleted file mode 100644
index 8c6b98ab510..00000000000
--- a/src/test/auxiliary/lint_stability_fields.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(staged_api)]
-#![stable(feature = "rust1", since = "1.0.0")]
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct Stable {
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub inherit: u8, // it's a lie (stable doesn't inherit)
-    #[unstable(feature = "test_feature", issue = "0")]
-    pub override1: u8,
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    #[unstable(feature = "test_feature", issue = "0")]
-    pub override2: u8,
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-pub struct Stable2(#[stable(feature = "rust1", since = "1.0.0")] pub u8,
-                   #[unstable(feature = "test_feature", issue = "0")] pub u8,
-                   #[unstable(feature = "test_feature", issue = "0")]
-                   #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
-
-#[unstable(feature = "test_feature", issue = "0")]
-pub struct Unstable {
-    pub inherit: u8,
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub override1: u8,
-    #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    #[unstable(feature = "test_feature", issue = "0")]
-    pub override2: u8,
-}
-
-#[unstable(feature = "test_feature", issue = "0")]
-pub struct Unstable2(pub u8,
-                     #[stable(feature = "rust1", since = "1.0.0")] pub u8,
-                     #[unstable(feature = "test_feature", issue = "0")]
-                     #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
-
-#[unstable(feature = "test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct Deprecated {
-    pub inherit: u8,
-    #[stable(feature = "rust1", since = "1.0.0")]
-    pub override1: u8,
-    #[unstable(feature = "test_feature", issue = "0")]
-    pub override2: u8,
-}
-
-#[unstable(feature = "test_feature", issue = "0")]
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
-pub struct Deprecated2(pub u8,
-                       #[stable(feature = "rust1", since = "1.0.0")] pub u8,
-                       #[unstable(feature = "test_feature", issue = "0")] pub u8);
diff --git a/src/test/auxiliary/lint_unused_extern_crate.rs b/src/test/auxiliary/lint_unused_extern_crate.rs
deleted file mode 100644
index 2661b1f4eb4..00000000000
--- a/src/test/auxiliary/lint_unused_extern_crate.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub fn foo() {}
diff --git a/src/test/auxiliary/llvm_pass_plugin.rs b/src/test/auxiliary/llvm_pass_plugin.rs
deleted file mode 100644
index 59cfdd1e04a..00000000000
--- a/src/test/auxiliary/llvm_pass_plugin.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(rustc_private)]
-
-extern crate rustc;
-extern crate rustc_plugin;
-
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    // This pass is built in to LLVM.
-    //
-    // Normally, we would name a pass that was registered through
-    // C++ static object constructors in the same .so file as the
-    // plugin registrar.
-    reg.register_llvm_pass("gvn");
-}
diff --git a/src/test/auxiliary/logging_right_crate.rs b/src/test/auxiliary/logging_right_crate.rs
deleted file mode 100644
index db26b10fc67..00000000000
--- a/src/test/auxiliary/logging_right_crate.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(rustc_private)]
-
-#[macro_use] extern crate log;
-
-pub fn foo<T>() {
-    fn death() -> isize { panic!() }
-    debug!("{}", (||{ death() })());
-}
diff --git a/src/test/auxiliary/lto-syntax-extension-lib.rs b/src/test/auxiliary/lto-syntax-extension-lib.rs
deleted file mode 100644
index 78c03bac33f..00000000000
--- a/src/test/auxiliary/lto-syntax-extension-lib.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-
-pub fn foo() {}
diff --git a/src/test/auxiliary/lto-syntax-extension-plugin.rs b/src/test/auxiliary/lto-syntax-extension-plugin.rs
deleted file mode 100644
index 9cf0d756f40..00000000000
--- a/src/test/auxiliary/lto-syntax-extension-plugin.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(rustc_private)]
-
-extern crate rustc;
-extern crate rustc_plugin;
-
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(_reg: &mut Registry) {}
diff --git a/src/test/auxiliary/macro_crate_MacroRulesTT.rs b/src/test/auxiliary/macro_crate_MacroRulesTT.rs
deleted file mode 100644
index 9e693fcc564..00000000000
--- a/src/test/auxiliary/macro_crate_MacroRulesTT.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar, rustc_private)]
-
-extern crate syntax;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::parse::token;
-use syntax::ext::base::MacroRulesTT;
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_syntax_extension(token::intern("bogus"), MacroRulesTT);
-}
diff --git a/src/test/auxiliary/macro_crate_def_only.rs b/src/test/auxiliary/macro_crate_def_only.rs
deleted file mode 100644
index 4f55ac4f65f..00000000000
--- a/src/test/auxiliary/macro_crate_def_only.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[macro_export]
-macro_rules! make_a_5 {
-    () => (5)
-}
diff --git a/src/test/auxiliary/macro_crate_nonterminal.rs b/src/test/auxiliary/macro_crate_nonterminal.rs
deleted file mode 100644
index 4f75e2b5d75..00000000000
--- a/src/test/auxiliary/macro_crate_nonterminal.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub fn increment(x: usize) -> usize {
-    x + 1
-}
-
-#[macro_export]
-macro_rules! increment {
-    ($x:expr) => ($crate::increment($x))
-}
-
-pub fn check_local() {
-    assert_eq!(increment!(3), 4);
-}
diff --git a/src/test/auxiliary/macro_crate_test.rs b/src/test/auxiliary/macro_crate_test.rs
deleted file mode 100644
index 3516f566e8a..00000000000
--- a/src/test/auxiliary/macro_crate_test.rs
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar, quote, rustc_private)]
-
-extern crate syntax;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::ast::{self, TokenTree, Item, MetaItem, ImplItem, TraitItem, ItemKind};
-use syntax::codemap::Span;
-use syntax::ext::base::*;
-use syntax::parse::{self, token};
-use syntax::ptr::P;
-use rustc_plugin::Registry;
-
-#[macro_export]
-macro_rules! exported_macro { () => (2) }
-macro_rules! unexported_macro { () => (3) }
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_macro("make_a_1", expand_make_a_1);
-    reg.register_macro("identity", expand_identity);
-    reg.register_syntax_extension(
-        token::intern("into_multi_foo"),
-        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
-        MultiModifier(Box::new(expand_into_foo_multi)));
-    reg.register_syntax_extension(
-        token::intern("duplicate"),
-        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
-        MultiDecorator(Box::new(expand_duplicate)));
-}
-
-fn expand_make_a_1(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
-                   -> Box<MacResult+'static> {
-    if !tts.is_empty() {
-        cx.span_fatal(sp, "make_a_1 takes no arguments");
-    }
-    MacEager::expr(quote_expr!(cx, 1))
-}
-
-// See Issue #15750
-fn expand_identity(cx: &mut ExtCtxt, _span: Span, tts: &[TokenTree])
-                   -> Box<MacResult+'static> {
-    // Parse an expression and emit it unchanged.
-    let mut parser = parse::new_parser_from_tts(cx.parse_sess(),
-        cx.cfg(), tts.to_vec());
-    let expr = parser.parse_expr().unwrap();
-    MacEager::expr(quote_expr!(&mut *cx, $expr))
-}
-
-fn expand_into_foo_multi(cx: &mut ExtCtxt,
-                         sp: Span,
-                         attr: &MetaItem,
-                         it: Annotatable) -> Annotatable {
-    match it {
-        Annotatable::Item(it) => {
-            Annotatable::Item(P(Item {
-                attrs: it.attrs.clone(),
-                ..(*quote_item!(cx, enum Foo2 { Bar2, Baz2 }).unwrap()).clone()
-            }))
-        }
-        Annotatable::ImplItem(it) => {
-            quote_item!(cx, impl X { fn foo(&self) -> i32 { 42 } }).unwrap().and_then(|i| {
-                match i.node {
-                    ItemKind::Impl(_, _, _, _, _, mut items) => {
-                        Annotatable::ImplItem(P(items.pop().expect("impl method not found")))
-                    }
-                    _ => unreachable!("impl parsed to something other than impl")
-                }
-            })
-        }
-        Annotatable::TraitItem(it) => {
-            quote_item!(cx, trait X { fn foo(&self) -> i32 { 0 } }).unwrap().and_then(|i| {
-                match i.node {
-                    ItemKind::Trait(_, _, _, mut items) => {
-                        Annotatable::TraitItem(P(items.pop().expect("trait method not found")))
-                    }
-                    _ => unreachable!("trait parsed to something other than trait")
-                }
-            })
-        }
-    }
-}
-
-// Create a duplicate of the annotatable, based on the MetaItem
-fn expand_duplicate(cx: &mut ExtCtxt,
-                    sp: Span,
-                    mi: &MetaItem,
-                    it: &Annotatable,
-                    push: &mut FnMut(Annotatable))
-{
-    let copy_name = match mi.node {
-        ast::MetaItemKind::List(_, ref xs) => {
-            if let ast::MetaItemKind::Word(ref w) = xs[0].node {
-                token::str_to_ident(&w)
-            } else {
-                cx.span_err(mi.span, "Expected word");
-                return;
-            }
-        }
-        _ => {
-            cx.span_err(mi.span, "Expected list");
-            return;
-        }
-    };
-
-    // Duplicate the item but replace its ident by the MetaItem
-    match it.clone() {
-        Annotatable::Item(it) => {
-            let mut new_it = (*it).clone();
-            new_it.attrs.clear();
-            new_it.ident = copy_name;
-            push(Annotatable::Item(P(new_it)));
-        }
-        Annotatable::ImplItem(it) => {
-            let mut new_it = (*it).clone();
-            new_it.attrs.clear();
-            new_it.ident = copy_name;
-            push(Annotatable::ImplItem(P(new_it)));
-        }
-        Annotatable::TraitItem(tt) => {
-            let mut new_it = (*tt).clone();
-            new_it.attrs.clear();
-            new_it.ident = copy_name;
-            push(Annotatable::TraitItem(P(new_it)));
-        }
-    }
-}
-
-pub fn foo() {}
diff --git a/src/test/auxiliary/macro_export_inner_module.rs b/src/test/auxiliary/macro_export_inner_module.rs
deleted file mode 100644
index 84e944f69b9..00000000000
--- a/src/test/auxiliary/macro_export_inner_module.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod inner {
-    #[macro_export]
-    macro_rules! foo {
-        () => (1)
-    }
-}
diff --git a/src/test/auxiliary/macro_non_reexport_2.rs b/src/test/auxiliary/macro_non_reexport_2.rs
deleted file mode 100644
index 910fcd2e367..00000000000
--- a/src/test/auxiliary/macro_non_reexport_2.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "dylib"]
-
-// Since we load a serialized macro with all its attributes, accidentally
-// re-exporting a `#[macro_export] macro_rules!` is something of a concern!
-//
-// We avoid it at the moment only because of the order in which we do things.
-
-#[macro_use] #[no_link]
-extern crate macro_reexport_1;
diff --git a/src/test/auxiliary/macro_reexport_1.rs b/src/test/auxiliary/macro_reexport_1.rs
deleted file mode 100644
index aaeccc6e898..00000000000
--- a/src/test/auxiliary/macro_reexport_1.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "dylib"]
-#[macro_export]
-macro_rules! reexported {
-    () => ( 3 )
-}
diff --git a/src/test/auxiliary/macro_reexport_2.rs b/src/test/auxiliary/macro_reexport_2.rs
deleted file mode 100644
index 3918be88d86..00000000000
--- a/src/test/auxiliary/macro_reexport_2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "dylib"]
-#![feature(macro_reexport)]
-
-#[macro_reexport(reexported)]
-#[macro_use] #[no_link]
-extern crate macro_reexport_1;
diff --git a/src/test/auxiliary/macro_reexport_2_no_use.rs b/src/test/auxiliary/macro_reexport_2_no_use.rs
deleted file mode 100644
index 1d3dc26b0b4..00000000000
--- a/src/test/auxiliary/macro_reexport_2_no_use.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "dylib"]
-#![feature(macro_reexport)]
-
-#[macro_reexport(reexported)]
-#[no_link]
-extern crate macro_reexport_1;
diff --git a/src/test/auxiliary/macro_with_super_1.rs b/src/test/auxiliary/macro_with_super_1.rs
deleted file mode 100644
index fd2e52bb355..00000000000
--- a/src/test/auxiliary/macro_with_super_1.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-#[macro_export]
-macro_rules! declare {
-    () => (
-        pub fn aaa() {}
-
-        pub mod bbb {
-            use super::aaa;
-
-            pub fn ccc() {
-                aaa();
-            }
-        }
-    )
-}
diff --git a/src/test/auxiliary/method_self_arg1.rs b/src/test/auxiliary/method_self_arg1.rs
deleted file mode 100644
index 348b71faf0c..00000000000
--- a/src/test/auxiliary/method_self_arg1.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-#![allow(unknown_features)]
-#![feature(box_syntax)]
-
-static mut COUNT: u64 = 1;
-
-pub fn get_count() -> u64 { unsafe { COUNT } }
-
-#[derive(Copy, Clone)]
-pub struct Foo;
-
-impl Foo {
-    pub fn foo(self, x: &Foo) {
-        unsafe { COUNT *= 2; }
-        // Test internal call.
-        Foo::bar(&self);
-        Foo::bar(x);
-
-        Foo::baz(self);
-        Foo::baz(*x);
-
-        Foo::qux(box self);
-        Foo::qux(box *x);
-    }
-
-    pub fn bar(&self) {
-        unsafe { COUNT *= 3; }
-    }
-
-    pub fn baz(self) {
-        unsafe { COUNT *= 5; }
-    }
-
-    pub fn qux(self: Box<Foo>) {
-        unsafe { COUNT *= 7; }
-    }
-}
diff --git a/src/test/auxiliary/method_self_arg2.rs b/src/test/auxiliary/method_self_arg2.rs
deleted file mode 100644
index b67ec1b9bfc..00000000000
--- a/src/test/auxiliary/method_self_arg2.rs
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-#![allow(unknown_features)]
-#![feature(box_syntax)]
-
-static mut COUNT: u64 = 1;
-
-pub fn get_count() -> u64 { unsafe { COUNT } }
-
-#[derive(Copy, Clone)]
-pub struct Foo;
-
-impl Foo {
-    pub fn run_trait(self) {
-        unsafe { COUNT *= 17; }
-        // Test internal call.
-        Bar::foo1(&self);
-        Bar::foo2(self);
-        Bar::foo3(box self);
-
-        Bar::bar1(&self);
-        Bar::bar2(self);
-        Bar::bar3(box self);
-    }
-}
-
-pub trait Bar : Sized {
-    fn foo1(&self);
-    fn foo2(self);
-    fn foo3(self: Box<Self>);
-
-    fn bar1(&self) {
-        unsafe { COUNT *= 7; }
-    }
-    fn bar2(self) {
-        unsafe { COUNT *= 11; }
-    }
-    fn bar3(self: Box<Self>) {
-        unsafe { COUNT *= 13; }
-    }
-}
-
-impl Bar for Foo {
-    fn foo1(&self) {
-        unsafe { COUNT *= 2; }
-    }
-
-    fn foo2(self) {
-        unsafe { COUNT *= 3; }
-    }
-
-    fn foo3(self: Box<Foo>) {
-        unsafe { COUNT *= 5; }
-    }
-}
diff --git a/src/test/auxiliary/mir_external_refs.rs b/src/test/auxiliary/mir_external_refs.rs
deleted file mode 100644
index 4cad98004d7..00000000000
--- a/src/test/auxiliary/mir_external_refs.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub struct S(pub u8);
-
-impl S {
-    pub fn hey() -> u8 { 24 }
-}
-
-pub trait X {
-    fn hoy(&self) -> u8 { 25 }
-}
-
-impl X for S {}
-
-pub enum E {
-    U(u8)
-}
-
-pub fn regular_fn() -> u8 { 12 }
diff --git a/src/test/auxiliary/moves_based_on_type_lib.rs b/src/test/auxiliary/moves_based_on_type_lib.rs
deleted file mode 100644
index f95be3f4a1d..00000000000
--- a/src/test/auxiliary/moves_based_on_type_lib.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub struct S {
-    x: isize,
-}
-
-impl Drop for S {
-    fn drop(&mut self) {
-        println!("goodbye");
-    }
-}
-
-pub fn f() {
-    let x = S { x: 1 };
-    let y = x;
-    let _z = y;
-}
diff --git a/src/test/auxiliary/msvc-data-only-lib.rs b/src/test/auxiliary/msvc-data-only-lib.rs
deleted file mode 100644
index 71fb9a51948..00000000000
--- a/src/test/auxiliary/msvc-data-only-lib.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-
-pub static FOO: i32 = 42;
diff --git a/src/test/auxiliary/namespaced_enum_emulate_flat.rs b/src/test/auxiliary/namespaced_enum_emulate_flat.rs
deleted file mode 100644
index b7bde4a74a5..00000000000
--- a/src/test/auxiliary/namespaced_enum_emulate_flat.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use Foo::*;
-
-pub enum Foo {
-    A,
-    B(isize),
-    C { a: isize },
-}
-
-impl Foo {
-    pub fn foo() {}
-}
-
-pub mod nest {
-    pub use self::Bar::*;
-
-    pub enum Bar {
-        D,
-        E(isize),
-        F { a: isize },
-    }
-
-    impl Bar {
-        pub fn foo() {}
-    }
-}
diff --git a/src/test/auxiliary/namespaced_enums.rs b/src/test/auxiliary/namespaced_enums.rs
deleted file mode 100644
index 3bf39b788db..00000000000
--- a/src/test/auxiliary/namespaced_enums.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub enum Foo {
-    A,
-    B(isize),
-    C { a: isize },
-}
-
-impl Foo {
-    pub fn foo() {}
-    pub fn bar(&self) {}
-}
diff --git a/src/test/auxiliary/needs_allocator.rs b/src/test/auxiliary/needs_allocator.rs
deleted file mode 100644
index 51003160427..00000000000
--- a/src/test/auxiliary/needs_allocator.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![feature(needs_allocator)]
-#![no_std]
-#![needs_allocator]
-#![crate_type = "rlib"]
diff --git a/src/test/auxiliary/nested_item.rs b/src/test/auxiliary/nested_item.rs
deleted file mode 100644
index 63639c4cdb3..00000000000
--- a/src/test/auxiliary/nested_item.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// original problem
-pub fn foo<T>() -> isize {
-    {
-        static foo: isize = 2;
-        foo
-    }
-}
-
-// issue 8134
-struct Foo;
-impl Foo {
-    pub fn foo<T>(&self) {
-        static X: usize = 1;
-    }
-}
-
-// issue 8134
-pub struct Parser<T>(T);
-impl<T: std::iter::Iterator<Item=char>> Parser<T> {
-    fn in_doctype(&mut self) {
-        static DOCTYPEPattern: [char; 6] = ['O', 'C', 'T', 'Y', 'P', 'E'];
-    }
-}
-
-struct Bar;
-impl Foo {
-    pub fn bar<T>(&self) {
-        static X: usize = 1;
-    }
-}
diff --git a/src/test/auxiliary/newtype_struct_xc.rs b/src/test/auxiliary/newtype_struct_xc.rs
deleted file mode 100644
index be3414b7ad2..00000000000
--- a/src/test/auxiliary/newtype_struct_xc.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub struct Au(pub isize);
diff --git a/src/test/auxiliary/no_method_suggested_traits.rs b/src/test/auxiliary/no_method_suggested_traits.rs
deleted file mode 100644
index 20cebb9be17..00000000000
--- a/src/test/auxiliary/no_method_suggested_traits.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use reexport::Reexported;
-
-pub struct Foo;
-pub enum Bar { X }
-
-pub mod foo {
-    pub trait PubPub {
-        fn method(&self) {}
-
-        fn method3(&self) {}
-    }
-
-    impl PubPub for u32 {}
-    impl PubPub for i32 {}
-}
-pub mod bar {
-    trait PubPriv {
-        fn method(&self);
-    }
-}
-mod qux {
-    pub trait PrivPub {
-        fn method(&self);
-    }
-}
-mod quz {
-    trait PrivPriv {
-        fn method(&self);
-    }
-}
-
-mod reexport {
-    pub trait Reexported {
-        fn method(&self);
-    }
-}
diff --git a/src/test/auxiliary/no_std_crate.rs b/src/test/auxiliary/no_std_crate.rs
deleted file mode 100644
index 7cfae6d121d..00000000000
--- a/src/test/auxiliary/no_std_crate.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![no_std]
-
-pub fn foo() {}
diff --git a/src/test/auxiliary/noexporttypelib.rs b/src/test/auxiliary/noexporttypelib.rs
deleted file mode 100644
index 5ae8e0d298e..00000000000
--- a/src/test/auxiliary/noexporttypelib.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub type oint = Option<isize>;
-pub fn foo() -> oint { Some(3) }
diff --git a/src/test/auxiliary/orphan_check_diagnostics.rs b/src/test/auxiliary/orphan_check_diagnostics.rs
deleted file mode 100644
index cf3e9903b5a..00000000000
--- a/src/test/auxiliary/orphan_check_diagnostics.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait RemoteTrait { fn dummy(&self) { } }
diff --git a/src/test/auxiliary/overloaded_autoderef_xc.rs b/src/test/auxiliary/overloaded_autoderef_xc.rs
deleted file mode 100644
index 3c8cba13ae7..00000000000
--- a/src/test/auxiliary/overloaded_autoderef_xc.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::ops::Deref;
-
-struct DerefWithHelper<H, T> {
-    pub helper: H,
-    pub value: Option<T>
-}
-
-trait Helper<T> {
-    fn helper_borrow(&self) -> &T;
-}
-
-impl<T> Helper<T> for Option<T> {
-    fn helper_borrow(&self) -> &T {
-        self.as_ref().unwrap()
-    }
-}
-
-impl<T, H: Helper<T>> Deref for DerefWithHelper<H, T> {
-    type Target = T;
-
-    fn deref(&self) -> &T {
-        self.helper.helper_borrow()
-    }
-}
-
-// Test cross-crate autoderef + vtable.
-pub fn check<T: PartialEq>(x: T, y: T) -> bool {
-    let d: DerefWithHelper<Option<T>, T> = DerefWithHelper { helper: Some(x), value: None };
-    d.eq(&y)
-}
diff --git a/src/test/auxiliary/packed.rs b/src/test/auxiliary/packed.rs
deleted file mode 100644
index 86f5f93e3cf..00000000000
--- a/src/test/auxiliary/packed.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[repr(packed)]
-pub struct S {
-    a: u8,
-    b: u32
-}
diff --git a/src/test/auxiliary/plugin_args.rs b/src/test/auxiliary/plugin_args.rs
deleted file mode 100644
index f6e80266a15..00000000000
--- a/src/test/auxiliary/plugin_args.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(box_syntax, rustc_private)]
-
-extern crate syntax;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use std::borrow::ToOwned;
-use syntax::ast;
-use syntax::codemap::Span;
-use syntax::ext::build::AstBuilder;
-use syntax::ext::base::{TTMacroExpander, ExtCtxt, MacResult, MacEager, NormalTT};
-use syntax::parse::token;
-use syntax::print::pprust;
-use syntax::ptr::P;
-use rustc_plugin::Registry;
-
-struct Expander {
-    args: Vec<P<ast::MetaItem>>,
-}
-
-impl TTMacroExpander for Expander {
-    fn expand<'cx>(&self,
-                   ecx: &'cx mut ExtCtxt,
-                   sp: Span,
-                   _: &[ast::TokenTree]) -> Box<MacResult+'cx> {
-        let args = self.args.iter().map(|i| pprust::meta_item_to_string(&*i))
-            .collect::<Vec<_>>().join(", ");
-        let interned = token::intern_and_get_ident(&args[..]);
-        MacEager::expr(ecx.expr_str(sp, interned))
-    }
-}
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    let args = reg.args().clone();
-    reg.register_syntax_extension(token::intern("plugin_args"),
-        // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
-        NormalTT(Box::new(Expander { args: args, }), None, false));
-}
diff --git a/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs b/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs
deleted file mode 100644
index f56983c14b1..00000000000
--- a/src/test/auxiliary/plugin_crate_outlive_expansion_phase.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar)]
-#![feature(box_syntax, rustc_private)]
-
-extern crate rustc;
-extern crate rustc_plugin;
-
-use std::any::Any;
-use std::cell::RefCell;
-use rustc_plugin::Registry;
-
-struct Foo {
-    foo: isize
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {}
-}
-
-#[plugin_registrar]
-pub fn registrar(_: &mut Registry) {
-    thread_local!(static FOO: RefCell<Option<Box<Any+Send>>> = RefCell::new(None));
-    FOO.with(|s| *s.borrow_mut() = Some(box Foo { foo: 10 } as Box<Any+Send>));
-}
diff --git a/src/test/auxiliary/plugin_with_plugin_lib.rs b/src/test/auxiliary/plugin_with_plugin_lib.rs
deleted file mode 100644
index 8b5ff7cf07c..00000000000
--- a/src/test/auxiliary/plugin_with_plugin_lib.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![feature(plugin_registrar, rustc_private)]
-#![deny(plugin_as_library)] // should have no effect in a plugin crate
-
-extern crate macro_crate_test;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(_: &mut Registry) { }
diff --git a/src/test/auxiliary/priv-impl-prim-ty.rs b/src/test/auxiliary/priv-impl-prim-ty.rs
deleted file mode 100644
index 19cdede5518..00000000000
--- a/src/test/auxiliary/priv-impl-prim-ty.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait A {
-    fn frob(&self);
-}
-
-impl A for isize { fn frob(&self) {} }
-
-pub fn frob<T:A>(t: T) {
-    t.frob();
-}
diff --git a/src/test/auxiliary/privacy_reexport.rs b/src/test/auxiliary/privacy_reexport.rs
deleted file mode 100644
index fd97f210a55..00000000000
--- a/src/test/auxiliary/privacy_reexport.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub extern crate core;
-pub use foo as bar;
-
-pub mod foo {
-    pub fn frob() {}
-}
diff --git a/src/test/auxiliary/privacy_tuple_struct.rs b/src/test/auxiliary/privacy_tuple_struct.rs
deleted file mode 100644
index 141b6bdd604..00000000000
--- a/src/test/auxiliary/privacy_tuple_struct.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct A(());
-pub struct B(isize);
-pub struct C(pub isize, isize);
-pub struct D(pub isize);
diff --git a/src/test/auxiliary/private_trait_xc.rs b/src/test/auxiliary/private_trait_xc.rs
deleted file mode 100644
index 37ee10c8d37..00000000000
--- a/src/test/auxiliary/private_trait_xc.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-trait Foo {}
diff --git a/src/test/auxiliary/procedural_mbe_matching.rs b/src/test/auxiliary/procedural_mbe_matching.rs
deleted file mode 100644
index 713a7d1e811..00000000000
--- a/src/test/auxiliary/procedural_mbe_matching.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![crate_type="dylib"]
-#![feature(plugin_registrar, quote, rustc_private)]
-
-extern crate syntax;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::codemap::Span;
-use syntax::parse::token::{self, str_to_ident, NtExpr, NtPat};
-use syntax::ast::{TokenTree, Pat};
-use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
-use syntax::ext::build::AstBuilder;
-use syntax::ext::tt::macro_parser::{MatchedSeq, MatchedNonterminal};
-use syntax::ext::tt::macro_parser::{Success, Failure, Error};
-use syntax::ptr::P;
-use rustc_plugin::Registry;
-
-fn expand_mbe_matches(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
-        -> Box<MacResult + 'static> {
-
-    let mbe_matcher = quote_matcher!(cx, $matched:expr, $($pat:pat)|+);
-
-    let mac_expr = match TokenTree::parse(cx, &mbe_matcher[..], args) {
-        Success(map) => {
-            match (&*map[&str_to_ident("matched").name], &*map[&str_to_ident("pat").name]) {
-                (&MatchedNonterminal(NtExpr(ref matched_expr)),
-                 &MatchedSeq(ref pats, seq_sp)) => {
-                    let pats: Vec<P<Pat>> = pats.iter().map(|pat_nt|
-                        if let &MatchedNonterminal(NtPat(ref pat)) = &**pat_nt {
-                            pat.clone()
-                        } else {
-                            unreachable!()
-                        }
-                    ).collect();
-                    let arm = cx.arm(seq_sp, pats, cx.expr_bool(seq_sp, true));
-
-                    quote_expr!(cx,
-                        match $matched_expr {
-                            $arm
-                            _ => false
-                        }
-                    )
-                }
-                _ => unreachable!()
-            }
-        }
-        Failure(_, s) | Error(_, s) => {
-            panic!("expected Success, but got Error/Failure: {}", s);
-        }
-    };
-
-    MacEager::expr(mac_expr)
-}
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_macro("matches", expand_mbe_matches);
-}
diff --git a/src/test/auxiliary/pub_restricted.rs b/src/test/auxiliary/pub_restricted.rs
deleted file mode 100644
index b1c88ce6ce5..00000000000
--- a/src/test/auxiliary/pub_restricted.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(pub_restricted)]
-
-pub(crate) struct Crate;
-#[derive(Default)]
-pub struct Universe {
-    pub x: i32,
-    pub(crate) y: i32
-}
-
-impl Universe {
-    pub fn f(&self) {}
-    pub(crate) fn g(&self) {}
-}
diff --git a/src/test/auxiliary/pub_static_array.rs b/src/test/auxiliary/pub_static_array.rs
deleted file mode 100644
index 4419a5ae83c..00000000000
--- a/src/test/auxiliary/pub_static_array.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub static ARRAY: &'static [u8] = &[1];
diff --git a/src/test/auxiliary/pub_use_mods_xcrate.rs b/src/test/auxiliary/pub_use_mods_xcrate.rs
deleted file mode 100644
index e4890f4fe2d..00000000000
--- a/src/test/auxiliary/pub_use_mods_xcrate.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod a {
-    pub use a::b::c;
-
-    pub mod b {
-        pub mod c {
-            fn f(){}
-            fn g(){}
-        }
-    }
-}
diff --git a/src/test/auxiliary/pub_use_xcrate1.rs b/src/test/auxiliary/pub_use_xcrate1.rs
deleted file mode 100644
index 41aafd64cb3..00000000000
--- a/src/test/auxiliary/pub_use_xcrate1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo {
-    pub name: isize
-}
diff --git a/src/test/auxiliary/pub_use_xcrate2.rs b/src/test/auxiliary/pub_use_xcrate2.rs
deleted file mode 100644
index d59d7f2a613..00000000000
--- a/src/test/auxiliary/pub_use_xcrate2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate pub_use_xcrate1;
-
-pub use pub_use_xcrate1::Foo;
diff --git a/src/test/auxiliary/rbmtp_cross_crate_lib.rs b/src/test/auxiliary/rbmtp_cross_crate_lib.rs
deleted file mode 100644
index f49ac4fc8e4..00000000000
--- a/src/test/auxiliary/rbmtp_cross_crate_lib.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Check that method bounds declared on traits/impls in a cross-crate
-// scenario work. This is the library portion of the test.
-
-pub enum MaybeOwned<'a> {
-    Owned(isize),
-    Borrowed(&'a isize)
-}
-
-pub struct Inv<'a> { // invariant w/r/t 'a
-    x: &'a mut &'a isize
-}
-
-// I encountered a bug at some point with encoding the IntoMaybeOwned
-// trait, so I'll use that as the template for this test.
-pub trait IntoMaybeOwned<'a> {
-    fn into_maybe_owned(self) -> MaybeOwned<'a>;
-
-    // Note: without this `into_inv` method, the trait is
-    // contravariant w/r/t `'a`, since if you look strictly at the
-    // interface, it only returns `'a`. This complicates the
-    // downstream test since it wants invariance to force an error.
-    // Hence we add this method.
-    fn into_inv(self) -> Inv<'a>;
-
-    fn bigger_region<'b:'a>(self, b: Inv<'b>);
-}
-
-impl<'a> IntoMaybeOwned<'a> for Inv<'a> {
-    fn into_maybe_owned(self) -> MaybeOwned<'a> { panic!() }
-    fn into_inv(self) -> Inv<'a> { panic!() }
-    fn bigger_region<'b:'a>(self, b: Inv<'b>) { panic!() }
-}
diff --git a/src/test/auxiliary/reachable-unnameable-items.rs b/src/test/auxiliary/reachable-unnameable-items.rs
deleted file mode 100644
index 7ec2bb9394c..00000000000
--- a/src/test/auxiliary/reachable-unnameable-items.rs
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use inner_private_module::*;
-
-mod inner_private_module {
-    pub struct Unnameable1;
-    pub struct Unnameable2;
-    #[derive(Clone, Copy)]
-    pub struct Unnameable3;
-    pub struct Unnameable4;
-    pub struct Unnameable5;
-    pub struct Unnameable6;
-    pub struct Unnameable7;
-    #[derive(Default)]
-    pub struct Unnameable8;
-    pub enum UnnameableEnum {
-        NameableVariant
-    }
-    pub trait UnnameableTrait {
-        type Alias: Default;
-    }
-
-    impl Unnameable1 {
-        pub fn method_of_unnameable_type1(&self) -> &'static str {
-            "Hello1"
-        }
-    }
-    impl Unnameable2 {
-        pub fn method_of_unnameable_type2(&self) -> &'static str {
-            "Hello2"
-        }
-    }
-    impl Unnameable3 {
-        pub fn method_of_unnameable_type3(&self) -> &'static str {
-            "Hello3"
-        }
-    }
-    impl Unnameable4 {
-        pub fn method_of_unnameable_type4(&self) -> &'static str {
-            "Hello4"
-        }
-    }
-    impl Unnameable5 {
-        pub fn method_of_unnameable_type5(&self) -> &'static str {
-            "Hello5"
-        }
-    }
-    impl Unnameable6 {
-        pub fn method_of_unnameable_type6(&self) -> &'static str {
-            "Hello6"
-        }
-    }
-    impl Unnameable7 {
-        pub fn method_of_unnameable_type7(&self) -> &'static str {
-            "Hello7"
-        }
-    }
-    impl Unnameable8 {
-        pub fn method_of_unnameable_type8(&self) -> &'static str {
-            "Hello8"
-        }
-    }
-    impl UnnameableEnum {
-        pub fn method_of_unnameable_enum(&self) -> &'static str {
-            "HelloEnum"
-        }
-    }
-}
-
-pub fn function_returning_unnameable_type() -> Unnameable1 {
-    Unnameable1
-}
-
-pub const CONSTANT_OF_UNNAMEABLE_TYPE: Unnameable2 =
-                                            Unnameable2;
-
-pub fn function_accepting_unnameable_type(_: Option<Unnameable3>) {}
-
-pub type AliasOfUnnameableType = Unnameable4;
-
-impl Unnameable1 {
-    pub fn inherent_method_returning_unnameable_type(&self) -> Unnameable5 {
-        Unnameable5
-    }
-}
-
-pub trait Tr {
-    fn trait_method_returning_unnameable_type(&self) -> Unnameable6 {
-        Unnameable6
-    }
-}
-impl Tr for Unnameable1 {}
-
-pub use inner_private_module::UnnameableEnum::NameableVariant;
-
-pub struct Struct {
-    pub field_of_unnameable_type: Unnameable7
-}
-
-pub static STATIC: Struct = Struct { field_of_unnameable_type: Unnameable7 } ;
-
-impl UnnameableTrait for AliasOfUnnameableType {
-    type Alias = Unnameable8;
-}
-
-pub fn generic_function<T: UnnameableTrait>() -> T::Alias {
-    Default::default()
-}
diff --git a/src/test/auxiliary/reexp_stripped.rs b/src/test/auxiliary/reexp_stripped.rs
deleted file mode 100644
index 2b061e3997d..00000000000
--- a/src/test/auxiliary/reexp_stripped.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use private::Quz;
-pub use hidden::Bar;
-
-mod private {
-    pub struct Quz;
-}
-
-#[doc(hidden)]
-pub mod hidden {
-    pub struct Bar;
-}
diff --git a/src/test/auxiliary/reexport-should-still-link.rs b/src/test/auxiliary/reexport-should-still-link.rs
deleted file mode 100644
index 9d5464e6526..00000000000
--- a/src/test/auxiliary/reexport-should-still-link.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use foo::bar;
-
-mod foo {
-    pub fn bar() {}
-}
diff --git a/src/test/auxiliary/reexported_static_methods.rs b/src/test/auxiliary/reexported_static_methods.rs
deleted file mode 100644
index cc4db1a9581..00000000000
--- a/src/test/auxiliary/reexported_static_methods.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub use sub_foo::Foo;
-pub use self::Bar as Baz;
-pub use sub_foo::Boz;
-pub use sub_foo::Bort;
-
-pub trait Bar {
-    fn bar() -> Self;
-}
-
-impl Bar for isize {
-    fn bar() -> isize { 84 }
-}
-
-pub mod sub_foo {
-    pub trait Foo {
-        fn foo() -> Self;
-    }
-
-    impl Foo for isize {
-        fn foo() -> isize { 42 }
-    }
-
-    pub struct Boz {
-        unused_str: String
-    }
-
-    impl Boz {
-        pub fn boz(i: isize) -> bool {
-            i > 0
-        }
-    }
-
-    pub enum Bort {
-        Bort1,
-        Bort2
-    }
-
-    impl Bort {
-        pub fn bort() -> String {
-            "bort()".to_string()
-        }
-    }
-}
diff --git a/src/test/auxiliary/rlib_crate_test.rs b/src/test/auxiliary/rlib_crate_test.rs
deleted file mode 100644
index ae1568b2f88..00000000000
--- a/src/test/auxiliary/rlib_crate_test.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-#![feature(plugin_registrar, rustc_private)]
-
-extern crate rustc;
-extern crate rustc_plugin;
-
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(_: &mut Registry) {}
diff --git a/src/test/auxiliary/roman_numerals.rs b/src/test/auxiliary/roman_numerals.rs
deleted file mode 100644
index 839ece49c3e..00000000000
--- a/src/test/auxiliary/roman_numerals.rs
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![crate_type="dylib"]
-#![feature(plugin_registrar, rustc_private)]
-#![feature(slice_patterns)]
-
-extern crate syntax;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::codemap::Span;
-use syntax::ast::TokenTree;
-use syntax::parse::token;
-use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
-use syntax::ext::build::AstBuilder;  // trait for expr_usize
-use rustc_plugin::Registry;
-
-// WARNING WARNING WARNING WARNING WARNING
-// =======================================
-//
-// This code also appears in src/doc/guide-plugin.md. Please keep
-// the two copies in sync!  FIXME: have rustdoc read this file
-
-fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
-        -> Box<MacResult + 'static> {
-
-    static NUMERALS: &'static [(&'static str, usize)] = &[
-        ("M", 1000), ("CM", 900), ("D", 500), ("CD", 400),
-        ("C",  100), ("XC",  90), ("L",  50), ("XL",  40),
-        ("X",   10), ("IX",   9), ("V",   5), ("IV",   4),
-        ("I",    1)];
-
-    if args.len() != 1 {
-        cx.span_err(
-            sp,
-            &format!("argument should be a single identifier, but got {} arguments", args.len()));
-        return DummyResult::any(sp);
-    }
-
-    let text = match args[0] {
-        TokenTree::Token(_, token::Ident(s)) => s.to_string(),
-        _ => {
-            cx.span_err(sp, "argument should be a single identifier");
-            return DummyResult::any(sp);
-        }
-    };
-
-    let mut text = &*text;
-    let mut total = 0;
-    while !text.is_empty() {
-        match NUMERALS.iter().find(|&&(rn, _)| text.starts_with(rn)) {
-            Some(&(rn, val)) => {
-                total += val;
-                text = &text[rn.len()..];
-            }
-            None => {
-                cx.span_err(sp, "invalid Roman numeral");
-                return DummyResult::any(sp);
-            }
-        }
-    }
-
-    MacEager::expr(cx.expr_usize(sp, total))
-}
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_macro("rn", expand_rn);
-}
diff --git a/src/test/auxiliary/rustdoc-default-impl.rs b/src/test/auxiliary/rustdoc-default-impl.rs
deleted file mode 100644
index c2ff7a0054f..00000000000
--- a/src/test/auxiliary/rustdoc-default-impl.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(optin_builtin_traits)]
-#![feature(core)]
-
-pub mod bar {
-    use std::marker;
-
-    pub trait Bar: 'static {}
-
-    impl Bar for .. {}
-
-    pub trait Foo {
-        fn foo(&self) {}
-    }
-
-    impl Foo {
-        pub fn test<T: Bar>(&self) {}
-    }
-
-    pub struct TypeId;
-
-    impl TypeId {
-        pub fn of<T: Bar + ?Sized>() -> TypeId {
-            panic!()
-        }
-    }
-}
diff --git a/src/test/auxiliary/rustdoc-extern-default-method.rs b/src/test/auxiliary/rustdoc-extern-default-method.rs
deleted file mode 100644
index 861562753f9..00000000000
--- a/src/test/auxiliary/rustdoc-extern-default-method.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub trait Trait {
-    fn provided(&self) {}
-}
-
-pub struct Struct;
-
-impl Trait for Struct {
-    fn provided(&self) {}
-}
diff --git a/src/test/auxiliary/rustdoc-extern-method.rs b/src/test/auxiliary/rustdoc-extern-method.rs
deleted file mode 100644
index 96a7a8378b7..00000000000
--- a/src/test/auxiliary/rustdoc-extern-method.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-#![feature(unboxed_closures)]
-
-pub trait Foo {
-    extern "rust-call" fn foo(&self, _: ()) -> i32;
-    extern "rust-call" fn foo_(&self, _: ()) -> i32 { 0 }
-}
diff --git a/src/test/auxiliary/rustdoc-ffi.rs b/src/test/auxiliary/rustdoc-ffi.rs
deleted file mode 100644
index e06dbe76dbb..00000000000
--- a/src/test/auxiliary/rustdoc-ffi.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-extern "C" {
-    // @has lib/fn.foreigner.html //pre 'pub unsafe fn foreigner(cold_as_ice: u32)'
-    pub fn foreigner(cold_as_ice: u32);
-}
diff --git a/src/test/auxiliary/rustdoc-hidden-sig.rs b/src/test/auxiliary/rustdoc-hidden-sig.rs
deleted file mode 100644
index e2bc153ce0d..00000000000
--- a/src/test/auxiliary/rustdoc-hidden-sig.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Bar;
-
-impl Bar {
-    pub fn bar(_: u8) -> hidden::Hidden {
-        hidden::Hidden
-    }
-}
-
-#[doc(hidden)]
-pub mod hidden {
-    pub struct Hidden;
-}
diff --git a/src/test/auxiliary/rustdoc-impl-parts-crosscrate.rs b/src/test/auxiliary/rustdoc-impl-parts-crosscrate.rs
deleted file mode 100644
index 6e8f80c8f5f..00000000000
--- a/src/test/auxiliary/rustdoc-impl-parts-crosscrate.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(optin_builtin_traits)]
-
-pub trait AnOibit {}
-
-impl AnOibit for .. {}
diff --git a/src/test/auxiliary/rustdoc-nonreachable-impls.rs b/src/test/auxiliary/rustdoc-nonreachable-impls.rs
deleted file mode 100644
index 22a311d5797..00000000000
--- a/src/test/auxiliary/rustdoc-nonreachable-impls.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Foo;
-
-pub trait Woof {}
-pub trait Bark {}
-
-mod private {
-    // should be shown
-    impl ::Woof for ::Foo {}
-
-    pub trait Bar {}
-    pub struct Wibble;
-
-    // these should not be shown
-    impl Bar for ::Foo {}
-    impl Bar for Wibble {}
-    impl ::Bark for Wibble {}
-    impl ::Woof for Wibble {}
-}
-
-#[doc(hidden)]
-pub mod hidden {
-    // should be shown
-    impl ::Bark for ::Foo {}
-
-    pub trait Qux {}
-    pub struct Wobble;
-
-
-    // these should only be shown if they're reexported correctly
-    impl Qux for ::Foo {}
-    impl Qux for Wobble {}
-    impl ::Bark for Wobble {}
-    impl ::Woof for Wobble {}
-}
diff --git a/src/test/auxiliary/sepcomp-extern-lib.rs b/src/test/auxiliary/sepcomp-extern-lib.rs
deleted file mode 100644
index 72f1f73a81b..00000000000
--- a/src/test/auxiliary/sepcomp-extern-lib.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[no_mangle]
-pub extern "C" fn foo() -> usize {
-    1234
-}
diff --git a/src/test/auxiliary/sepcomp_cci_lib.rs b/src/test/auxiliary/sepcomp_cci_lib.rs
deleted file mode 100644
index c57d161d8f5..00000000000
--- a/src/test/auxiliary/sepcomp_cci_lib.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[inline]
-pub fn cci_fn() -> usize {
-    1200
-}
-
-pub const CCI_CONST: usize = 34;
diff --git a/src/test/auxiliary/sepcomp_lib.rs b/src/test/auxiliary/sepcomp_lib.rs
deleted file mode 100644
index 9aa16fb2694..00000000000
--- a/src/test/auxiliary/sepcomp_lib.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -C codegen-units=3 --crate-type=rlib,dylib
-
-pub mod a {
-    pub fn one() -> usize {
-        1
-    }
-}
-
-pub mod b {
-    pub fn two() -> usize {
-        2
-    }
-}
-
-pub mod c {
-    use a::one;
-    use b::two;
-    pub fn three() -> usize {
-        one() + two()
-    }
-}
diff --git a/src/test/auxiliary/specialization_cross_crate.rs b/src/test/auxiliary/specialization_cross_crate.rs
deleted file mode 100644
index 1d235336de8..00000000000
--- a/src/test/auxiliary/specialization_cross_crate.rs
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(specialization)]
-
-pub trait Foo {
-    fn foo(&self) -> &'static str;
-}
-
-impl<T> Foo for T {
-    default fn foo(&self) -> &'static str {
-        "generic"
-    }
-}
-
-impl<T: Clone> Foo for T {
-    default fn foo(&self) -> &'static str {
-        "generic Clone"
-    }
-}
-
-impl<T, U> Foo for (T, U) where T: Clone, U: Clone {
-    default fn foo(&self) -> &'static str {
-        "generic pair"
-    }
-}
-
-impl<T: Clone> Foo for (T, T) {
-    default fn foo(&self) -> &'static str {
-        "generic uniform pair"
-    }
-}
-
-impl Foo for (u8, u32) {
-    default fn foo(&self) -> &'static str {
-        "(u8, u32)"
-    }
-}
-
-impl Foo for (u8, u8) {
-    default fn foo(&self) -> &'static str {
-        "(u8, u8)"
-    }
-}
-
-impl<T: Clone> Foo for Vec<T> {
-    default fn foo(&self) -> &'static str {
-        "generic Vec"
-    }
-}
-
-impl Foo for Vec<i32> {
-    fn foo(&self) -> &'static str {
-        "Vec<i32>"
-    }
-}
-
-impl Foo for String {
-    fn foo(&self) -> &'static str {
-        "String"
-    }
-}
-
-impl Foo for i32 {
-    fn foo(&self) -> &'static str {
-        "i32"
-    }
-}
-
-pub trait MyMarker {}
-impl<T: Clone + MyMarker> Foo for T {
-    default fn foo(&self) -> &'static str {
-        "generic Clone + MyMarker"
-    }
-}
diff --git a/src/test/auxiliary/specialization_cross_crate_defaults.rs b/src/test/auxiliary/specialization_cross_crate_defaults.rs
deleted file mode 100644
index b62d80b589f..00000000000
--- a/src/test/auxiliary/specialization_cross_crate_defaults.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-#![feature(specialization)]
-
-// First, test only use of explicit `default` items:
-
-pub trait Foo {
-    fn foo(&self) -> bool;
-}
-
-impl<T> Foo for T {
-    default fn foo(&self) -> bool { false }
-}
-
-impl Foo for i32 {}
-
-impl Foo for i64 {
-    fn foo(&self) -> bool { true }
-}
-
-// Next, test mixture of explicit `default` and provided methods:
-
-pub trait Bar {
-    fn bar(&self) -> i32 { 0 }
-}
-
-impl<T> Bar for T {} // use the provided method
-
-impl Bar for i32 {
-    fn bar(&self) -> i32 { 1 }
-}
-impl<'a> Bar for &'a str {}
-
-impl<T> Bar for Vec<T> {
-    default fn bar(&self) -> i32 { 2 }
-}
-impl Bar for Vec<i32> {}
-impl Bar for Vec<i64> {
-    fn bar(&self) -> i32 { 3 }
-}
diff --git a/src/test/auxiliary/stability_attribute_issue.rs b/src/test/auxiliary/stability_attribute_issue.rs
deleted file mode 100644
index 22c13f69af9..00000000000
--- a/src/test/auxiliary/stability_attribute_issue.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(staged_api)]
-#![stable(feature = "foo", since = "1.2.0")]
-
-
-#[unstable(feature = "foo", issue = "1")]
-pub fn unstable() {}
-
-#[unstable(feature = "foo", reason = "message", issue = "2")]
-pub fn unstable_msg() {}
diff --git a/src/test/auxiliary/stability_cfg1.rs b/src/test/auxiliary/stability_cfg1.rs
deleted file mode 100644
index c839993b047..00000000000
--- a/src/test/auxiliary/stability_cfg1.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![cfg_attr(foo, experimental)]
-#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
-#![feature(staged_api)]
diff --git a/src/test/auxiliary/stability_cfg2.rs b/src/test/auxiliary/stability_cfg2.rs
deleted file mode 100644
index c1e2b1d1bfe..00000000000
--- a/src/test/auxiliary/stability_cfg2.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags:--cfg foo
-
-#![cfg_attr(foo, unstable(feature = "test_feature", issue = "0"))]
-#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
-#![feature(staged_api)]
diff --git a/src/test/auxiliary/static-function-pointer-aux.rs b/src/test/auxiliary/static-function-pointer-aux.rs
deleted file mode 100644
index 2ccdb4e0864..00000000000
--- a/src/test/auxiliary/static-function-pointer-aux.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub fn f(x: isize) -> isize { -x }
-
-pub static F: fn(isize) -> isize = f;
-pub static mut MutF: fn(isize) -> isize = f;
diff --git a/src/test/auxiliary/static-methods-crate.rs b/src/test/auxiliary/static-methods-crate.rs
deleted file mode 100644
index b8fd59bf703..00000000000
--- a/src/test/auxiliary/static-methods-crate.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="static_methods_crate"]
-#![crate_type = "lib"]
-
-pub trait read: Sized {
-    fn readMaybe(s: String) -> Option<Self>;
-}
-
-impl read for isize {
-    fn readMaybe(s: String) -> Option<isize> {
-        s.parse().ok()
-    }
-}
-
-impl read for bool {
-    fn readMaybe(s: String) -> Option<bool> {
-        match &*s {
-          "true" => Some(true),
-          "false" => Some(false),
-          _ => None
-        }
-    }
-}
-
-pub fn read<T:read>(s: String) -> T {
-    match read::readMaybe(s) {
-      Some(x) => x,
-      _ => panic!("read panicked!")
-    }
-}
diff --git a/src/test/auxiliary/static_fn_inline_xc_aux.rs b/src/test/auxiliary/static_fn_inline_xc_aux.rs
deleted file mode 100644
index 2193e12bceb..00000000000
--- a/src/test/auxiliary/static_fn_inline_xc_aux.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub mod num {
-    pub trait Num2 {
-        fn from_int2(n: isize) -> Self;
-    }
-}
-
-pub mod f64 {
-    impl ::num::Num2 for f64 {
-        #[inline]
-        fn from_int2(n: isize) -> f64 { return n as f64;  }
-    }
-}
diff --git a/src/test/auxiliary/static_fn_trait_xc_aux.rs b/src/test/auxiliary/static_fn_trait_xc_aux.rs
deleted file mode 100644
index 44e875fbe3c..00000000000
--- a/src/test/auxiliary/static_fn_trait_xc_aux.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub mod num {
-    pub trait Num2 {
-        fn from_int2(n: isize) -> Self;
-    }
-}
-
-pub mod f64 {
-    impl ::num::Num2 for f64 {
-        fn from_int2(n: isize) -> f64 { return n as f64;  }
-    }
-}
diff --git a/src/test/auxiliary/static_mut_xc.rs b/src/test/auxiliary/static_mut_xc.rs
deleted file mode 100644
index 9d677e3dc46..00000000000
--- a/src/test/auxiliary/static_mut_xc.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub static mut a: isize = 3;
diff --git a/src/test/auxiliary/static_priv_by_default.rs b/src/test/auxiliary/static_priv_by_default.rs
deleted file mode 100644
index 859f38e809f..00000000000
--- a/src/test/auxiliary/static_priv_by_default.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-static private: isize = 0;
-pub static public: isize = 0;
-
-pub struct A(());
-
-impl A {
-    fn foo() {}
-}
-
-mod foo {
-    pub static a: isize = 0;
-    pub fn b() {}
-    pub struct c;
-    pub enum d {}
-    pub type e = isize;
-
-    pub struct A(());
-
-    impl A {
-        fn foo() {}
-    }
-
-    // these are public so the parent can reexport them.
-    pub static reexported_a: isize = 0;
-    pub fn reexported_b() {}
-    pub struct reexported_c;
-    pub enum reexported_d {}
-    pub type reexported_e = isize;
-}
-
-pub mod bar {
-    pub use foo::reexported_a as e;
-    pub use foo::reexported_b as f;
-    pub use foo::reexported_c as g;
-    pub use foo::reexported_d as h;
-    pub use foo::reexported_e as i;
-}
-
-pub static a: isize = 0;
-pub fn b() {}
-pub struct c;
-pub enum d {}
-pub type e = isize;
-
-static j: isize = 0;
-fn k() {}
-struct l;
-enum m {}
-type n = isize;
diff --git a/src/test/auxiliary/struct_destructuring_cross_crate.rs b/src/test/auxiliary/struct_destructuring_cross_crate.rs
deleted file mode 100644
index 26941b726d4..00000000000
--- a/src/test/auxiliary/struct_destructuring_cross_crate.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub struct S {
-    pub x: isize,
-    pub y: isize,
-}
diff --git a/src/test/auxiliary/struct_field_privacy.rs b/src/test/auxiliary/struct_field_privacy.rs
deleted file mode 100644
index 5fea97da03e..00000000000
--- a/src/test/auxiliary/struct_field_privacy.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct A {
-    a: isize,
-    pub b: isize,
-}
-
-pub struct B {
-    pub a: isize,
-    b: isize,
-}
diff --git a/src/test/auxiliary/struct_variant_privacy.rs b/src/test/auxiliary/struct_variant_privacy.rs
deleted file mode 100644
index 40868fa3f70..00000000000
--- a/src/test/auxiliary/struct_variant_privacy.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-enum Bar {
-    Baz { a: isize }
-}
diff --git a/src/test/auxiliary/struct_variant_xc_aux.rs b/src/test/auxiliary/struct_variant_xc_aux.rs
deleted file mode 100644
index 201f028b6b6..00000000000
--- a/src/test/auxiliary/struct_variant_xc_aux.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="struct_variant_xc_aux"]
-#![crate_type = "lib"]
-
-#[derive(Copy, Clone)]
-pub enum Enum {
-    Variant(u8),
-    StructVariant { arg: u8 }
-}
diff --git a/src/test/auxiliary/svh-a-base.rs b/src/test/auxiliary/svh-a-base.rs
deleted file mode 100644
index 31a97f695f0..00000000000
--- a/src/test/auxiliary/svh-a-base.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: isize) -> isize {
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-change-lit.rs b/src/test/auxiliary/svh-a-change-lit.rs
deleted file mode 100644
index 5339fc8295c..00000000000
--- a/src/test/auxiliary/svh-a-change-lit.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: isize) -> isize {
-    0
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-change-significant-cfg.rs b/src/test/auxiliary/svh-a-change-significant-cfg.rs
deleted file mode 100644
index 2a5d9446f87..00000000000
--- a/src/test/auxiliary/svh-a-change-significant-cfg.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-#[cfg(some_flag)]
-pub fn foo<T:U>(_: isize) -> isize {
-    3
-}
-
-#[cfg(not(some_flag))]
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-change-trait-bound.rs b/src/test/auxiliary/svh-a-change-trait-bound.rs
deleted file mode 100644
index 61f2f2803ab..00000000000
--- a/src/test/auxiliary/svh-a-change-trait-bound.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:V>(_: isize) -> isize {
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-change-type-arg.rs b/src/test/auxiliary/svh-a-change-type-arg.rs
deleted file mode 100644
index 270ce95be2b..00000000000
--- a/src/test/auxiliary/svh-a-change-type-arg.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: i32) -> isize {
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-change-type-ret.rs b/src/test/auxiliary/svh-a-change-type-ret.rs
deleted file mode 100644
index de4cc85a7dc..00000000000
--- a/src/test/auxiliary/svh-a-change-type-ret.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: isize) -> i64 {
-    3
-}
-
-pub fn an_unused_name() -> i32 {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-change-type-static.rs b/src/test/auxiliary/svh-a-change-type-static.rs
deleted file mode 100644
index 62f7986f1c3..00000000000
--- a/src/test/auxiliary/svh-a-change-type-static.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-#![feature(core)]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : i32 = 2;
-
-pub fn foo<T:U>(_: isize) -> isize {
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-comment.rs b/src/test/auxiliary/svh-a-comment.rs
deleted file mode 100644
index 22e40822eec..00000000000
--- a/src/test/auxiliary/svh-a-comment.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: isize) -> isize {
-    // a comment does not affect the svh
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-doc.rs b/src/test/auxiliary/svh-a-doc.rs
deleted file mode 100644
index 3d8a728967a..00000000000
--- a/src/test/auxiliary/svh-a-doc.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-// Adding some documentation does not affect the svh.
-
-/// foo always returns three.
-pub fn foo<T:U>(_: isize) -> isize {
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-macro.rs b/src/test/auxiliary/svh-a-macro.rs
deleted file mode 100644
index 41d7eb7b186..00000000000
--- a/src/test/auxiliary/svh-a-macro.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: isize) -> isize {
-    // a macro invocation in a function body does not affect the svh,
-    // as long as it yields the same code.
-    three!()
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-no-change.rs b/src/test/auxiliary/svh-a-no-change.rs
deleted file mode 100644
index 31a97f695f0..00000000000
--- a/src/test/auxiliary/svh-a-no-change.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: isize) -> isize {
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-redundant-cfg.rs b/src/test/auxiliary/svh-a-redundant-cfg.rs
deleted file mode 100644
index e405c337abe..00000000000
--- a/src/test/auxiliary/svh-a-redundant-cfg.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-// cfg attribute does not affect the svh, as long as it yields the same code.
-#[cfg(not(an_unused_name))]
-pub fn foo<T:U>(_: isize) -> isize {
-    3
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-a-whitespace.rs b/src/test/auxiliary/svh-a-whitespace.rs
deleted file mode 100644
index 9ef788c9842..00000000000
--- a/src/test/auxiliary/svh-a-whitespace.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `svh-a-*.rs` files are all deviations from the base file
-//! svh-a-base.rs with some difference (usually in `fn foo`) that
-//! should not affect the strict version hash (SVH) computation
-//! (#14132).
-
-#![crate_name = "a"]
-
-macro_rules! three {
-    () => { 3 }
-}
-
-pub trait U {}
-pub trait V {}
-impl U for () {}
-impl V for () {}
-
-static A_CONSTANT : isize = 2;
-
-pub fn foo<T:U>(_: isize) -> isize {
-
-    3
-
-}
-
-pub fn an_unused_name() -> isize {
-    4
-}
diff --git a/src/test/auxiliary/svh-b.rs b/src/test/auxiliary/svh-b.rs
deleted file mode 100644
index b8946fdc995..00000000000
--- a/src/test/auxiliary/svh-b.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! This is a client of the `a` crate defined in "svn-a-base.rs".  The
-//! rpass and cfail tests (such as "run-pass/svh-add-comment.rs") use
-//! it by swapping in a different object code library crate built from
-//! some variant of "svn-a-base.rs", and then we are checking if the
-//! compiler properly ignores or accepts the change, based on whether
-//! the change could affect the downstream crate content or not
-//! (#14132).
-
-#![crate_name = "b"]
-
-extern crate a;
-
-pub fn foo() { assert_eq!(a::foo::<()>(0), 3); }
diff --git a/src/test/auxiliary/svh-uta-base.rs b/src/test/auxiliary/svh-uta-base.rs
deleted file mode 100644
index 6bd3ddab06c..00000000000
--- a/src/test/auxiliary/svh-uta-base.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! "compile-fail/svh-uta-trait.rs" is checking that we detect a
-//! change from `use foo::TraitB` to use `foo::TraitB` in the hash
-//! (SVH) computation (#14132), since that will affect method
-//! resolution.
-//!
-//! This is the upstream crate.
-
-#![crate_name = "uta"]
-
-mod traits {
-    pub trait TraitA { fn val(&self) -> isize { 2 } }
-    pub trait TraitB { fn val(&self) -> isize { 3 } }
-}
-
-impl traits::TraitA for () {}
-impl traits::TraitB for () {}
-
-pub fn foo<T>(_: isize) -> isize {
-    use traits::TraitA;
-    let v = ();
-    v.val()
-}
diff --git a/src/test/auxiliary/svh-uta-change-use-trait.rs b/src/test/auxiliary/svh-uta-change-use-trait.rs
deleted file mode 100644
index e8634168177..00000000000
--- a/src/test/auxiliary/svh-uta-change-use-trait.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! "compile-fail/svh-uta-trait.rs" is checking that we detect a
-//! change from `use foo::TraitB` to use `foo::TraitB` in the hash
-//! (SVH) computation (#14132), since that will affect method
-//! resolution.
-//!
-//! This is the upstream crate.
-
-#![crate_name = "uta"]
-
-mod traits {
-    pub trait TraitA { fn val(&self) -> isize { 2 } }
-    pub trait TraitB { fn val(&self) -> isize { 3 } }
-}
-
-impl traits::TraitA for () {}
-impl traits::TraitB for () {}
-
-pub fn foo<T>(_: isize) -> isize {
-    use traits::TraitB;
-    let v = ();
-    v.val()
-}
diff --git a/src/test/auxiliary/svh-utb.rs b/src/test/auxiliary/svh-utb.rs
deleted file mode 100644
index eb3da985242..00000000000
--- a/src/test/auxiliary/svh-utb.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! "compile-fail/svh-uta-trait.rs" is checking that we detect a
-//! change from `use foo::TraitB` to use `foo::TraitB` in the hash
-//! (SVH) computation (#14132), since that will affect method
-//! resolution.
-//!
-//! This is the downstream crate.
-
-#![crate_name = "utb"]
-
-extern crate uta;
-
-pub fn foo() { assert_eq!(uta::foo::<()>(0), 3); }
diff --git a/src/test/auxiliary/syntax_extension_with_dll_deps_1.rs b/src/test/auxiliary/syntax_extension_with_dll_deps_1.rs
deleted file mode 100644
index fadeb024405..00000000000
--- a/src/test/auxiliary/syntax_extension_with_dll_deps_1.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![crate_type = "dylib"]
-
-pub fn the_answer() -> isize {
-    2
-}
diff --git a/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs b/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs
deleted file mode 100644
index 7281698a7fb..00000000000
--- a/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// force-host
-
-#![crate_type = "dylib"]
-#![feature(plugin_registrar, quote, rustc_private)]
-
-extern crate syntax_extension_with_dll_deps_1 as other;
-extern crate syntax;
-extern crate rustc;
-extern crate rustc_plugin;
-
-use syntax::ast::{TokenTree, Item, MetaItem};
-use syntax::codemap::Span;
-use syntax::ext::base::*;
-use rustc_plugin::Registry;
-
-#[plugin_registrar]
-pub fn plugin_registrar(reg: &mut Registry) {
-    reg.register_macro("foo", expand_foo);
-}
-
-fn expand_foo(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
-              -> Box<MacResult+'static> {
-    let answer = other::the_answer();
-    MacEager::expr(quote_expr!(cx, $answer))
-}
diff --git a/src/test/auxiliary/tdticc_coherence_lib.rs b/src/test/auxiliary/tdticc_coherence_lib.rs
deleted file mode 100644
index 2e425ac96c5..00000000000
--- a/src/test/auxiliary/tdticc_coherence_lib.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(optin_builtin_traits, core)]
-#![crate_type = "rlib"]
-
-pub trait DefaultedTrait { }
-impl DefaultedTrait for .. { }
-
-pub struct Something<T> { t: T }
diff --git a/src/test/auxiliary/thread-local-extern-static.rs b/src/test/auxiliary/thread-local-extern-static.rs
deleted file mode 100644
index d1971a5e1ae..00000000000
--- a/src/test/auxiliary/thread-local-extern-static.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(thread_local)]
-#![feature(cfg_target_thread_local)]
-#![crate_type = "lib"]
-
-#[no_mangle]
-#[cfg_attr(target_thread_local, thread_local)]
-pub static FOO: u32 = 3;
diff --git a/src/test/auxiliary/trait_bounds_on_structs_and_enums_xc.rs b/src/test/auxiliary/trait_bounds_on_structs_and_enums_xc.rs
deleted file mode 100644
index 29cb0bc176a..00000000000
--- a/src/test/auxiliary/trait_bounds_on_structs_and_enums_xc.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Trait {
-    fn dummy(&self) { }
-}
-
-pub struct Foo<T:Trait> {
-    pub x: T,
-}
-
-pub enum Bar<T:Trait> {
-    ABar(isize),
-    BBar(T),
-    CBar(usize),
-}
diff --git a/src/test/auxiliary/trait_default_method_xc_aux.rs b/src/test/auxiliary/trait_default_method_xc_aux.rs
deleted file mode 100644
index c1168a912dc..00000000000
--- a/src/test/auxiliary/trait_default_method_xc_aux.rs
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct Something { pub x: isize }
-
-pub trait A {
-    fn f(&self) -> isize;
-    fn g(&self) -> isize { 10 }
-    fn h(&self) -> isize { 11 }
-    fn lurr(x: &Self, y: &Self) -> isize { x.g() + y.h() }
-}
-
-
-impl A for isize {
-    fn f(&self) -> isize { 10 }
-}
-
-impl A for Something {
-    fn f(&self) -> isize { 10 }
-}
-
-pub trait B<T> {
-    fn thing<U>(&self, x: T, y: U) -> (T, U) { (x, y) }
-    fn staticthing<U>(_z: &Self, x: T, y: U) -> (T, U) { (x, y) }
-}
-
-impl<T> B<T> for isize { }
-impl B<f64> for bool { }
-
-
-
-pub trait TestEquality {
-    fn test_eq(&self, rhs: &Self) -> bool;
-    fn test_neq(&self, rhs: &Self) -> bool {
-        !self.test_eq(rhs)
-    }
-}
-
-impl TestEquality for isize {
-    fn test_eq(&self, rhs: &isize) -> bool {
-        *self == *rhs
-    }
-}
diff --git a/src/test/auxiliary/trait_default_method_xc_aux_2.rs b/src/test/auxiliary/trait_default_method_xc_aux_2.rs
deleted file mode 100644
index 7443ef9c0f3..00000000000
--- a/src/test/auxiliary/trait_default_method_xc_aux_2.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// aux-build:trait_default_method_xc_aux.rs
-
-extern crate trait_default_method_xc_aux as aux;
-use aux::A;
-
-pub struct a_struct { pub x: isize }
-
-impl A for a_struct {
-    fn f(&self) -> isize { 10 }
-}
-
-// This function will need to get inlined, and badness may result.
-pub fn welp<A>(x: A) -> A {
-    let a = a_struct { x: 0 };
-    a.g();
-    x
-}
diff --git a/src/test/auxiliary/trait_impl_conflict.rs b/src/test/auxiliary/trait_impl_conflict.rs
deleted file mode 100644
index c3ecbb014dc..00000000000
--- a/src/test/auxiliary/trait_impl_conflict.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Foo {
-}
-
-impl Foo for isize {
-}
diff --git a/src/test/auxiliary/trait_inheritance_auto_xc_2_aux.rs b/src/test/auxiliary/trait_inheritance_auto_xc_2_aux.rs
deleted file mode 100644
index af0128d9676..00000000000
--- a/src/test/auxiliary/trait_inheritance_auto_xc_2_aux.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Foo { fn f(&self) -> isize; }
-pub trait Bar { fn g(&self) -> isize; }
-pub trait Baz { fn h(&self) -> isize; }
-
-pub struct A { pub x: isize }
-
-impl Foo for A { fn f(&self) -> isize { 10 } }
-impl Bar for A { fn g(&self) -> isize { 20 } }
-impl Baz for A { fn h(&self) -> isize { 30 } }
diff --git a/src/test/auxiliary/trait_inheritance_auto_xc_aux.rs b/src/test/auxiliary/trait_inheritance_auto_xc_aux.rs
deleted file mode 100644
index 6be1f8c45f4..00000000000
--- a/src/test/auxiliary/trait_inheritance_auto_xc_aux.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Foo { fn f(&self) -> isize; }
-pub trait Bar { fn g(&self) -> isize; }
-pub trait Baz { fn h(&self) -> isize; }
-
-pub trait Quux: Foo + Bar + Baz { }
-
-impl<T:Foo + Bar + Baz> Quux for T { }
diff --git a/src/test/auxiliary/trait_inheritance_cross_trait_call_xc_aux.rs b/src/test/auxiliary/trait_inheritance_cross_trait_call_xc_aux.rs
deleted file mode 100644
index 9eeb815c5de..00000000000
--- a/src/test/auxiliary/trait_inheritance_cross_trait_call_xc_aux.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-pub trait Foo {
-    fn f(&self) -> isize;
-}
-
-pub struct A {
-    pub x: isize
-}
-
-impl Foo for A {
-    fn f(&self) -> isize { 10 }
-}
diff --git a/src/test/auxiliary/trait_inheritance_overloading_xc.rs b/src/test/auxiliary/trait_inheritance_overloading_xc.rs
deleted file mode 100644
index 1bfada612eb..00000000000
--- a/src/test/auxiliary/trait_inheritance_overloading_xc.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::cmp::PartialEq;
-use std::ops::{Add, Sub, Mul};
-
-pub trait MyNum : Add<Output=Self> + Sub<Output=Self> + Mul<Output=Self> + PartialEq + Clone {
-}
-
-#[derive(Clone, Debug)]
-pub struct MyInt {
-    pub val: isize
-}
-
-impl Add for MyInt {
-    type Output = MyInt;
-
-    fn add(self, other: MyInt) -> MyInt { mi(self.val + other.val) }
-}
-
-impl Sub for MyInt {
-    type Output = MyInt;
-
-    fn sub(self, other: MyInt) -> MyInt { mi(self.val - other.val) }
-}
-
-impl Mul for MyInt {
-    type Output = MyInt;
-
-    fn mul(self, other: MyInt) -> MyInt { mi(self.val * other.val) }
-}
-
-impl PartialEq for MyInt {
-    fn eq(&self, other: &MyInt) -> bool { self.val == other.val }
-
-    fn ne(&self, other: &MyInt) -> bool { !self.eq(other) }
-}
-
-impl MyNum for MyInt {}
-
-fn mi(v: isize) -> MyInt { MyInt { val: v } }
diff --git a/src/test/auxiliary/trait_safety_lib.rs b/src/test/auxiliary/trait_safety_lib.rs
deleted file mode 100644
index 585a756fd07..00000000000
--- a/src/test/auxiliary/trait_safety_lib.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Simple smoke test that unsafe traits can be compiled etc.
-
-pub unsafe trait Foo {
-    fn foo(&self) -> isize;
-}
-
-unsafe impl Foo for isize {
-    fn foo(&self) -> isize { *self }
-}
diff --git a/src/test/auxiliary/trait_superkinds_in_metadata.rs b/src/test/auxiliary/trait_superkinds_in_metadata.rs
deleted file mode 100644
index 0fa2d3459f4..00000000000
--- a/src/test/auxiliary/trait_superkinds_in_metadata.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test library crate for cross-crate usages of traits inheriting
-// from the builtin kinds. Mostly tests metadata correctness.
-
-#![crate_type="lib"]
-
-pub trait RequiresShare : Sync { }
-pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
-pub trait RequiresCopy : Copy { }
diff --git a/src/test/auxiliary/traitimpl.rs b/src/test/auxiliary/traitimpl.rs
deleted file mode 100644
index 22e79cc6284..00000000000
--- a/src/test/auxiliary/traitimpl.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test inherent trait impls work cross-crait.
-
-pub trait Bar<'a> : 'a {}
-
-impl<'a> Bar<'a> {
-    pub fn bar(&self) {}
-}
diff --git a/src/test/auxiliary/two_macros.rs b/src/test/auxiliary/two_macros.rs
deleted file mode 100644
index 060960f0dbc..00000000000
--- a/src/test/auxiliary/two_macros.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[macro_export]
-macro_rules! macro_one { () => ("one") }
-
-#[macro_export]
-macro_rules! macro_two { () => ("two") }
diff --git a/src/test/auxiliary/typeid-intrinsic-aux1.rs b/src/test/auxiliary/typeid-intrinsic-aux1.rs
deleted file mode 100644
index 388d3238d42..00000000000
--- a/src/test/auxiliary/typeid-intrinsic-aux1.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(core)]
-
-use std::any::{Any, TypeId};
-
-pub struct A;
-pub struct B(Option<A>);
-pub struct C(Option<isize>);
-pub struct D(Option<&'static str>);
-pub struct E(Result<&'static str, isize>);
-
-pub type F = Option<isize>;
-pub type G = usize;
-pub type H = &'static str;
-
-pub unsafe fn id_A() -> TypeId { TypeId::of::<A>() }
-pub unsafe fn id_B() -> TypeId { TypeId::of::<B>() }
-pub unsafe fn id_C() -> TypeId { TypeId::of::<C>() }
-pub unsafe fn id_D() -> TypeId { TypeId::of::<D>() }
-pub unsafe fn id_E() -> TypeId { TypeId::of::<E>() }
-pub unsafe fn id_F() -> TypeId { TypeId::of::<F>() }
-pub unsafe fn id_G() -> TypeId { TypeId::of::<G>() }
-pub unsafe fn id_H() -> TypeId { TypeId::of::<H>() }
-
-pub unsafe fn foo<T: Any>() -> TypeId { TypeId::of::<T>() }
diff --git a/src/test/auxiliary/typeid-intrinsic-aux2.rs b/src/test/auxiliary/typeid-intrinsic-aux2.rs
deleted file mode 100644
index 3ad307fd3b5..00000000000
--- a/src/test/auxiliary/typeid-intrinsic-aux2.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(core)]
-
-use std::any::{Any, TypeId};
-
-pub struct A;
-pub struct B(Option<A>);
-pub struct C(Option<isize>);
-pub struct D(Option<&'static str>);
-pub struct E(Result<&'static str, isize>);
-
-pub type F = Option<isize>;
-pub type G = usize;
-pub type H = &'static str;
-
-pub unsafe fn id_A() -> TypeId { TypeId::of::<A>() }
-pub unsafe fn id_B() -> TypeId { TypeId::of::<B>() }
-pub unsafe fn id_C() -> TypeId { TypeId::of::<C>() }
-pub unsafe fn id_D() -> TypeId { TypeId::of::<D>() }
-pub unsafe fn id_E() -> TypeId { TypeId::of::<E>() }
-pub unsafe fn id_F() -> TypeId { TypeId::of::<F>() }
-pub unsafe fn id_G() -> TypeId { TypeId::of::<G>() }
-pub unsafe fn id_H() -> TypeId { TypeId::of::<H>() }
-
-pub unsafe fn foo<T:Any>() -> TypeId { TypeId::of::<T>() }
diff --git a/src/test/auxiliary/unboxed-closures-cross-crate.rs b/src/test/auxiliary/unboxed-closures-cross-crate.rs
deleted file mode 100644
index dac20dd2f7a..00000000000
--- a/src/test/auxiliary/unboxed-closures-cross-crate.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(unboxed_closures)]
-
-use std::ops::Add;
-
-#[inline]
-pub fn has_closures() -> usize {
-    let x = 1;
-    let mut f = move || x;
-    let y = 1;
-    let g = || y;
-    f() + g()
-}
-
-pub fn has_generic_closures<T: Add<Output=T> + Copy>(x: T, y: T) -> T {
-    let mut f = move || x;
-    let g = || y;
-    f() + g()
-}
diff --git a/src/test/auxiliary/unreachable_variant.rs b/src/test/auxiliary/unreachable_variant.rs
deleted file mode 100644
index 8ca85f20ab2..00000000000
--- a/src/test/auxiliary/unreachable_variant.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mod super_sekrit {
-    pub enum sooper_sekrit {
-        quux, baz
-    }
-}
diff --git a/src/test/auxiliary/use_from_trait_xc.rs b/src/test/auxiliary/use_from_trait_xc.rs
deleted file mode 100644
index 7024c9dad7c..00000000000
--- a/src/test/auxiliary/use_from_trait_xc.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(associated_consts)]
-
-pub use self::sub::{Bar, Baz};
-
-pub trait Trait {
-    fn foo(&self);
-    type Assoc;
-    const CONST: u32;
-}
-
-struct Foo;
-
-impl Foo {
-    pub fn new() {}
-
-    pub const C: u32 = 0;
-}
-
-mod sub {
-    pub struct Bar;
-
-    impl Bar {
-        pub fn new() {}
-    }
-
-    pub enum Baz {}
-
-    impl Baz {
-        pub fn new() {}
-    }
-}
diff --git a/src/test/auxiliary/variant-namespacing.rs b/src/test/auxiliary/variant-namespacing.rs
deleted file mode 100644
index d7fd2968495..00000000000
--- a/src/test/auxiliary/variant-namespacing.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub enum XE {
-    XStruct { a: u8 },
-    XTuple(u8),
-    XUnit,
-}
diff --git a/src/test/auxiliary/variant-struct.rs b/src/test/auxiliary/variant-struct.rs
deleted file mode 100644
index d846c0adf61..00000000000
--- a/src/test/auxiliary/variant-struct.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub enum Foo {
-    Bar {
-        qux: (),
-    }
-}
diff --git a/src/test/auxiliary/weak-lang-items.rs b/src/test/auxiliary/weak-lang-items.rs
deleted file mode 100644
index 6434e62b6f7..00000000000
--- a/src/test/auxiliary/weak-lang-items.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// no-prefer-dynamic
-
-// This aux-file will require the eh_personality function to be codegen'd, but
-// it hasn't been defined just yet. Make sure we don't explode.
-
-#![no_std]
-#![crate_type = "rlib"]
-
-struct A;
-
-impl core::ops::Drop for A {
-    fn drop(&mut self) {}
-}
-
-pub fn foo() {
-    let _a = A;
-    panic!("wut");
-}
-
-mod std {
-    pub use core::{option, fmt};
-}
diff --git a/src/test/auxiliary/where_clauses_xc.rs b/src/test/auxiliary/where_clauses_xc.rs
deleted file mode 100644
index 4549bd719c6..00000000000
--- a/src/test/auxiliary/where_clauses_xc.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait Equal {
-    fn equal(&self, other: &Self) -> bool;
-    fn equals<T,U>(&self, this: &T, that: &T, x: &U, y: &U) -> bool
-            where T: Eq, U: Eq;
-}
-
-impl<T> Equal for T where T: Eq {
-    fn equal(&self, other: &T) -> bool {
-        self == other
-    }
-    fn equals<U,X>(&self, this: &U, other: &U, x: &X, y: &X) -> bool
-            where U: Eq, X: Eq {
-        this == other && x == y
-    }
-}
-
-pub fn equal<T>(x: &T, y: &T) -> bool where T: Eq {
-    x == y
-}
diff --git a/src/test/auxiliary/xc_private_method_lib.rs b/src/test/auxiliary/xc_private_method_lib.rs
deleted file mode 100644
index 5e7bc61943b..00000000000
--- a/src/test/auxiliary/xc_private_method_lib.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type="lib"]
-
-pub struct Struct {
-    pub x: isize
-}
-
-impl Struct {
-    fn static_meth_struct() -> Struct {
-        Struct { x: 1 }
-    }
-
-    fn meth_struct(&self) -> isize {
-        self.x
-    }
-}
-
-pub enum Enum {
-    Variant1(isize),
-    Variant2(isize)
-}
-
-impl Enum {
-    fn static_meth_enum() -> Enum {
-        Enum::Variant2(10)
-    }
-
-    fn meth_enum(&self) -> isize {
-        match *self {
-            Enum::Variant1(x) |
-            Enum::Variant2(x) => x
-        }
-    }
-}
diff --git a/src/test/auxiliary/xcrate-trait-lifetime-param.rs b/src/test/auxiliary/xcrate-trait-lifetime-param.rs
deleted file mode 100644
index e8e5cc53aa3..00000000000
--- a/src/test/auxiliary/xcrate-trait-lifetime-param.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub trait FromBuf<'a> {
-    fn from_buf(&'a [u8]) -> Self;
-}
diff --git a/src/test/auxiliary/xcrate_address_insignificant.rs b/src/test/auxiliary/xcrate_address_insignificant.rs
deleted file mode 100644
index 5195839c067..00000000000
--- a/src/test/auxiliary/xcrate_address_insignificant.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub fn foo<T>() -> isize {
-    static a: isize = 3;
-    a
-}
-
-pub fn bar() -> isize {
-    foo::<isize>()
-}
diff --git a/src/test/auxiliary/xcrate_associated_type_defaults.rs b/src/test/auxiliary/xcrate_associated_type_defaults.rs
deleted file mode 100644
index 6779438c672..00000000000
--- a/src/test/auxiliary/xcrate_associated_type_defaults.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(associated_type_defaults)]
-
-pub trait Foo<T: Default + ToString> {
-    type Out: Default + ToString = T;
-}
-
-impl Foo<u32> for () {
-}
-
-impl Foo<u64> for () {
-    type Out = bool;
-}
diff --git a/src/test/auxiliary/xcrate_static_addresses.rs b/src/test/auxiliary/xcrate_static_addresses.rs
deleted file mode 100644
index d0da80e31b9..00000000000
--- a/src/test/auxiliary/xcrate_static_addresses.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub static global: isize = 3;
-
-static global0: isize = 4;
-
-pub static global2: &'static isize = &global0;
-
-pub fn verify_same(a: &'static isize) {
-    let a = a as *const isize as usize;
-    let b = &global as *const isize as usize;
-    assert_eq!(a, b);
-}
-
-pub fn verify_same2(a: &'static isize) {
-    let a = a as *const isize as usize;
-    let b = global2 as *const isize as usize;
-    assert_eq!(a, b);
-}
diff --git a/src/test/auxiliary/xcrate_struct_aliases.rs b/src/test/auxiliary/xcrate_struct_aliases.rs
deleted file mode 100644
index 334f7829bd1..00000000000
--- a/src/test/auxiliary/xcrate_struct_aliases.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-pub struct S {
-    pub x: isize,
-    pub y: isize,
-}
-
-pub type S2 = S;
diff --git a/src/test/auxiliary/xcrate_unit_struct.rs b/src/test/auxiliary/xcrate_unit_struct.rs
deleted file mode 100644
index 7a69be2b06c..00000000000
--- a/src/test/auxiliary/xcrate_unit_struct.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_type = "lib"]
-
-// used by the rpass test
-
-#[derive(Copy, Clone)]
-pub struct Struct;
-
-#[derive(Copy, Clone)]
-pub enum Unit {
-    UnitVariant,
-    Argument(Struct)
-}
-
-#[derive(Copy, Clone)]
-pub struct TupleStruct(pub usize, pub &'static str);
-
-// used by the cfail test
-
-#[derive(Copy, Clone)]
-pub struct StructWithFields {
-    foo: isize,
-}
-
-#[derive(Copy, Clone)]
-pub enum EnumWithVariants {
-    EnumVariant,
-    EnumVariantArg(isize)
-}
diff --git a/src/test/auxiliary/issue-21146-inc.rs b/src/test/compile-fail/aux/issue-21146-inc.rs
similarity index 100%
rename from src/test/auxiliary/issue-21146-inc.rs
rename to src/test/compile-fail/aux/issue-21146-inc.rs
diff --git a/src/test/compile-fail/issue-21146.rs b/src/test/compile-fail/issue-21146.rs
index 4c6059c132a..7ea6f6f18b9 100644
--- a/src/test/compile-fail/issue-21146.rs
+++ b/src/test/compile-fail/issue-21146.rs
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 // error-pattern: expected item, found `parse_error`
-include!("../auxiliary/issue-21146-inc.rs");
+include!("aux/issue-21146-inc.rs");
 fn main() {}
diff --git a/src/test/auxiliary/macro-include-items-expr.rs b/src/test/run-pass/aux/macro-include-items-expr.rs
similarity index 100%
rename from src/test/auxiliary/macro-include-items-expr.rs
rename to src/test/run-pass/aux/macro-include-items-expr.rs
diff --git a/src/test/auxiliary/macro-include-items-item.rs b/src/test/run-pass/aux/macro-include-items-item.rs
similarity index 100%
rename from src/test/auxiliary/macro-include-items-item.rs
rename to src/test/run-pass/aux/macro-include-items-item.rs
diff --git a/src/test/run-pass/macro-include-items.rs b/src/test/run-pass/macro-include-items.rs
index 9e2f431c3ec..a2e1d86a990 100644
--- a/src/test/run-pass/macro-include-items.rs
+++ b/src/test/run-pass/macro-include-items.rs
@@ -12,9 +12,9 @@
 
 fn bar() {}
 
-include!(concat!("", "", "../auxiliary/", "macro-include-items-item.rs"));
+include!(concat!("", "", "aux/", "macro-include-items-item.rs"));
 
 fn main() {
     foo();
-    assert_eq!(include!(concat!("", "../auxiliary/", "macro-include-items-expr.rs")), 1_usize);
+    assert_eq!(include!(concat!("", "aux/", "macro-include-items-expr.rs")), 1_usize);
 }
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index e7019de8f43..ae8beb83530 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -108,9 +108,6 @@ pub struct Config {
     // The directory where programs should be built
     pub build_base: PathBuf,
 
-    // Directory for auxiliary libraries
-    pub aux_base: PathBuf,
-
     // The name of the stage being built (stage1, etc)
     pub stage_id: String,
 
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 3ab08021717..6e1cae9b25c 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -82,7 +82,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
           optopt("", "llvm-filecheck", "path to LLVM's FileCheck binary", "DIR"),
           reqopt("", "src-base", "directory to scan for test files", "PATH"),
           reqopt("", "build-base", "directory to deposit test outputs", "PATH"),
-          reqopt("", "aux-base", "directory to find auxiliary test files", "PATH"),
           reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
           reqopt("", "mode", "which sort of compile tests to run",
                  "(compile-fail|parse-fail|run-fail|run-pass|\
@@ -158,7 +157,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
         llvm_filecheck: matches.opt_str("llvm-filecheck").map(|s| PathBuf::from(&s)),
         src_base: opt_path(matches, "src-base"),
         build_base: opt_path(matches, "build-base"),
-        aux_base: opt_path(matches, "aux-base"),
         stage_id: matches.opt_str("stage-id").unwrap(),
         mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
         run_ignored: matches.opt_present("ignored"),

From 47c8179bc2666ee1ff31d04a97608d2d76c90641 Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Wed, 27 Apr 2016 09:39:47 -0400
Subject: [PATCH 07/10] remove unused aux-base argument

---
 src/bootstrap/build/check.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/bootstrap/build/check.rs b/src/bootstrap/build/check.rs
index a376b021a8a..b53a0a895af 100644
--- a/src/bootstrap/build/check.rs
+++ b/src/bootstrap/build/check.rs
@@ -70,7 +70,6 @@ pub fn compiletest(build: &Build,
     cmd.arg("--rustc-path").arg(build.compiler_path(compiler));
     cmd.arg("--rustdoc-path").arg(build.rustdoc(compiler));
     cmd.arg("--src-base").arg(build.src.join("src/test").join(suite));
-    cmd.arg("--aux-base").arg(build.src.join("src/test/auxiliary"));
     cmd.arg("--build-base").arg(testdir(build, compiler.host).join(suite));
     cmd.arg("--stage-id").arg(format!("stage{}-{}", compiler.stage, target));
     cmd.arg("--mode").arg(mode);

From cefc5b6468077134625648d3c8a97d5fb7ad1219 Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Wed, 27 Apr 2016 15:48:49 -0400
Subject: [PATCH 08/10] add missing aux files

---
 .../rustdoc/inline_cross/aux/issue-33113.rs   | 17 +++++++++++++
 .../inline_cross/aux/rustdoc-hidden.rs        | 14 +++++++++++
 .../aux/rustdoc-trait-object-impl.rs          | 24 +++++++++++++++++++
 3 files changed, 55 insertions(+)
 create mode 100644 src/test/rustdoc/inline_cross/aux/issue-33113.rs
 create mode 100644 src/test/rustdoc/inline_cross/aux/rustdoc-hidden.rs
 create mode 100644 src/test/rustdoc/inline_cross/aux/rustdoc-trait-object-impl.rs

diff --git a/src/test/rustdoc/inline_cross/aux/issue-33113.rs b/src/test/rustdoc/inline_cross/aux/issue-33113.rs
new file mode 100644
index 00000000000..c476dda2690
--- /dev/null
+++ b/src/test/rustdoc/inline_cross/aux/issue-33113.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="bar"]
+
+pub trait Bar {}
+pub struct Foo;
+
+impl<'a> Bar for &'a char {}
+impl Bar for Foo {}
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-hidden.rs b/src/test/rustdoc/inline_cross/aux/rustdoc-hidden.rs
new file mode 100644
index 00000000000..aae3eb84fb5
--- /dev/null
+++ b/src/test/rustdoc/inline_cross/aux/rustdoc-hidden.rs
@@ -0,0 +1,14 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[doc(hidden)]
+pub struct Foo;
+
+pub struct Bar;
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-trait-object-impl.rs b/src/test/rustdoc/inline_cross/aux/rustdoc-trait-object-impl.rs
new file mode 100644
index 00000000000..317262f4175
--- /dev/null
+++ b/src/test/rustdoc/inline_cross/aux/rustdoc-trait-object-impl.rs
@@ -0,0 +1,24 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::fmt;
+
+pub trait Bar {}
+
+impl<'a> Bar + 'a {
+    pub fn bar(&self) -> usize { 42 }
+}
+
+impl<'a> fmt::Debug for Bar + 'a {
+    fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
+        Ok(())
+    }
+}
+

From 8b1941a7831d715e36a414668a0b23146ff9cc2c Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Wed, 4 May 2016 20:09:17 -0400
Subject: [PATCH 09/10] s/aux/auxiliary, because windows

For legacy reasons (presumably), Windows does not permit files name aux.
---
 .../{aux => auxiliary}/cgu_export_trait_method.rs             | 0
 .../item-collection/{aux => auxiliary}/cgu_extern_closures.rs | 0
 .../{aux => auxiliary}/cgu_generic_function.rs                | 0
 .../partitioning/{aux => auxiliary}/cgu_explicit_inlining.rs  | 0
 .../partitioning/{aux => auxiliary}/cgu_extern_drop_glue.rs   | 0
 .../partitioning/{aux => auxiliary}/cgu_generic_function.rs   | 0
 .../{aux => auxiliary}/attr_plugin_test.rs                    | 0
 .../{aux => auxiliary}/lint_for_crate.rs                      | 0
 .../{aux => auxiliary}/lint_group_plugin_test.rs              | 0
 .../{aux => auxiliary}/lint_plugin_test.rs                    | 0
 .../{aux => auxiliary}/macro_crate_MacroRulesTT.rs            | 0
 .../{aux => auxiliary}/macro_crate_test.rs                    | 0
 .../{aux => auxiliary}/macro_reexport_1.rs                    | 0
 .../{aux => auxiliary}/rlib_crate_test.rs                     | 0
 .../{aux => auxiliary}/use_from_trait_xc.rs                   | 0
 src/test/compile-fail/{aux => auxiliary}/allocator-dylib.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/allocator-dylib2.rs  | 0
 src/test/compile-fail/{aux => auxiliary}/allocator1.rs        | 0
 src/test/compile-fail/{aux => auxiliary}/allocator2.rs        | 0
 src/test/compile-fail/{aux => auxiliary}/allocator3.rs        | 0
 src/test/compile-fail/{aux => auxiliary}/ambig_impl_2_lib.rs  | 0
 src/test/compile-fail/{aux => auxiliary}/cci_class.rs         | 0
 src/test/compile-fail/{aux => auxiliary}/cci_class_5.rs       | 0
 .../compile-fail/{aux => auxiliary}/changing-crates-a1.rs     | 0
 .../compile-fail/{aux => auxiliary}/changing-crates-a2.rs     | 0
 src/test/compile-fail/{aux => auxiliary}/changing-crates-b.rs | 0
 .../{aux => auxiliary}/coherence_copy_like_lib.rs             | 0
 .../{aux => auxiliary}/coherence_inherent_cc_lib.rs           | 0
 src/test/compile-fail/{aux => auxiliary}/coherence_lib.rs     | 0
 .../compile-fail/{aux => auxiliary}/coherence_orphan_lib.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/const_fn_lib.rs      | 0
 src/test/compile-fail/{aux => auxiliary}/crate_a1.rs          | 0
 src/test/compile-fail/{aux => auxiliary}/crate_a2.rs          | 0
 src/test/compile-fail/{aux => auxiliary}/crateresolve1-1.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/crateresolve1-2.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/crateresolve1-3.rs   | 0
 .../{aux => auxiliary}/default_ty_param_cross_crate_crate.rs  | 0
 src/test/compile-fail/{aux => auxiliary}/deprecation-lint.rs  | 0
 src/test/compile-fail/{aux => auxiliary}/empty-struct.rs      | 0
 src/test/compile-fail/{aux => auxiliary}/go_trait.rs          | 0
 .../compile-fail/{aux => auxiliary}/inherited_stability.rs    | 0
 src/test/compile-fail/{aux => auxiliary}/internal_unstable.rs | 0
 src/test/compile-fail/{aux => auxiliary}/issue-19163.rs       | 0
 src/test/compile-fail/{aux => auxiliary}/issue-21146-inc.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/issue-21221-3.rs     | 0
 src/test/compile-fail/{aux => auxiliary}/issue-21221-4.rs     | 0
 src/test/compile-fail/{aux => auxiliary}/issue-29181.rs       | 0
 src/test/compile-fail/{aux => auxiliary}/issue-30535.rs       | 0
 src/test/compile-fail/{aux => auxiliary}/issue_11680.rs       | 0
 src/test/compile-fail/{aux => auxiliary}/issue_12612_1.rs     | 0
 src/test/compile-fail/{aux => auxiliary}/issue_16725.rs       | 0
 .../{aux => auxiliary}/issue_17718_const_privacy.rs           | 0
 src/test/compile-fail/{aux => auxiliary}/issue_21202.rs       | 0
 src/test/compile-fail/{aux => auxiliary}/issue_30123_aux.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/issue_3907.rs        | 0
 src/test/compile-fail/{aux => auxiliary}/issue_5844_aux.rs    | 0
 .../lifetime_bound_will_change_warning_lib.rs                 | 0
 .../compile-fail/{aux => auxiliary}/lint_output_format.rs     | 0
 src/test/compile-fail/{aux => auxiliary}/lint_stability.rs    | 0
 .../compile-fail/{aux => auxiliary}/lint_stability_fields.rs  | 0
 .../{aux => auxiliary}/lint_unused_extern_crate.rs            | 0
 .../{aux => auxiliary}/macro_crate_nonterminal.rs             | 0
 .../compile-fail/{aux => auxiliary}/macro_non_reexport_2.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/macro_reexport_1.rs  | 0
 src/test/compile-fail/{aux => auxiliary}/namespaced_enums.rs  | 0
 src/test/compile-fail/{aux => auxiliary}/needs_allocator.rs   | 0
 .../{aux => auxiliary}/no_method_suggested_traits.rs          | 0
 src/test/compile-fail/{aux => auxiliary}/noexporttypelib.rs   | 0
 .../{aux => auxiliary}/orphan_check_diagnostics.rs            | 0
 .../compile-fail/{aux => auxiliary}/privacy_tuple_struct.rs   | 0
 src/test/compile-fail/{aux => auxiliary}/private_trait_xc.rs  | 0
 src/test/compile-fail/{aux => auxiliary}/pub_static_array.rs  | 0
 .../compile-fail/{aux => auxiliary}/rbmtp_cross_crate_lib.rs  | 0
 .../{aux => auxiliary}/stability_attribute_issue.rs           | 0
 src/test/compile-fail/{aux => auxiliary}/stability_cfg1.rs    | 0
 src/test/compile-fail/{aux => auxiliary}/stability_cfg2.rs    | 0
 .../compile-fail/{aux => auxiliary}/static_priv_by_default.rs | 0
 .../compile-fail/{aux => auxiliary}/struct_field_privacy.rs   | 0
 .../compile-fail/{aux => auxiliary}/struct_variant_privacy.rs | 0
 src/test/compile-fail/{aux => auxiliary}/svh-a-base.rs        | 0
 src/test/compile-fail/{aux => auxiliary}/svh-a-change-lit.rs  | 0
 .../{aux => auxiliary}/svh-a-change-significant-cfg.rs        | 0
 .../{aux => auxiliary}/svh-a-change-trait-bound.rs            | 0
 .../compile-fail/{aux => auxiliary}/svh-a-change-type-arg.rs  | 0
 .../compile-fail/{aux => auxiliary}/svh-a-change-type-ret.rs  | 0
 .../{aux => auxiliary}/svh-a-change-type-static.rs            | 0
 src/test/compile-fail/{aux => auxiliary}/svh-b.rs             | 0
 src/test/compile-fail/{aux => auxiliary}/svh-uta-base.rs      | 0
 .../{aux => auxiliary}/svh-uta-change-use-trait.rs            | 0
 src/test/compile-fail/{aux => auxiliary}/svh-utb.rs           | 0
 .../compile-fail/{aux => auxiliary}/tdticc_coherence_lib.rs   | 0
 .../trait_bounds_on_structs_and_enums_xc.rs                   | 0
 .../compile-fail/{aux => auxiliary}/trait_impl_conflict.rs    | 0
 src/test/compile-fail/{aux => auxiliary}/trait_safety_lib.rs  | 0
 .../{aux => auxiliary}/trait_superkinds_in_metadata.rs        | 0
 src/test/compile-fail/{aux => auxiliary}/two_macros.rs        | 0
 .../compile-fail/{aux => auxiliary}/unreachable_variant.rs    | 0
 src/test/compile-fail/{aux => auxiliary}/use_from_trait_xc.rs | 0
 .../compile-fail/{aux => auxiliary}/variant-namespacing.rs    | 0
 src/test/compile-fail/{aux => auxiliary}/weak-lang-items.rs   | 0
 .../compile-fail/{aux => auxiliary}/xc_private_method_lib.rs  | 0
 .../compile-fail/{aux => auxiliary}/xcrate_unit_struct.rs     | 0
 src/test/compile-fail/issue-21146.rs                          | 2 +-
 .../privacy/restricted/{aux => auxiliary}/pub_restricted.rs   | 0
 .../{aux => auxiliary}/cross_crate_debuginfo_type_uniquing.rs | 0
 src/test/debuginfo/{aux => auxiliary}/cross_crate_spans.rs    | 0
 src/test/debuginfo/{aux => auxiliary}/issue13213aux.rs        | 0
 .../{aux => auxiliary}/custom_derive_plugin.rs                | 0
 .../{aux => auxiliary}/custom_derive_plugin_attr.rs           | 0
 .../run-pass-fulldeps/{aux => auxiliary}/dummy_mir_pass.rs    | 0
 .../run-pass-fulldeps/{aux => auxiliary}/issue-13560-1.rs     | 0
 .../run-pass-fulldeps/{aux => auxiliary}/issue-13560-2.rs     | 0
 .../run-pass-fulldeps/{aux => auxiliary}/issue-13560-3.rs     | 0
 src/test/run-pass-fulldeps/{aux => auxiliary}/issue-16822.rs  | 0
 src/test/run-pass-fulldeps/{aux => auxiliary}/issue-18502.rs  | 0
 .../issue_16723_multiple_items_syntax_ext.rs                  | 0
 .../{aux => auxiliary}/linkage-visibility.rs                  | 0
 .../run-pass-fulldeps/{aux => auxiliary}/lint_for_crate.rs    | 0
 .../{aux => auxiliary}/lint_group_plugin_test.rs              | 0
 .../run-pass-fulldeps/{aux => auxiliary}/lint_plugin_test.rs  | 0
 .../run-pass-fulldeps/{aux => auxiliary}/llvm_pass_plugin.rs  | 0
 .../{aux => auxiliary}/logging_right_crate.rs                 | 0
 .../{aux => auxiliary}/lto-syntax-extension-lib.rs            | 0
 .../{aux => auxiliary}/lto-syntax-extension-plugin.rs         | 0
 .../run-pass-fulldeps/{aux => auxiliary}/macro_crate_test.rs  | 0
 src/test/run-pass-fulldeps/{aux => auxiliary}/plugin_args.rs  | 0
 .../plugin_crate_outlive_expansion_phase.rs                   | 0
 .../{aux => auxiliary}/plugin_with_plugin_lib.rs              | 0
 .../{aux => auxiliary}/procedural_mbe_matching.rs             | 0
 .../run-pass-fulldeps/{aux => auxiliary}/roman_numerals.rs    | 0
 .../{aux => auxiliary}/syntax_extension_with_dll_deps_1.rs    | 0
 .../{aux => auxiliary}/syntax_extension_with_dll_deps_2.rs    | 0
 src/test/run-pass/{aux => auxiliary}/allocator-dummy.rs       | 0
 .../{aux => auxiliary}/anon-extern-mod-cross-crate-1.rs       | 0
 .../{aux => auxiliary}/anon_trait_static_method_lib.rs        | 0
 .../run-pass/{aux => auxiliary}/associated-const-cc-lib.rs    | 0
 .../run-pass/{aux => auxiliary}/associated-types-cc-lib.rs    | 0
 src/test/run-pass/{aux => auxiliary}/augmented_assignments.rs | 0
 .../{aux => auxiliary}/blind-item-mixed-crate-use-item-foo.rs | 0
 .../blind-item-mixed-crate-use-item-foo2.rs                   | 0
 src/test/run-pass/{aux => auxiliary}/cci_borrow_lib.rs        | 0
 src/test/run-pass/{aux => auxiliary}/cci_capture_clause.rs    | 0
 src/test/run-pass/{aux => auxiliary}/cci_class.rs             | 0
 src/test/run-pass/{aux => auxiliary}/cci_class_2.rs           | 0
 src/test/run-pass/{aux => auxiliary}/cci_class_3.rs           | 0
 src/test/run-pass/{aux => auxiliary}/cci_class_4.rs           | 0
 src/test/run-pass/{aux => auxiliary}/cci_class_6.rs           | 0
 src/test/run-pass/{aux => auxiliary}/cci_class_cast.rs        | 0
 src/test/run-pass/{aux => auxiliary}/cci_class_trait.rs       | 0
 src/test/run-pass/{aux => auxiliary}/cci_const.rs             | 0
 src/test/run-pass/{aux => auxiliary}/cci_const_block.rs       | 0
 src/test/run-pass/{aux => auxiliary}/cci_impl_lib.rs          | 0
 src/test/run-pass/{aux => auxiliary}/cci_intrinsic.rs         | 0
 src/test/run-pass/{aux => auxiliary}/cci_iter_lib.rs          | 0
 src/test/run-pass/{aux => auxiliary}/cci_nested_lib.rs        | 0
 src/test/run-pass/{aux => auxiliary}/cci_no_inline_lib.rs     | 0
 src/test/run-pass/{aux => auxiliary}/cfg_inner_static.rs      | 0
 src/test/run-pass/{aux => auxiliary}/cgu_test.rs              | 0
 src/test/run-pass/{aux => auxiliary}/cgu_test_a.rs            | 0
 src/test/run-pass/{aux => auxiliary}/cgu_test_b.rs            | 0
 .../check_static_recursion_foreign_helper.rs                  | 0
 .../run-pass/{aux => auxiliary}/coherence_copy_like_lib.rs    | 0
 src/test/run-pass/{aux => auxiliary}/coherence_lib.rs         | 0
 src/test/run-pass/{aux => auxiliary}/const_fn_lib.rs          | 0
 .../{aux => auxiliary}/crate-attributes-using-cfg_attr.rs     | 0
 .../{aux => auxiliary}/crate-method-reexport-grrrrrrr2.rs     | 0
 .../run-pass/{aux => auxiliary}/default_type_params_xc.rs     | 0
 src/test/run-pass/{aux => auxiliary}/derive-no-std.rs         | 0
 src/test/run-pass/{aux => auxiliary}/empty-struct.rs          | 0
 src/test/run-pass/{aux => auxiliary}/explicit_self_xcrate.rs  | 0
 .../run-pass/{aux => auxiliary}/extern-crosscrate-source.rs   | 0
 src/test/run-pass/{aux => auxiliary}/extern-take-value.rs     | 0
 .../run-pass/{aux => auxiliary}/extern_calling_convention.rs  | 0
 .../run-pass/{aux => auxiliary}/extern_mod_ordering_lib.rs    | 0
 src/test/run-pass/{aux => auxiliary}/fat_drop.rs              | 0
 src/test/run-pass/{aux => auxiliary}/fn-abi.rs                | 0
 src/test/run-pass/{aux => auxiliary}/foreign_lib.rs           | 0
 src/test/run-pass/{aux => auxiliary}/go_trait.rs              | 0
 src/test/run-pass/{aux => auxiliary}/i8.rs                    | 0
 src/test/run-pass/{aux => auxiliary}/impl_privacy_xc_1.rs     | 0
 src/test/run-pass/{aux => auxiliary}/impl_privacy_xc_2.rs     | 0
 src/test/run-pass/{aux => auxiliary}/inline_dtor.rs           | 0
 src/test/run-pass/{aux => auxiliary}/inner_static.rs          | 0
 src/test/run-pass/{aux => auxiliary}/iss.rs                   | 0
 src/test/run-pass/{aux => auxiliary}/issue-10028.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-11224.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-11225-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-11225-2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-11225-3.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-11508.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-11529.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-12133-dylib.rs     | 0
 src/test/run-pass/{aux => auxiliary}/issue-12133-dylib2.rs    | 0
 src/test/run-pass/{aux => auxiliary}/issue-12133-rlib.rs      | 0
 src/test/run-pass/{aux => auxiliary}/issue-12660-aux.rs       | 0
 src/test/run-pass/{aux => auxiliary}/issue-13620-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-13620-2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-13872-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-13872-2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-13872-3.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-14344-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-14344-2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-14421.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-14422.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-15562.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-16643.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-17662.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-17718-aux.rs       | 0
 src/test/run-pass/{aux => auxiliary}/issue-18501.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-18514.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-18711.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-18913-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-18913-2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-19340-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-2380.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-2414-a.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue-2414-b.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue-25185-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-25185-2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-2526.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-25467.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-2631-a.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue-29485.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue-3012-1.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue-31702-1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-31702-2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-4208-cc.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue-4545.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-5518.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-5521.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-7178.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-7899.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-8044.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-8259.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-9906.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue-9968.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue13507.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue2170lib.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue_10031_aux.rs       | 0
 src/test/run-pass/{aux => auxiliary}/issue_12612_1.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue_12612_2.rs         | 0
 src/test/run-pass/{aux => auxiliary}/issue_19293.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue_20389.rs           | 0
 src/test/run-pass/{aux => auxiliary}/issue_2316_a.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue_2316_b.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue_2472_b.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue_2723_a.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue_3136_a.rc          | 0
 src/test/run-pass/{aux => auxiliary}/issue_3136_a.rs          | 0
 src/test/run-pass/{aux => auxiliary}/issue_3979_traits.rs     | 0
 src/test/run-pass/{aux => auxiliary}/issue_8401.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue_9123.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue_9155.rs            | 0
 src/test/run-pass/{aux => auxiliary}/issue_9188.rs            | 0
 src/test/run-pass/{aux => auxiliary}/kinds_in_metadata.rs     | 0
 src/test/run-pass/{aux => auxiliary}/linkage1.rs              | 0
 .../run-pass/{aux => auxiliary}/macro-include-items-expr.rs   | 0
 .../run-pass/{aux => auxiliary}/macro-include-items-item.rs   | 0
 src/test/run-pass/{aux => auxiliary}/macro_crate_def_only.rs  | 0
 .../run-pass/{aux => auxiliary}/macro_crate_nonterminal.rs    | 0
 .../run-pass/{aux => auxiliary}/macro_export_inner_module.rs  | 0
 src/test/run-pass/{aux => auxiliary}/macro_reexport_1.rs      | 0
 src/test/run-pass/{aux => auxiliary}/macro_reexport_2.rs      | 0
 .../run-pass/{aux => auxiliary}/macro_reexport_2_no_use.rs    | 0
 src/test/run-pass/{aux => auxiliary}/macro_with_super_1.rs    | 0
 src/test/run-pass/{aux => auxiliary}/method_self_arg1.rs      | 0
 src/test/run-pass/{aux => auxiliary}/method_self_arg2.rs      | 0
 src/test/run-pass/{aux => auxiliary}/mir_external_refs.rs     | 0
 .../run-pass/{aux => auxiliary}/moves_based_on_type_lib.rs    | 0
 src/test/run-pass/{aux => auxiliary}/msvc-data-only-lib.rs    | 0
 .../{aux => auxiliary}/namespaced_enum_emulate_flat.rs        | 0
 src/test/run-pass/{aux => auxiliary}/namespaced_enums.rs      | 0
 src/test/run-pass/{aux => auxiliary}/nested_item.rs           | 0
 src/test/run-pass/{aux => auxiliary}/newtype_struct_xc.rs     | 0
 .../run-pass/{aux => auxiliary}/overloaded_autoderef_xc.rs    | 0
 src/test/run-pass/{aux => auxiliary}/packed.rs                | 0
 src/test/run-pass/{aux => auxiliary}/priv-impl-prim-ty.rs     | 0
 src/test/run-pass/{aux => auxiliary}/privacy_reexport.rs      | 0
 src/test/run-pass/{aux => auxiliary}/pub_use_mods_xcrate.rs   | 0
 src/test/run-pass/{aux => auxiliary}/pub_use_xcrate1.rs       | 0
 src/test/run-pass/{aux => auxiliary}/pub_use_xcrate2.rs       | 0
 .../run-pass/{aux => auxiliary}/reachable-unnameable-items.rs | 0
 .../run-pass/{aux => auxiliary}/reexport-should-still-link.rs | 0
 .../run-pass/{aux => auxiliary}/reexported_static_methods.rs  | 0
 src/test/run-pass/{aux => auxiliary}/sepcomp-extern-lib.rs    | 0
 src/test/run-pass/{aux => auxiliary}/sepcomp_cci_lib.rs       | 0
 src/test/run-pass/{aux => auxiliary}/sepcomp_lib.rs           | 0
 .../{aux => auxiliary}/static-function-pointer-aux.rs         | 0
 src/test/run-pass/{aux => auxiliary}/static-methods-crate.rs  | 0
 .../run-pass/{aux => auxiliary}/static_fn_inline_xc_aux.rs    | 0
 .../run-pass/{aux => auxiliary}/static_fn_trait_xc_aux.rs     | 0
 src/test/run-pass/{aux => auxiliary}/static_mut_xc.rs         | 0
 .../{aux => auxiliary}/struct_destructuring_cross_crate.rs    | 0
 src/test/run-pass/{aux => auxiliary}/struct_variant_xc_aux.rs | 0
 src/test/run-pass/{aux => auxiliary}/svh-a-base.rs            | 0
 src/test/run-pass/{aux => auxiliary}/svh-a-comment.rs         | 0
 src/test/run-pass/{aux => auxiliary}/svh-a-doc.rs             | 0
 src/test/run-pass/{aux => auxiliary}/svh-a-macro.rs           | 0
 src/test/run-pass/{aux => auxiliary}/svh-a-no-change.rs       | 0
 src/test/run-pass/{aux => auxiliary}/svh-a-redundant-cfg.rs   | 0
 src/test/run-pass/{aux => auxiliary}/svh-a-whitespace.rs      | 0
 src/test/run-pass/{aux => auxiliary}/svh-b.rs                 | 0
 .../run-pass/{aux => auxiliary}/thread-local-extern-static.rs | 0
 .../{aux => auxiliary}/trait_default_method_xc_aux.rs         | 0
 .../{aux => auxiliary}/trait_default_method_xc_aux_2.rs       | 0
 .../{aux => auxiliary}/trait_inheritance_auto_xc_2_aux.rs     | 0
 .../{aux => auxiliary}/trait_inheritance_auto_xc_aux.rs       | 0
 .../trait_inheritance_cross_trait_call_xc_aux.rs              | 0
 .../{aux => auxiliary}/trait_inheritance_overloading_xc.rs    | 0
 src/test/run-pass/{aux => auxiliary}/trait_safety_lib.rs      | 0
 .../{aux => auxiliary}/trait_superkinds_in_metadata.rs        | 0
 src/test/run-pass/{aux => auxiliary}/traitimpl.rs             | 0
 src/test/run-pass/{aux => auxiliary}/two_macros.rs            | 0
 src/test/run-pass/{aux => auxiliary}/typeid-intrinsic-aux1.rs | 0
 src/test/run-pass/{aux => auxiliary}/typeid-intrinsic-aux2.rs | 0
 .../{aux => auxiliary}/unboxed-closures-cross-crate.rs        | 0
 src/test/run-pass/{aux => auxiliary}/weak-lang-items.rs       | 0
 src/test/run-pass/{aux => auxiliary}/where_clauses_xc.rs      | 0
 .../{aux => auxiliary}/xcrate-trait-lifetime-param.rs         | 0
 .../{aux => auxiliary}/xcrate_address_insignificant.rs        | 0
 .../{aux => auxiliary}/xcrate_associated_type_defaults.rs     | 0
 .../run-pass/{aux => auxiliary}/xcrate_static_addresses.rs    | 0
 src/test/run-pass/{aux => auxiliary}/xcrate_struct_aliases.rs | 0
 src/test/run-pass/{aux => auxiliary}/xcrate_unit_struct.rs    | 0
 .../{aux => auxiliary}/crate_with_invalid_spans.rs            | 0
 .../{aux => auxiliary}/crate_with_invalid_spans_macros.rs     | 0
 .../{aux => auxiliary}/issue24687_lib.rs                      | 0
 .../{aux => auxiliary}/issue24687_mbcs_in_comments.rs         | 0
 src/test/run-pass/macro-include-items.rs                      | 4 ++--
 .../run-pass/specialization/{aux => auxiliary}/go_trait.rs    | 0
 .../{aux => auxiliary}/specialization_cross_crate.rs          | 0
 .../{aux => auxiliary}/specialization_cross_crate_defaults.rs | 0
 src/test/rustdoc/{aux => auxiliary}/empty.rs                  | 0
 src/test/rustdoc/{aux => auxiliary}/inline-default-methods.rs | 0
 src/test/rustdoc/{aux => auxiliary}/issue-13698.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-15318.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-17476.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-19190-3.rs          | 0
 src/test/rustdoc/{aux => auxiliary}/issue-20646.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-20727.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-21092.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-21801.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-22025.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-23207-1.rs          | 0
 src/test/rustdoc/{aux => auxiliary}/issue-23207-2.rs          | 0
 src/test/rustdoc/{aux => auxiliary}/issue-26606-macro.rs      | 0
 src/test/rustdoc/{aux => auxiliary}/issue-27362.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-28927-1.rs          | 0
 src/test/rustdoc/{aux => auxiliary}/issue-28927-2.rs          | 0
 src/test/rustdoc/{aux => auxiliary}/issue-29584.rs            | 0
 src/test/rustdoc/{aux => auxiliary}/issue-30109-1.rs          | 0
 src/test/rustdoc/{aux => auxiliary}/reexp_stripped.rs         | 0
 src/test/rustdoc/{aux => auxiliary}/rustdoc-default-impl.rs   | 0
 .../{aux => auxiliary}/rustdoc-extern-default-method.rs       | 0
 src/test/rustdoc/{aux => auxiliary}/rustdoc-extern-method.rs  | 0
 src/test/rustdoc/{aux => auxiliary}/rustdoc-ffi.rs            | 0
 .../{aux => auxiliary}/rustdoc-impl-parts-crosscrate.rs       | 0
 src/test/rustdoc/{aux => auxiliary}/variant-struct.rs         | 0
 .../rustdoc/inline_cross/{aux => auxiliary}/issue-33113.rs    | 0
 .../inline_cross/{aux => auxiliary}/rustdoc-hidden-sig.rs     | 0
 .../rustdoc/inline_cross/{aux => auxiliary}/rustdoc-hidden.rs | 0
 .../{aux => auxiliary}/rustdoc-nonreachable-impls.rs          | 0
 .../{aux => auxiliary}/rustdoc-trait-object-impl.rs           | 0
 src/tools/compiletest/src/main.rs                             | 2 +-
 src/tools/compiletest/src/runtest.rs                          | 4 ++--
 365 files changed, 6 insertions(+), 6 deletions(-)
 rename src/test/codegen-units/item-collection/{aux => auxiliary}/cgu_export_trait_method.rs (100%)
 rename src/test/codegen-units/item-collection/{aux => auxiliary}/cgu_extern_closures.rs (100%)
 rename src/test/codegen-units/item-collection/{aux => auxiliary}/cgu_generic_function.rs (100%)
 rename src/test/codegen-units/partitioning/{aux => auxiliary}/cgu_explicit_inlining.rs (100%)
 rename src/test/codegen-units/partitioning/{aux => auxiliary}/cgu_extern_drop_glue.rs (100%)
 rename src/test/codegen-units/partitioning/{aux => auxiliary}/cgu_generic_function.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/attr_plugin_test.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/lint_for_crate.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/lint_group_plugin_test.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/lint_plugin_test.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/macro_crate_MacroRulesTT.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/macro_crate_test.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/macro_reexport_1.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/rlib_crate_test.rs (100%)
 rename src/test/compile-fail-fulldeps/{aux => auxiliary}/use_from_trait_xc.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/allocator-dylib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/allocator-dylib2.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/allocator1.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/allocator2.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/allocator3.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/ambig_impl_2_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/cci_class.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/cci_class_5.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/changing-crates-a1.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/changing-crates-a2.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/changing-crates-b.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/coherence_copy_like_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/coherence_inherent_cc_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/coherence_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/coherence_orphan_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/const_fn_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/crate_a1.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/crate_a2.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/crateresolve1-1.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/crateresolve1-2.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/crateresolve1-3.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/default_ty_param_cross_crate_crate.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/deprecation-lint.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/empty-struct.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/go_trait.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/inherited_stability.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/internal_unstable.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue-19163.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue-21146-inc.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue-21221-3.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue-21221-4.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue-29181.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue-30535.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_11680.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_12612_1.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_16725.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_17718_const_privacy.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_21202.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_30123_aux.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_3907.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/issue_5844_aux.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/lifetime_bound_will_change_warning_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/lint_output_format.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/lint_stability.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/lint_stability_fields.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/lint_unused_extern_crate.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/macro_crate_nonterminal.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/macro_non_reexport_2.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/macro_reexport_1.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/namespaced_enums.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/needs_allocator.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/no_method_suggested_traits.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/noexporttypelib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/orphan_check_diagnostics.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/privacy_tuple_struct.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/private_trait_xc.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/pub_static_array.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/rbmtp_cross_crate_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/stability_attribute_issue.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/stability_cfg1.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/stability_cfg2.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/static_priv_by_default.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/struct_field_privacy.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/struct_variant_privacy.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-a-base.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-a-change-lit.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-a-change-significant-cfg.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-a-change-trait-bound.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-a-change-type-arg.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-a-change-type-ret.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-a-change-type-static.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-b.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-uta-base.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-uta-change-use-trait.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/svh-utb.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/tdticc_coherence_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/trait_bounds_on_structs_and_enums_xc.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/trait_impl_conflict.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/trait_safety_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/trait_superkinds_in_metadata.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/two_macros.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/unreachable_variant.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/use_from_trait_xc.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/variant-namespacing.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/weak-lang-items.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/xc_private_method_lib.rs (100%)
 rename src/test/compile-fail/{aux => auxiliary}/xcrate_unit_struct.rs (100%)
 rename src/test/compile-fail/privacy/restricted/{aux => auxiliary}/pub_restricted.rs (100%)
 rename src/test/debuginfo/{aux => auxiliary}/cross_crate_debuginfo_type_uniquing.rs (100%)
 rename src/test/debuginfo/{aux => auxiliary}/cross_crate_spans.rs (100%)
 rename src/test/debuginfo/{aux => auxiliary}/issue13213aux.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/custom_derive_plugin.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/custom_derive_plugin_attr.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/dummy_mir_pass.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/issue-13560-1.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/issue-13560-2.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/issue-13560-3.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/issue-16822.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/issue-18502.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/issue_16723_multiple_items_syntax_ext.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/linkage-visibility.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/lint_for_crate.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/lint_group_plugin_test.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/lint_plugin_test.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/llvm_pass_plugin.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/logging_right_crate.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/lto-syntax-extension-lib.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/lto-syntax-extension-plugin.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/macro_crate_test.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/plugin_args.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/plugin_crate_outlive_expansion_phase.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/plugin_with_plugin_lib.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/procedural_mbe_matching.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/roman_numerals.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/syntax_extension_with_dll_deps_1.rs (100%)
 rename src/test/run-pass-fulldeps/{aux => auxiliary}/syntax_extension_with_dll_deps_2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/allocator-dummy.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/anon-extern-mod-cross-crate-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/anon_trait_static_method_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/associated-const-cc-lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/associated-types-cc-lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/augmented_assignments.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/blind-item-mixed-crate-use-item-foo.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/blind-item-mixed-crate-use-item-foo2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_borrow_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_capture_clause.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_class.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_class_2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_class_3.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_class_4.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_class_6.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_class_cast.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_class_trait.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_const.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_const_block.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_impl_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_intrinsic.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_iter_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_nested_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cci_no_inline_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cfg_inner_static.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cgu_test.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cgu_test_a.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/cgu_test_b.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/check_static_recursion_foreign_helper.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/coherence_copy_like_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/coherence_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/const_fn_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/crate-attributes-using-cfg_attr.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/crate-method-reexport-grrrrrrr2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/default_type_params_xc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/derive-no-std.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/empty-struct.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/explicit_self_xcrate.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/extern-crosscrate-source.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/extern-take-value.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/extern_calling_convention.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/extern_mod_ordering_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/fat_drop.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/fn-abi.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/foreign_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/go_trait.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/i8.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/impl_privacy_xc_1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/impl_privacy_xc_2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/inline_dtor.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/inner_static.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/iss.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-10028.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-11224.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-11225-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-11225-2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-11225-3.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-11508.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-11529.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-12133-dylib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-12133-dylib2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-12133-rlib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-12660-aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-13620-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-13620-2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-13872-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-13872-2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-13872-3.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-14344-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-14344-2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-14421.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-14422.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-15562.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-16643.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-17662.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-17718-aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-18501.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-18514.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-18711.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-18913-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-18913-2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-19340-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-2380.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-2414-a.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-2414-b.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-25185-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-25185-2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-2526.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-25467.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-2631-a.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-29485.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-3012-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-31702-1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-31702-2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-4208-cc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-4545.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-5518.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-5521.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-7178.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-7899.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-8044.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-8259.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-9906.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue-9968.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue13507.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue2170lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_10031_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_12612_1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_12612_2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_19293.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_20389.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_2316_a.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_2316_b.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_2472_b.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_2723_a.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_3136_a.rc (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_3136_a.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_3979_traits.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_8401.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_9123.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_9155.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/issue_9188.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/kinds_in_metadata.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/linkage1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro-include-items-expr.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro-include-items-item.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro_crate_def_only.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro_crate_nonterminal.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro_export_inner_module.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro_reexport_1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro_reexport_2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro_reexport_2_no_use.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/macro_with_super_1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/method_self_arg1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/method_self_arg2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/mir_external_refs.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/moves_based_on_type_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/msvc-data-only-lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/namespaced_enum_emulate_flat.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/namespaced_enums.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/nested_item.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/newtype_struct_xc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/overloaded_autoderef_xc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/packed.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/priv-impl-prim-ty.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/privacy_reexport.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/pub_use_mods_xcrate.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/pub_use_xcrate1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/pub_use_xcrate2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/reachable-unnameable-items.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/reexport-should-still-link.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/reexported_static_methods.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/sepcomp-extern-lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/sepcomp_cci_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/sepcomp_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/static-function-pointer-aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/static-methods-crate.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/static_fn_inline_xc_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/static_fn_trait_xc_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/static_mut_xc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/struct_destructuring_cross_crate.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/struct_variant_xc_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-a-base.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-a-comment.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-a-doc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-a-macro.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-a-no-change.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-a-redundant-cfg.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-a-whitespace.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/svh-b.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/thread-local-extern-static.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_default_method_xc_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_default_method_xc_aux_2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_inheritance_auto_xc_2_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_inheritance_auto_xc_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_inheritance_cross_trait_call_xc_aux.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_inheritance_overloading_xc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_safety_lib.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/trait_superkinds_in_metadata.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/traitimpl.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/two_macros.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/typeid-intrinsic-aux1.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/typeid-intrinsic-aux2.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/unboxed-closures-cross-crate.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/weak-lang-items.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/where_clauses_xc.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/xcrate-trait-lifetime-param.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/xcrate_address_insignificant.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/xcrate_associated_type_defaults.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/xcrate_static_addresses.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/xcrate_struct_aliases.rs (100%)
 rename src/test/run-pass/{aux => auxiliary}/xcrate_unit_struct.rs (100%)
 rename src/test/run-pass/import-crate-with-invalid-spans/{aux => auxiliary}/crate_with_invalid_spans.rs (100%)
 rename src/test/run-pass/import-crate-with-invalid-spans/{aux => auxiliary}/crate_with_invalid_spans_macros.rs (100%)
 rename src/test/run-pass/issue24687-embed-debuginfo/{aux => auxiliary}/issue24687_lib.rs (100%)
 rename src/test/run-pass/issue24687-embed-debuginfo/{aux => auxiliary}/issue24687_mbcs_in_comments.rs (100%)
 rename src/test/run-pass/specialization/{aux => auxiliary}/go_trait.rs (100%)
 rename src/test/run-pass/specialization/{aux => auxiliary}/specialization_cross_crate.rs (100%)
 rename src/test/run-pass/specialization/{aux => auxiliary}/specialization_cross_crate_defaults.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/empty.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/inline-default-methods.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-13698.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-15318.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-17476.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-19190-3.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-20646.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-20727.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-21092.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-21801.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-22025.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-23207-1.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-23207-2.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-26606-macro.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-27362.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-28927-1.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-28927-2.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-29584.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/issue-30109-1.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/reexp_stripped.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/rustdoc-default-impl.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/rustdoc-extern-default-method.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/rustdoc-extern-method.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/rustdoc-ffi.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/rustdoc-impl-parts-crosscrate.rs (100%)
 rename src/test/rustdoc/{aux => auxiliary}/variant-struct.rs (100%)
 rename src/test/rustdoc/inline_cross/{aux => auxiliary}/issue-33113.rs (100%)
 rename src/test/rustdoc/inline_cross/{aux => auxiliary}/rustdoc-hidden-sig.rs (100%)
 rename src/test/rustdoc/inline_cross/{aux => auxiliary}/rustdoc-hidden.rs (100%)
 rename src/test/rustdoc/inline_cross/{aux => auxiliary}/rustdoc-nonreachable-impls.rs (100%)
 rename src/test/rustdoc/inline_cross/{aux => auxiliary}/rustdoc-trait-object-impl.rs (100%)

diff --git a/src/test/codegen-units/item-collection/aux/cgu_export_trait_method.rs b/src/test/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
similarity index 100%
rename from src/test/codegen-units/item-collection/aux/cgu_export_trait_method.rs
rename to src/test/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
diff --git a/src/test/codegen-units/item-collection/aux/cgu_extern_closures.rs b/src/test/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs
similarity index 100%
rename from src/test/codegen-units/item-collection/aux/cgu_extern_closures.rs
rename to src/test/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs
diff --git a/src/test/codegen-units/item-collection/aux/cgu_generic_function.rs b/src/test/codegen-units/item-collection/auxiliary/cgu_generic_function.rs
similarity index 100%
rename from src/test/codegen-units/item-collection/aux/cgu_generic_function.rs
rename to src/test/codegen-units/item-collection/auxiliary/cgu_generic_function.rs
diff --git a/src/test/codegen-units/partitioning/aux/cgu_explicit_inlining.rs b/src/test/codegen-units/partitioning/auxiliary/cgu_explicit_inlining.rs
similarity index 100%
rename from src/test/codegen-units/partitioning/aux/cgu_explicit_inlining.rs
rename to src/test/codegen-units/partitioning/auxiliary/cgu_explicit_inlining.rs
diff --git a/src/test/codegen-units/partitioning/aux/cgu_extern_drop_glue.rs b/src/test/codegen-units/partitioning/auxiliary/cgu_extern_drop_glue.rs
similarity index 100%
rename from src/test/codegen-units/partitioning/aux/cgu_extern_drop_glue.rs
rename to src/test/codegen-units/partitioning/auxiliary/cgu_extern_drop_glue.rs
diff --git a/src/test/codegen-units/partitioning/aux/cgu_generic_function.rs b/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs
similarity index 100%
rename from src/test/codegen-units/partitioning/aux/cgu_generic_function.rs
rename to src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs
diff --git a/src/test/compile-fail-fulldeps/aux/attr_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/attr_plugin_test.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/attr_plugin_test.rs
rename to src/test/compile-fail-fulldeps/auxiliary/attr_plugin_test.rs
diff --git a/src/test/compile-fail-fulldeps/aux/lint_for_crate.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/lint_for_crate.rs
rename to src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs
diff --git a/src/test/compile-fail-fulldeps/aux/lint_group_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/lint_group_plugin_test.rs
rename to src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs
diff --git a/src/test/compile-fail-fulldeps/aux/lint_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/lint_plugin_test.rs
rename to src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs
diff --git a/src/test/compile-fail-fulldeps/aux/macro_crate_MacroRulesTT.rs b/src/test/compile-fail-fulldeps/auxiliary/macro_crate_MacroRulesTT.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/macro_crate_MacroRulesTT.rs
rename to src/test/compile-fail-fulldeps/auxiliary/macro_crate_MacroRulesTT.rs
diff --git a/src/test/compile-fail-fulldeps/aux/macro_crate_test.rs b/src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/macro_crate_test.rs
rename to src/test/compile-fail-fulldeps/auxiliary/macro_crate_test.rs
diff --git a/src/test/compile-fail-fulldeps/aux/macro_reexport_1.rs b/src/test/compile-fail-fulldeps/auxiliary/macro_reexport_1.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/macro_reexport_1.rs
rename to src/test/compile-fail-fulldeps/auxiliary/macro_reexport_1.rs
diff --git a/src/test/compile-fail-fulldeps/aux/rlib_crate_test.rs b/src/test/compile-fail-fulldeps/auxiliary/rlib_crate_test.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/rlib_crate_test.rs
rename to src/test/compile-fail-fulldeps/auxiliary/rlib_crate_test.rs
diff --git a/src/test/compile-fail-fulldeps/aux/use_from_trait_xc.rs b/src/test/compile-fail-fulldeps/auxiliary/use_from_trait_xc.rs
similarity index 100%
rename from src/test/compile-fail-fulldeps/aux/use_from_trait_xc.rs
rename to src/test/compile-fail-fulldeps/auxiliary/use_from_trait_xc.rs
diff --git a/src/test/compile-fail/aux/allocator-dylib.rs b/src/test/compile-fail/auxiliary/allocator-dylib.rs
similarity index 100%
rename from src/test/compile-fail/aux/allocator-dylib.rs
rename to src/test/compile-fail/auxiliary/allocator-dylib.rs
diff --git a/src/test/compile-fail/aux/allocator-dylib2.rs b/src/test/compile-fail/auxiliary/allocator-dylib2.rs
similarity index 100%
rename from src/test/compile-fail/aux/allocator-dylib2.rs
rename to src/test/compile-fail/auxiliary/allocator-dylib2.rs
diff --git a/src/test/compile-fail/aux/allocator1.rs b/src/test/compile-fail/auxiliary/allocator1.rs
similarity index 100%
rename from src/test/compile-fail/aux/allocator1.rs
rename to src/test/compile-fail/auxiliary/allocator1.rs
diff --git a/src/test/compile-fail/aux/allocator2.rs b/src/test/compile-fail/auxiliary/allocator2.rs
similarity index 100%
rename from src/test/compile-fail/aux/allocator2.rs
rename to src/test/compile-fail/auxiliary/allocator2.rs
diff --git a/src/test/compile-fail/aux/allocator3.rs b/src/test/compile-fail/auxiliary/allocator3.rs
similarity index 100%
rename from src/test/compile-fail/aux/allocator3.rs
rename to src/test/compile-fail/auxiliary/allocator3.rs
diff --git a/src/test/compile-fail/aux/ambig_impl_2_lib.rs b/src/test/compile-fail/auxiliary/ambig_impl_2_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/ambig_impl_2_lib.rs
rename to src/test/compile-fail/auxiliary/ambig_impl_2_lib.rs
diff --git a/src/test/compile-fail/aux/cci_class.rs b/src/test/compile-fail/auxiliary/cci_class.rs
similarity index 100%
rename from src/test/compile-fail/aux/cci_class.rs
rename to src/test/compile-fail/auxiliary/cci_class.rs
diff --git a/src/test/compile-fail/aux/cci_class_5.rs b/src/test/compile-fail/auxiliary/cci_class_5.rs
similarity index 100%
rename from src/test/compile-fail/aux/cci_class_5.rs
rename to src/test/compile-fail/auxiliary/cci_class_5.rs
diff --git a/src/test/compile-fail/aux/changing-crates-a1.rs b/src/test/compile-fail/auxiliary/changing-crates-a1.rs
similarity index 100%
rename from src/test/compile-fail/aux/changing-crates-a1.rs
rename to src/test/compile-fail/auxiliary/changing-crates-a1.rs
diff --git a/src/test/compile-fail/aux/changing-crates-a2.rs b/src/test/compile-fail/auxiliary/changing-crates-a2.rs
similarity index 100%
rename from src/test/compile-fail/aux/changing-crates-a2.rs
rename to src/test/compile-fail/auxiliary/changing-crates-a2.rs
diff --git a/src/test/compile-fail/aux/changing-crates-b.rs b/src/test/compile-fail/auxiliary/changing-crates-b.rs
similarity index 100%
rename from src/test/compile-fail/aux/changing-crates-b.rs
rename to src/test/compile-fail/auxiliary/changing-crates-b.rs
diff --git a/src/test/compile-fail/aux/coherence_copy_like_lib.rs b/src/test/compile-fail/auxiliary/coherence_copy_like_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/coherence_copy_like_lib.rs
rename to src/test/compile-fail/auxiliary/coherence_copy_like_lib.rs
diff --git a/src/test/compile-fail/aux/coherence_inherent_cc_lib.rs b/src/test/compile-fail/auxiliary/coherence_inherent_cc_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/coherence_inherent_cc_lib.rs
rename to src/test/compile-fail/auxiliary/coherence_inherent_cc_lib.rs
diff --git a/src/test/compile-fail/aux/coherence_lib.rs b/src/test/compile-fail/auxiliary/coherence_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/coherence_lib.rs
rename to src/test/compile-fail/auxiliary/coherence_lib.rs
diff --git a/src/test/compile-fail/aux/coherence_orphan_lib.rs b/src/test/compile-fail/auxiliary/coherence_orphan_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/coherence_orphan_lib.rs
rename to src/test/compile-fail/auxiliary/coherence_orphan_lib.rs
diff --git a/src/test/compile-fail/aux/const_fn_lib.rs b/src/test/compile-fail/auxiliary/const_fn_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/const_fn_lib.rs
rename to src/test/compile-fail/auxiliary/const_fn_lib.rs
diff --git a/src/test/compile-fail/aux/crate_a1.rs b/src/test/compile-fail/auxiliary/crate_a1.rs
similarity index 100%
rename from src/test/compile-fail/aux/crate_a1.rs
rename to src/test/compile-fail/auxiliary/crate_a1.rs
diff --git a/src/test/compile-fail/aux/crate_a2.rs b/src/test/compile-fail/auxiliary/crate_a2.rs
similarity index 100%
rename from src/test/compile-fail/aux/crate_a2.rs
rename to src/test/compile-fail/auxiliary/crate_a2.rs
diff --git a/src/test/compile-fail/aux/crateresolve1-1.rs b/src/test/compile-fail/auxiliary/crateresolve1-1.rs
similarity index 100%
rename from src/test/compile-fail/aux/crateresolve1-1.rs
rename to src/test/compile-fail/auxiliary/crateresolve1-1.rs
diff --git a/src/test/compile-fail/aux/crateresolve1-2.rs b/src/test/compile-fail/auxiliary/crateresolve1-2.rs
similarity index 100%
rename from src/test/compile-fail/aux/crateresolve1-2.rs
rename to src/test/compile-fail/auxiliary/crateresolve1-2.rs
diff --git a/src/test/compile-fail/aux/crateresolve1-3.rs b/src/test/compile-fail/auxiliary/crateresolve1-3.rs
similarity index 100%
rename from src/test/compile-fail/aux/crateresolve1-3.rs
rename to src/test/compile-fail/auxiliary/crateresolve1-3.rs
diff --git a/src/test/compile-fail/aux/default_ty_param_cross_crate_crate.rs b/src/test/compile-fail/auxiliary/default_ty_param_cross_crate_crate.rs
similarity index 100%
rename from src/test/compile-fail/aux/default_ty_param_cross_crate_crate.rs
rename to src/test/compile-fail/auxiliary/default_ty_param_cross_crate_crate.rs
diff --git a/src/test/compile-fail/aux/deprecation-lint.rs b/src/test/compile-fail/auxiliary/deprecation-lint.rs
similarity index 100%
rename from src/test/compile-fail/aux/deprecation-lint.rs
rename to src/test/compile-fail/auxiliary/deprecation-lint.rs
diff --git a/src/test/compile-fail/aux/empty-struct.rs b/src/test/compile-fail/auxiliary/empty-struct.rs
similarity index 100%
rename from src/test/compile-fail/aux/empty-struct.rs
rename to src/test/compile-fail/auxiliary/empty-struct.rs
diff --git a/src/test/compile-fail/aux/go_trait.rs b/src/test/compile-fail/auxiliary/go_trait.rs
similarity index 100%
rename from src/test/compile-fail/aux/go_trait.rs
rename to src/test/compile-fail/auxiliary/go_trait.rs
diff --git a/src/test/compile-fail/aux/inherited_stability.rs b/src/test/compile-fail/auxiliary/inherited_stability.rs
similarity index 100%
rename from src/test/compile-fail/aux/inherited_stability.rs
rename to src/test/compile-fail/auxiliary/inherited_stability.rs
diff --git a/src/test/compile-fail/aux/internal_unstable.rs b/src/test/compile-fail/auxiliary/internal_unstable.rs
similarity index 100%
rename from src/test/compile-fail/aux/internal_unstable.rs
rename to src/test/compile-fail/auxiliary/internal_unstable.rs
diff --git a/src/test/compile-fail/aux/issue-19163.rs b/src/test/compile-fail/auxiliary/issue-19163.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue-19163.rs
rename to src/test/compile-fail/auxiliary/issue-19163.rs
diff --git a/src/test/compile-fail/aux/issue-21146-inc.rs b/src/test/compile-fail/auxiliary/issue-21146-inc.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue-21146-inc.rs
rename to src/test/compile-fail/auxiliary/issue-21146-inc.rs
diff --git a/src/test/compile-fail/aux/issue-21221-3.rs b/src/test/compile-fail/auxiliary/issue-21221-3.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue-21221-3.rs
rename to src/test/compile-fail/auxiliary/issue-21221-3.rs
diff --git a/src/test/compile-fail/aux/issue-21221-4.rs b/src/test/compile-fail/auxiliary/issue-21221-4.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue-21221-4.rs
rename to src/test/compile-fail/auxiliary/issue-21221-4.rs
diff --git a/src/test/compile-fail/aux/issue-29181.rs b/src/test/compile-fail/auxiliary/issue-29181.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue-29181.rs
rename to src/test/compile-fail/auxiliary/issue-29181.rs
diff --git a/src/test/compile-fail/aux/issue-30535.rs b/src/test/compile-fail/auxiliary/issue-30535.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue-30535.rs
rename to src/test/compile-fail/auxiliary/issue-30535.rs
diff --git a/src/test/compile-fail/aux/issue_11680.rs b/src/test/compile-fail/auxiliary/issue_11680.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_11680.rs
rename to src/test/compile-fail/auxiliary/issue_11680.rs
diff --git a/src/test/compile-fail/aux/issue_12612_1.rs b/src/test/compile-fail/auxiliary/issue_12612_1.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_12612_1.rs
rename to src/test/compile-fail/auxiliary/issue_12612_1.rs
diff --git a/src/test/compile-fail/aux/issue_16725.rs b/src/test/compile-fail/auxiliary/issue_16725.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_16725.rs
rename to src/test/compile-fail/auxiliary/issue_16725.rs
diff --git a/src/test/compile-fail/aux/issue_17718_const_privacy.rs b/src/test/compile-fail/auxiliary/issue_17718_const_privacy.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_17718_const_privacy.rs
rename to src/test/compile-fail/auxiliary/issue_17718_const_privacy.rs
diff --git a/src/test/compile-fail/aux/issue_21202.rs b/src/test/compile-fail/auxiliary/issue_21202.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_21202.rs
rename to src/test/compile-fail/auxiliary/issue_21202.rs
diff --git a/src/test/compile-fail/aux/issue_30123_aux.rs b/src/test/compile-fail/auxiliary/issue_30123_aux.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_30123_aux.rs
rename to src/test/compile-fail/auxiliary/issue_30123_aux.rs
diff --git a/src/test/compile-fail/aux/issue_3907.rs b/src/test/compile-fail/auxiliary/issue_3907.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_3907.rs
rename to src/test/compile-fail/auxiliary/issue_3907.rs
diff --git a/src/test/compile-fail/aux/issue_5844_aux.rs b/src/test/compile-fail/auxiliary/issue_5844_aux.rs
similarity index 100%
rename from src/test/compile-fail/aux/issue_5844_aux.rs
rename to src/test/compile-fail/auxiliary/issue_5844_aux.rs
diff --git a/src/test/compile-fail/aux/lifetime_bound_will_change_warning_lib.rs b/src/test/compile-fail/auxiliary/lifetime_bound_will_change_warning_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/lifetime_bound_will_change_warning_lib.rs
rename to src/test/compile-fail/auxiliary/lifetime_bound_will_change_warning_lib.rs
diff --git a/src/test/compile-fail/aux/lint_output_format.rs b/src/test/compile-fail/auxiliary/lint_output_format.rs
similarity index 100%
rename from src/test/compile-fail/aux/lint_output_format.rs
rename to src/test/compile-fail/auxiliary/lint_output_format.rs
diff --git a/src/test/compile-fail/aux/lint_stability.rs b/src/test/compile-fail/auxiliary/lint_stability.rs
similarity index 100%
rename from src/test/compile-fail/aux/lint_stability.rs
rename to src/test/compile-fail/auxiliary/lint_stability.rs
diff --git a/src/test/compile-fail/aux/lint_stability_fields.rs b/src/test/compile-fail/auxiliary/lint_stability_fields.rs
similarity index 100%
rename from src/test/compile-fail/aux/lint_stability_fields.rs
rename to src/test/compile-fail/auxiliary/lint_stability_fields.rs
diff --git a/src/test/compile-fail/aux/lint_unused_extern_crate.rs b/src/test/compile-fail/auxiliary/lint_unused_extern_crate.rs
similarity index 100%
rename from src/test/compile-fail/aux/lint_unused_extern_crate.rs
rename to src/test/compile-fail/auxiliary/lint_unused_extern_crate.rs
diff --git a/src/test/compile-fail/aux/macro_crate_nonterminal.rs b/src/test/compile-fail/auxiliary/macro_crate_nonterminal.rs
similarity index 100%
rename from src/test/compile-fail/aux/macro_crate_nonterminal.rs
rename to src/test/compile-fail/auxiliary/macro_crate_nonterminal.rs
diff --git a/src/test/compile-fail/aux/macro_non_reexport_2.rs b/src/test/compile-fail/auxiliary/macro_non_reexport_2.rs
similarity index 100%
rename from src/test/compile-fail/aux/macro_non_reexport_2.rs
rename to src/test/compile-fail/auxiliary/macro_non_reexport_2.rs
diff --git a/src/test/compile-fail/aux/macro_reexport_1.rs b/src/test/compile-fail/auxiliary/macro_reexport_1.rs
similarity index 100%
rename from src/test/compile-fail/aux/macro_reexport_1.rs
rename to src/test/compile-fail/auxiliary/macro_reexport_1.rs
diff --git a/src/test/compile-fail/aux/namespaced_enums.rs b/src/test/compile-fail/auxiliary/namespaced_enums.rs
similarity index 100%
rename from src/test/compile-fail/aux/namespaced_enums.rs
rename to src/test/compile-fail/auxiliary/namespaced_enums.rs
diff --git a/src/test/compile-fail/aux/needs_allocator.rs b/src/test/compile-fail/auxiliary/needs_allocator.rs
similarity index 100%
rename from src/test/compile-fail/aux/needs_allocator.rs
rename to src/test/compile-fail/auxiliary/needs_allocator.rs
diff --git a/src/test/compile-fail/aux/no_method_suggested_traits.rs b/src/test/compile-fail/auxiliary/no_method_suggested_traits.rs
similarity index 100%
rename from src/test/compile-fail/aux/no_method_suggested_traits.rs
rename to src/test/compile-fail/auxiliary/no_method_suggested_traits.rs
diff --git a/src/test/compile-fail/aux/noexporttypelib.rs b/src/test/compile-fail/auxiliary/noexporttypelib.rs
similarity index 100%
rename from src/test/compile-fail/aux/noexporttypelib.rs
rename to src/test/compile-fail/auxiliary/noexporttypelib.rs
diff --git a/src/test/compile-fail/aux/orphan_check_diagnostics.rs b/src/test/compile-fail/auxiliary/orphan_check_diagnostics.rs
similarity index 100%
rename from src/test/compile-fail/aux/orphan_check_diagnostics.rs
rename to src/test/compile-fail/auxiliary/orphan_check_diagnostics.rs
diff --git a/src/test/compile-fail/aux/privacy_tuple_struct.rs b/src/test/compile-fail/auxiliary/privacy_tuple_struct.rs
similarity index 100%
rename from src/test/compile-fail/aux/privacy_tuple_struct.rs
rename to src/test/compile-fail/auxiliary/privacy_tuple_struct.rs
diff --git a/src/test/compile-fail/aux/private_trait_xc.rs b/src/test/compile-fail/auxiliary/private_trait_xc.rs
similarity index 100%
rename from src/test/compile-fail/aux/private_trait_xc.rs
rename to src/test/compile-fail/auxiliary/private_trait_xc.rs
diff --git a/src/test/compile-fail/aux/pub_static_array.rs b/src/test/compile-fail/auxiliary/pub_static_array.rs
similarity index 100%
rename from src/test/compile-fail/aux/pub_static_array.rs
rename to src/test/compile-fail/auxiliary/pub_static_array.rs
diff --git a/src/test/compile-fail/aux/rbmtp_cross_crate_lib.rs b/src/test/compile-fail/auxiliary/rbmtp_cross_crate_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/rbmtp_cross_crate_lib.rs
rename to src/test/compile-fail/auxiliary/rbmtp_cross_crate_lib.rs
diff --git a/src/test/compile-fail/aux/stability_attribute_issue.rs b/src/test/compile-fail/auxiliary/stability_attribute_issue.rs
similarity index 100%
rename from src/test/compile-fail/aux/stability_attribute_issue.rs
rename to src/test/compile-fail/auxiliary/stability_attribute_issue.rs
diff --git a/src/test/compile-fail/aux/stability_cfg1.rs b/src/test/compile-fail/auxiliary/stability_cfg1.rs
similarity index 100%
rename from src/test/compile-fail/aux/stability_cfg1.rs
rename to src/test/compile-fail/auxiliary/stability_cfg1.rs
diff --git a/src/test/compile-fail/aux/stability_cfg2.rs b/src/test/compile-fail/auxiliary/stability_cfg2.rs
similarity index 100%
rename from src/test/compile-fail/aux/stability_cfg2.rs
rename to src/test/compile-fail/auxiliary/stability_cfg2.rs
diff --git a/src/test/compile-fail/aux/static_priv_by_default.rs b/src/test/compile-fail/auxiliary/static_priv_by_default.rs
similarity index 100%
rename from src/test/compile-fail/aux/static_priv_by_default.rs
rename to src/test/compile-fail/auxiliary/static_priv_by_default.rs
diff --git a/src/test/compile-fail/aux/struct_field_privacy.rs b/src/test/compile-fail/auxiliary/struct_field_privacy.rs
similarity index 100%
rename from src/test/compile-fail/aux/struct_field_privacy.rs
rename to src/test/compile-fail/auxiliary/struct_field_privacy.rs
diff --git a/src/test/compile-fail/aux/struct_variant_privacy.rs b/src/test/compile-fail/auxiliary/struct_variant_privacy.rs
similarity index 100%
rename from src/test/compile-fail/aux/struct_variant_privacy.rs
rename to src/test/compile-fail/auxiliary/struct_variant_privacy.rs
diff --git a/src/test/compile-fail/aux/svh-a-base.rs b/src/test/compile-fail/auxiliary/svh-a-base.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-a-base.rs
rename to src/test/compile-fail/auxiliary/svh-a-base.rs
diff --git a/src/test/compile-fail/aux/svh-a-change-lit.rs b/src/test/compile-fail/auxiliary/svh-a-change-lit.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-a-change-lit.rs
rename to src/test/compile-fail/auxiliary/svh-a-change-lit.rs
diff --git a/src/test/compile-fail/aux/svh-a-change-significant-cfg.rs b/src/test/compile-fail/auxiliary/svh-a-change-significant-cfg.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-a-change-significant-cfg.rs
rename to src/test/compile-fail/auxiliary/svh-a-change-significant-cfg.rs
diff --git a/src/test/compile-fail/aux/svh-a-change-trait-bound.rs b/src/test/compile-fail/auxiliary/svh-a-change-trait-bound.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-a-change-trait-bound.rs
rename to src/test/compile-fail/auxiliary/svh-a-change-trait-bound.rs
diff --git a/src/test/compile-fail/aux/svh-a-change-type-arg.rs b/src/test/compile-fail/auxiliary/svh-a-change-type-arg.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-a-change-type-arg.rs
rename to src/test/compile-fail/auxiliary/svh-a-change-type-arg.rs
diff --git a/src/test/compile-fail/aux/svh-a-change-type-ret.rs b/src/test/compile-fail/auxiliary/svh-a-change-type-ret.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-a-change-type-ret.rs
rename to src/test/compile-fail/auxiliary/svh-a-change-type-ret.rs
diff --git a/src/test/compile-fail/aux/svh-a-change-type-static.rs b/src/test/compile-fail/auxiliary/svh-a-change-type-static.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-a-change-type-static.rs
rename to src/test/compile-fail/auxiliary/svh-a-change-type-static.rs
diff --git a/src/test/compile-fail/aux/svh-b.rs b/src/test/compile-fail/auxiliary/svh-b.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-b.rs
rename to src/test/compile-fail/auxiliary/svh-b.rs
diff --git a/src/test/compile-fail/aux/svh-uta-base.rs b/src/test/compile-fail/auxiliary/svh-uta-base.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-uta-base.rs
rename to src/test/compile-fail/auxiliary/svh-uta-base.rs
diff --git a/src/test/compile-fail/aux/svh-uta-change-use-trait.rs b/src/test/compile-fail/auxiliary/svh-uta-change-use-trait.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-uta-change-use-trait.rs
rename to src/test/compile-fail/auxiliary/svh-uta-change-use-trait.rs
diff --git a/src/test/compile-fail/aux/svh-utb.rs b/src/test/compile-fail/auxiliary/svh-utb.rs
similarity index 100%
rename from src/test/compile-fail/aux/svh-utb.rs
rename to src/test/compile-fail/auxiliary/svh-utb.rs
diff --git a/src/test/compile-fail/aux/tdticc_coherence_lib.rs b/src/test/compile-fail/auxiliary/tdticc_coherence_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/tdticc_coherence_lib.rs
rename to src/test/compile-fail/auxiliary/tdticc_coherence_lib.rs
diff --git a/src/test/compile-fail/aux/trait_bounds_on_structs_and_enums_xc.rs b/src/test/compile-fail/auxiliary/trait_bounds_on_structs_and_enums_xc.rs
similarity index 100%
rename from src/test/compile-fail/aux/trait_bounds_on_structs_and_enums_xc.rs
rename to src/test/compile-fail/auxiliary/trait_bounds_on_structs_and_enums_xc.rs
diff --git a/src/test/compile-fail/aux/trait_impl_conflict.rs b/src/test/compile-fail/auxiliary/trait_impl_conflict.rs
similarity index 100%
rename from src/test/compile-fail/aux/trait_impl_conflict.rs
rename to src/test/compile-fail/auxiliary/trait_impl_conflict.rs
diff --git a/src/test/compile-fail/aux/trait_safety_lib.rs b/src/test/compile-fail/auxiliary/trait_safety_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/trait_safety_lib.rs
rename to src/test/compile-fail/auxiliary/trait_safety_lib.rs
diff --git a/src/test/compile-fail/aux/trait_superkinds_in_metadata.rs b/src/test/compile-fail/auxiliary/trait_superkinds_in_metadata.rs
similarity index 100%
rename from src/test/compile-fail/aux/trait_superkinds_in_metadata.rs
rename to src/test/compile-fail/auxiliary/trait_superkinds_in_metadata.rs
diff --git a/src/test/compile-fail/aux/two_macros.rs b/src/test/compile-fail/auxiliary/two_macros.rs
similarity index 100%
rename from src/test/compile-fail/aux/two_macros.rs
rename to src/test/compile-fail/auxiliary/two_macros.rs
diff --git a/src/test/compile-fail/aux/unreachable_variant.rs b/src/test/compile-fail/auxiliary/unreachable_variant.rs
similarity index 100%
rename from src/test/compile-fail/aux/unreachable_variant.rs
rename to src/test/compile-fail/auxiliary/unreachable_variant.rs
diff --git a/src/test/compile-fail/aux/use_from_trait_xc.rs b/src/test/compile-fail/auxiliary/use_from_trait_xc.rs
similarity index 100%
rename from src/test/compile-fail/aux/use_from_trait_xc.rs
rename to src/test/compile-fail/auxiliary/use_from_trait_xc.rs
diff --git a/src/test/compile-fail/aux/variant-namespacing.rs b/src/test/compile-fail/auxiliary/variant-namespacing.rs
similarity index 100%
rename from src/test/compile-fail/aux/variant-namespacing.rs
rename to src/test/compile-fail/auxiliary/variant-namespacing.rs
diff --git a/src/test/compile-fail/aux/weak-lang-items.rs b/src/test/compile-fail/auxiliary/weak-lang-items.rs
similarity index 100%
rename from src/test/compile-fail/aux/weak-lang-items.rs
rename to src/test/compile-fail/auxiliary/weak-lang-items.rs
diff --git a/src/test/compile-fail/aux/xc_private_method_lib.rs b/src/test/compile-fail/auxiliary/xc_private_method_lib.rs
similarity index 100%
rename from src/test/compile-fail/aux/xc_private_method_lib.rs
rename to src/test/compile-fail/auxiliary/xc_private_method_lib.rs
diff --git a/src/test/compile-fail/aux/xcrate_unit_struct.rs b/src/test/compile-fail/auxiliary/xcrate_unit_struct.rs
similarity index 100%
rename from src/test/compile-fail/aux/xcrate_unit_struct.rs
rename to src/test/compile-fail/auxiliary/xcrate_unit_struct.rs
diff --git a/src/test/compile-fail/issue-21146.rs b/src/test/compile-fail/issue-21146.rs
index 7ea6f6f18b9..02f128e1f56 100644
--- a/src/test/compile-fail/issue-21146.rs
+++ b/src/test/compile-fail/issue-21146.rs
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 // error-pattern: expected item, found `parse_error`
-include!("aux/issue-21146-inc.rs");
+include!("auxiliary/issue-21146-inc.rs");
 fn main() {}
diff --git a/src/test/compile-fail/privacy/restricted/aux/pub_restricted.rs b/src/test/compile-fail/privacy/restricted/auxiliary/pub_restricted.rs
similarity index 100%
rename from src/test/compile-fail/privacy/restricted/aux/pub_restricted.rs
rename to src/test/compile-fail/privacy/restricted/auxiliary/pub_restricted.rs
diff --git a/src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs b/src/test/debuginfo/auxiliary/cross_crate_debuginfo_type_uniquing.rs
similarity index 100%
rename from src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs
rename to src/test/debuginfo/auxiliary/cross_crate_debuginfo_type_uniquing.rs
diff --git a/src/test/debuginfo/aux/cross_crate_spans.rs b/src/test/debuginfo/auxiliary/cross_crate_spans.rs
similarity index 100%
rename from src/test/debuginfo/aux/cross_crate_spans.rs
rename to src/test/debuginfo/auxiliary/cross_crate_spans.rs
diff --git a/src/test/debuginfo/aux/issue13213aux.rs b/src/test/debuginfo/auxiliary/issue13213aux.rs
similarity index 100%
rename from src/test/debuginfo/aux/issue13213aux.rs
rename to src/test/debuginfo/auxiliary/issue13213aux.rs
diff --git a/src/test/run-pass-fulldeps/aux/custom_derive_plugin.rs b/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/custom_derive_plugin.rs
rename to src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin.rs
diff --git a/src/test/run-pass-fulldeps/aux/custom_derive_plugin_attr.rs b/src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/custom_derive_plugin_attr.rs
rename to src/test/run-pass-fulldeps/auxiliary/custom_derive_plugin_attr.rs
diff --git a/src/test/run-pass-fulldeps/aux/dummy_mir_pass.rs b/src/test/run-pass-fulldeps/auxiliary/dummy_mir_pass.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/dummy_mir_pass.rs
rename to src/test/run-pass-fulldeps/auxiliary/dummy_mir_pass.rs
diff --git a/src/test/run-pass-fulldeps/aux/issue-13560-1.rs b/src/test/run-pass-fulldeps/auxiliary/issue-13560-1.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/issue-13560-1.rs
rename to src/test/run-pass-fulldeps/auxiliary/issue-13560-1.rs
diff --git a/src/test/run-pass-fulldeps/aux/issue-13560-2.rs b/src/test/run-pass-fulldeps/auxiliary/issue-13560-2.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/issue-13560-2.rs
rename to src/test/run-pass-fulldeps/auxiliary/issue-13560-2.rs
diff --git a/src/test/run-pass-fulldeps/aux/issue-13560-3.rs b/src/test/run-pass-fulldeps/auxiliary/issue-13560-3.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/issue-13560-3.rs
rename to src/test/run-pass-fulldeps/auxiliary/issue-13560-3.rs
diff --git a/src/test/run-pass-fulldeps/aux/issue-16822.rs b/src/test/run-pass-fulldeps/auxiliary/issue-16822.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/issue-16822.rs
rename to src/test/run-pass-fulldeps/auxiliary/issue-16822.rs
diff --git a/src/test/run-pass-fulldeps/aux/issue-18502.rs b/src/test/run-pass-fulldeps/auxiliary/issue-18502.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/issue-18502.rs
rename to src/test/run-pass-fulldeps/auxiliary/issue-18502.rs
diff --git a/src/test/run-pass-fulldeps/aux/issue_16723_multiple_items_syntax_ext.rs b/src/test/run-pass-fulldeps/auxiliary/issue_16723_multiple_items_syntax_ext.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/issue_16723_multiple_items_syntax_ext.rs
rename to src/test/run-pass-fulldeps/auxiliary/issue_16723_multiple_items_syntax_ext.rs
diff --git a/src/test/run-pass-fulldeps/aux/linkage-visibility.rs b/src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/linkage-visibility.rs
rename to src/test/run-pass-fulldeps/auxiliary/linkage-visibility.rs
diff --git a/src/test/run-pass-fulldeps/aux/lint_for_crate.rs b/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/lint_for_crate.rs
rename to src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs
diff --git a/src/test/run-pass-fulldeps/aux/lint_group_plugin_test.rs b/src/test/run-pass-fulldeps/auxiliary/lint_group_plugin_test.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/lint_group_plugin_test.rs
rename to src/test/run-pass-fulldeps/auxiliary/lint_group_plugin_test.rs
diff --git a/src/test/run-pass-fulldeps/aux/lint_plugin_test.rs b/src/test/run-pass-fulldeps/auxiliary/lint_plugin_test.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/lint_plugin_test.rs
rename to src/test/run-pass-fulldeps/auxiliary/lint_plugin_test.rs
diff --git a/src/test/run-pass-fulldeps/aux/llvm_pass_plugin.rs b/src/test/run-pass-fulldeps/auxiliary/llvm_pass_plugin.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/llvm_pass_plugin.rs
rename to src/test/run-pass-fulldeps/auxiliary/llvm_pass_plugin.rs
diff --git a/src/test/run-pass-fulldeps/aux/logging_right_crate.rs b/src/test/run-pass-fulldeps/auxiliary/logging_right_crate.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/logging_right_crate.rs
rename to src/test/run-pass-fulldeps/auxiliary/logging_right_crate.rs
diff --git a/src/test/run-pass-fulldeps/aux/lto-syntax-extension-lib.rs b/src/test/run-pass-fulldeps/auxiliary/lto-syntax-extension-lib.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/lto-syntax-extension-lib.rs
rename to src/test/run-pass-fulldeps/auxiliary/lto-syntax-extension-lib.rs
diff --git a/src/test/run-pass-fulldeps/aux/lto-syntax-extension-plugin.rs b/src/test/run-pass-fulldeps/auxiliary/lto-syntax-extension-plugin.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/lto-syntax-extension-plugin.rs
rename to src/test/run-pass-fulldeps/auxiliary/lto-syntax-extension-plugin.rs
diff --git a/src/test/run-pass-fulldeps/aux/macro_crate_test.rs b/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/macro_crate_test.rs
rename to src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs
diff --git a/src/test/run-pass-fulldeps/aux/plugin_args.rs b/src/test/run-pass-fulldeps/auxiliary/plugin_args.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/plugin_args.rs
rename to src/test/run-pass-fulldeps/auxiliary/plugin_args.rs
diff --git a/src/test/run-pass-fulldeps/aux/plugin_crate_outlive_expansion_phase.rs b/src/test/run-pass-fulldeps/auxiliary/plugin_crate_outlive_expansion_phase.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/plugin_crate_outlive_expansion_phase.rs
rename to src/test/run-pass-fulldeps/auxiliary/plugin_crate_outlive_expansion_phase.rs
diff --git a/src/test/run-pass-fulldeps/aux/plugin_with_plugin_lib.rs b/src/test/run-pass-fulldeps/auxiliary/plugin_with_plugin_lib.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/plugin_with_plugin_lib.rs
rename to src/test/run-pass-fulldeps/auxiliary/plugin_with_plugin_lib.rs
diff --git a/src/test/run-pass-fulldeps/aux/procedural_mbe_matching.rs b/src/test/run-pass-fulldeps/auxiliary/procedural_mbe_matching.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/procedural_mbe_matching.rs
rename to src/test/run-pass-fulldeps/auxiliary/procedural_mbe_matching.rs
diff --git a/src/test/run-pass-fulldeps/aux/roman_numerals.rs b/src/test/run-pass-fulldeps/auxiliary/roman_numerals.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/roman_numerals.rs
rename to src/test/run-pass-fulldeps/auxiliary/roman_numerals.rs
diff --git a/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_1.rs b/src/test/run-pass-fulldeps/auxiliary/syntax_extension_with_dll_deps_1.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_1.rs
rename to src/test/run-pass-fulldeps/auxiliary/syntax_extension_with_dll_deps_1.rs
diff --git a/src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_2.rs b/src/test/run-pass-fulldeps/auxiliary/syntax_extension_with_dll_deps_2.rs
similarity index 100%
rename from src/test/run-pass-fulldeps/aux/syntax_extension_with_dll_deps_2.rs
rename to src/test/run-pass-fulldeps/auxiliary/syntax_extension_with_dll_deps_2.rs
diff --git a/src/test/run-pass/aux/allocator-dummy.rs b/src/test/run-pass/auxiliary/allocator-dummy.rs
similarity index 100%
rename from src/test/run-pass/aux/allocator-dummy.rs
rename to src/test/run-pass/auxiliary/allocator-dummy.rs
diff --git a/src/test/run-pass/aux/anon-extern-mod-cross-crate-1.rs b/src/test/run-pass/auxiliary/anon-extern-mod-cross-crate-1.rs
similarity index 100%
rename from src/test/run-pass/aux/anon-extern-mod-cross-crate-1.rs
rename to src/test/run-pass/auxiliary/anon-extern-mod-cross-crate-1.rs
diff --git a/src/test/run-pass/aux/anon_trait_static_method_lib.rs b/src/test/run-pass/auxiliary/anon_trait_static_method_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/anon_trait_static_method_lib.rs
rename to src/test/run-pass/auxiliary/anon_trait_static_method_lib.rs
diff --git a/src/test/run-pass/aux/associated-const-cc-lib.rs b/src/test/run-pass/auxiliary/associated-const-cc-lib.rs
similarity index 100%
rename from src/test/run-pass/aux/associated-const-cc-lib.rs
rename to src/test/run-pass/auxiliary/associated-const-cc-lib.rs
diff --git a/src/test/run-pass/aux/associated-types-cc-lib.rs b/src/test/run-pass/auxiliary/associated-types-cc-lib.rs
similarity index 100%
rename from src/test/run-pass/aux/associated-types-cc-lib.rs
rename to src/test/run-pass/auxiliary/associated-types-cc-lib.rs
diff --git a/src/test/run-pass/aux/augmented_assignments.rs b/src/test/run-pass/auxiliary/augmented_assignments.rs
similarity index 100%
rename from src/test/run-pass/aux/augmented_assignments.rs
rename to src/test/run-pass/auxiliary/augmented_assignments.rs
diff --git a/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo.rs b/src/test/run-pass/auxiliary/blind-item-mixed-crate-use-item-foo.rs
similarity index 100%
rename from src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo.rs
rename to src/test/run-pass/auxiliary/blind-item-mixed-crate-use-item-foo.rs
diff --git a/src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo2.rs b/src/test/run-pass/auxiliary/blind-item-mixed-crate-use-item-foo2.rs
similarity index 100%
rename from src/test/run-pass/aux/blind-item-mixed-crate-use-item-foo2.rs
rename to src/test/run-pass/auxiliary/blind-item-mixed-crate-use-item-foo2.rs
diff --git a/src/test/run-pass/aux/cci_borrow_lib.rs b/src/test/run-pass/auxiliary/cci_borrow_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_borrow_lib.rs
rename to src/test/run-pass/auxiliary/cci_borrow_lib.rs
diff --git a/src/test/run-pass/aux/cci_capture_clause.rs b/src/test/run-pass/auxiliary/cci_capture_clause.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_capture_clause.rs
rename to src/test/run-pass/auxiliary/cci_capture_clause.rs
diff --git a/src/test/run-pass/aux/cci_class.rs b/src/test/run-pass/auxiliary/cci_class.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_class.rs
rename to src/test/run-pass/auxiliary/cci_class.rs
diff --git a/src/test/run-pass/aux/cci_class_2.rs b/src/test/run-pass/auxiliary/cci_class_2.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_class_2.rs
rename to src/test/run-pass/auxiliary/cci_class_2.rs
diff --git a/src/test/run-pass/aux/cci_class_3.rs b/src/test/run-pass/auxiliary/cci_class_3.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_class_3.rs
rename to src/test/run-pass/auxiliary/cci_class_3.rs
diff --git a/src/test/run-pass/aux/cci_class_4.rs b/src/test/run-pass/auxiliary/cci_class_4.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_class_4.rs
rename to src/test/run-pass/auxiliary/cci_class_4.rs
diff --git a/src/test/run-pass/aux/cci_class_6.rs b/src/test/run-pass/auxiliary/cci_class_6.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_class_6.rs
rename to src/test/run-pass/auxiliary/cci_class_6.rs
diff --git a/src/test/run-pass/aux/cci_class_cast.rs b/src/test/run-pass/auxiliary/cci_class_cast.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_class_cast.rs
rename to src/test/run-pass/auxiliary/cci_class_cast.rs
diff --git a/src/test/run-pass/aux/cci_class_trait.rs b/src/test/run-pass/auxiliary/cci_class_trait.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_class_trait.rs
rename to src/test/run-pass/auxiliary/cci_class_trait.rs
diff --git a/src/test/run-pass/aux/cci_const.rs b/src/test/run-pass/auxiliary/cci_const.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_const.rs
rename to src/test/run-pass/auxiliary/cci_const.rs
diff --git a/src/test/run-pass/aux/cci_const_block.rs b/src/test/run-pass/auxiliary/cci_const_block.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_const_block.rs
rename to src/test/run-pass/auxiliary/cci_const_block.rs
diff --git a/src/test/run-pass/aux/cci_impl_lib.rs b/src/test/run-pass/auxiliary/cci_impl_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_impl_lib.rs
rename to src/test/run-pass/auxiliary/cci_impl_lib.rs
diff --git a/src/test/run-pass/aux/cci_intrinsic.rs b/src/test/run-pass/auxiliary/cci_intrinsic.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_intrinsic.rs
rename to src/test/run-pass/auxiliary/cci_intrinsic.rs
diff --git a/src/test/run-pass/aux/cci_iter_lib.rs b/src/test/run-pass/auxiliary/cci_iter_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_iter_lib.rs
rename to src/test/run-pass/auxiliary/cci_iter_lib.rs
diff --git a/src/test/run-pass/aux/cci_nested_lib.rs b/src/test/run-pass/auxiliary/cci_nested_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_nested_lib.rs
rename to src/test/run-pass/auxiliary/cci_nested_lib.rs
diff --git a/src/test/run-pass/aux/cci_no_inline_lib.rs b/src/test/run-pass/auxiliary/cci_no_inline_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/cci_no_inline_lib.rs
rename to src/test/run-pass/auxiliary/cci_no_inline_lib.rs
diff --git a/src/test/run-pass/aux/cfg_inner_static.rs b/src/test/run-pass/auxiliary/cfg_inner_static.rs
similarity index 100%
rename from src/test/run-pass/aux/cfg_inner_static.rs
rename to src/test/run-pass/auxiliary/cfg_inner_static.rs
diff --git a/src/test/run-pass/aux/cgu_test.rs b/src/test/run-pass/auxiliary/cgu_test.rs
similarity index 100%
rename from src/test/run-pass/aux/cgu_test.rs
rename to src/test/run-pass/auxiliary/cgu_test.rs
diff --git a/src/test/run-pass/aux/cgu_test_a.rs b/src/test/run-pass/auxiliary/cgu_test_a.rs
similarity index 100%
rename from src/test/run-pass/aux/cgu_test_a.rs
rename to src/test/run-pass/auxiliary/cgu_test_a.rs
diff --git a/src/test/run-pass/aux/cgu_test_b.rs b/src/test/run-pass/auxiliary/cgu_test_b.rs
similarity index 100%
rename from src/test/run-pass/aux/cgu_test_b.rs
rename to src/test/run-pass/auxiliary/cgu_test_b.rs
diff --git a/src/test/run-pass/aux/check_static_recursion_foreign_helper.rs b/src/test/run-pass/auxiliary/check_static_recursion_foreign_helper.rs
similarity index 100%
rename from src/test/run-pass/aux/check_static_recursion_foreign_helper.rs
rename to src/test/run-pass/auxiliary/check_static_recursion_foreign_helper.rs
diff --git a/src/test/run-pass/aux/coherence_copy_like_lib.rs b/src/test/run-pass/auxiliary/coherence_copy_like_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/coherence_copy_like_lib.rs
rename to src/test/run-pass/auxiliary/coherence_copy_like_lib.rs
diff --git a/src/test/run-pass/aux/coherence_lib.rs b/src/test/run-pass/auxiliary/coherence_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/coherence_lib.rs
rename to src/test/run-pass/auxiliary/coherence_lib.rs
diff --git a/src/test/run-pass/aux/const_fn_lib.rs b/src/test/run-pass/auxiliary/const_fn_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/const_fn_lib.rs
rename to src/test/run-pass/auxiliary/const_fn_lib.rs
diff --git a/src/test/run-pass/aux/crate-attributes-using-cfg_attr.rs b/src/test/run-pass/auxiliary/crate-attributes-using-cfg_attr.rs
similarity index 100%
rename from src/test/run-pass/aux/crate-attributes-using-cfg_attr.rs
rename to src/test/run-pass/auxiliary/crate-attributes-using-cfg_attr.rs
diff --git a/src/test/run-pass/aux/crate-method-reexport-grrrrrrr2.rs b/src/test/run-pass/auxiliary/crate-method-reexport-grrrrrrr2.rs
similarity index 100%
rename from src/test/run-pass/aux/crate-method-reexport-grrrrrrr2.rs
rename to src/test/run-pass/auxiliary/crate-method-reexport-grrrrrrr2.rs
diff --git a/src/test/run-pass/aux/default_type_params_xc.rs b/src/test/run-pass/auxiliary/default_type_params_xc.rs
similarity index 100%
rename from src/test/run-pass/aux/default_type_params_xc.rs
rename to src/test/run-pass/auxiliary/default_type_params_xc.rs
diff --git a/src/test/run-pass/aux/derive-no-std.rs b/src/test/run-pass/auxiliary/derive-no-std.rs
similarity index 100%
rename from src/test/run-pass/aux/derive-no-std.rs
rename to src/test/run-pass/auxiliary/derive-no-std.rs
diff --git a/src/test/run-pass/aux/empty-struct.rs b/src/test/run-pass/auxiliary/empty-struct.rs
similarity index 100%
rename from src/test/run-pass/aux/empty-struct.rs
rename to src/test/run-pass/auxiliary/empty-struct.rs
diff --git a/src/test/run-pass/aux/explicit_self_xcrate.rs b/src/test/run-pass/auxiliary/explicit_self_xcrate.rs
similarity index 100%
rename from src/test/run-pass/aux/explicit_self_xcrate.rs
rename to src/test/run-pass/auxiliary/explicit_self_xcrate.rs
diff --git a/src/test/run-pass/aux/extern-crosscrate-source.rs b/src/test/run-pass/auxiliary/extern-crosscrate-source.rs
similarity index 100%
rename from src/test/run-pass/aux/extern-crosscrate-source.rs
rename to src/test/run-pass/auxiliary/extern-crosscrate-source.rs
diff --git a/src/test/run-pass/aux/extern-take-value.rs b/src/test/run-pass/auxiliary/extern-take-value.rs
similarity index 100%
rename from src/test/run-pass/aux/extern-take-value.rs
rename to src/test/run-pass/auxiliary/extern-take-value.rs
diff --git a/src/test/run-pass/aux/extern_calling_convention.rs b/src/test/run-pass/auxiliary/extern_calling_convention.rs
similarity index 100%
rename from src/test/run-pass/aux/extern_calling_convention.rs
rename to src/test/run-pass/auxiliary/extern_calling_convention.rs
diff --git a/src/test/run-pass/aux/extern_mod_ordering_lib.rs b/src/test/run-pass/auxiliary/extern_mod_ordering_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/extern_mod_ordering_lib.rs
rename to src/test/run-pass/auxiliary/extern_mod_ordering_lib.rs
diff --git a/src/test/run-pass/aux/fat_drop.rs b/src/test/run-pass/auxiliary/fat_drop.rs
similarity index 100%
rename from src/test/run-pass/aux/fat_drop.rs
rename to src/test/run-pass/auxiliary/fat_drop.rs
diff --git a/src/test/run-pass/aux/fn-abi.rs b/src/test/run-pass/auxiliary/fn-abi.rs
similarity index 100%
rename from src/test/run-pass/aux/fn-abi.rs
rename to src/test/run-pass/auxiliary/fn-abi.rs
diff --git a/src/test/run-pass/aux/foreign_lib.rs b/src/test/run-pass/auxiliary/foreign_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/foreign_lib.rs
rename to src/test/run-pass/auxiliary/foreign_lib.rs
diff --git a/src/test/run-pass/aux/go_trait.rs b/src/test/run-pass/auxiliary/go_trait.rs
similarity index 100%
rename from src/test/run-pass/aux/go_trait.rs
rename to src/test/run-pass/auxiliary/go_trait.rs
diff --git a/src/test/run-pass/aux/i8.rs b/src/test/run-pass/auxiliary/i8.rs
similarity index 100%
rename from src/test/run-pass/aux/i8.rs
rename to src/test/run-pass/auxiliary/i8.rs
diff --git a/src/test/run-pass/aux/impl_privacy_xc_1.rs b/src/test/run-pass/auxiliary/impl_privacy_xc_1.rs
similarity index 100%
rename from src/test/run-pass/aux/impl_privacy_xc_1.rs
rename to src/test/run-pass/auxiliary/impl_privacy_xc_1.rs
diff --git a/src/test/run-pass/aux/impl_privacy_xc_2.rs b/src/test/run-pass/auxiliary/impl_privacy_xc_2.rs
similarity index 100%
rename from src/test/run-pass/aux/impl_privacy_xc_2.rs
rename to src/test/run-pass/auxiliary/impl_privacy_xc_2.rs
diff --git a/src/test/run-pass/aux/inline_dtor.rs b/src/test/run-pass/auxiliary/inline_dtor.rs
similarity index 100%
rename from src/test/run-pass/aux/inline_dtor.rs
rename to src/test/run-pass/auxiliary/inline_dtor.rs
diff --git a/src/test/run-pass/aux/inner_static.rs b/src/test/run-pass/auxiliary/inner_static.rs
similarity index 100%
rename from src/test/run-pass/aux/inner_static.rs
rename to src/test/run-pass/auxiliary/inner_static.rs
diff --git a/src/test/run-pass/aux/iss.rs b/src/test/run-pass/auxiliary/iss.rs
similarity index 100%
rename from src/test/run-pass/aux/iss.rs
rename to src/test/run-pass/auxiliary/iss.rs
diff --git a/src/test/run-pass/aux/issue-10028.rs b/src/test/run-pass/auxiliary/issue-10028.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-10028.rs
rename to src/test/run-pass/auxiliary/issue-10028.rs
diff --git a/src/test/run-pass/aux/issue-11224.rs b/src/test/run-pass/auxiliary/issue-11224.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-11224.rs
rename to src/test/run-pass/auxiliary/issue-11224.rs
diff --git a/src/test/run-pass/aux/issue-11225-1.rs b/src/test/run-pass/auxiliary/issue-11225-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-11225-1.rs
rename to src/test/run-pass/auxiliary/issue-11225-1.rs
diff --git a/src/test/run-pass/aux/issue-11225-2.rs b/src/test/run-pass/auxiliary/issue-11225-2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-11225-2.rs
rename to src/test/run-pass/auxiliary/issue-11225-2.rs
diff --git a/src/test/run-pass/aux/issue-11225-3.rs b/src/test/run-pass/auxiliary/issue-11225-3.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-11225-3.rs
rename to src/test/run-pass/auxiliary/issue-11225-3.rs
diff --git a/src/test/run-pass/aux/issue-11508.rs b/src/test/run-pass/auxiliary/issue-11508.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-11508.rs
rename to src/test/run-pass/auxiliary/issue-11508.rs
diff --git a/src/test/run-pass/aux/issue-11529.rs b/src/test/run-pass/auxiliary/issue-11529.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-11529.rs
rename to src/test/run-pass/auxiliary/issue-11529.rs
diff --git a/src/test/run-pass/aux/issue-12133-dylib.rs b/src/test/run-pass/auxiliary/issue-12133-dylib.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-12133-dylib.rs
rename to src/test/run-pass/auxiliary/issue-12133-dylib.rs
diff --git a/src/test/run-pass/aux/issue-12133-dylib2.rs b/src/test/run-pass/auxiliary/issue-12133-dylib2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-12133-dylib2.rs
rename to src/test/run-pass/auxiliary/issue-12133-dylib2.rs
diff --git a/src/test/run-pass/aux/issue-12133-rlib.rs b/src/test/run-pass/auxiliary/issue-12133-rlib.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-12133-rlib.rs
rename to src/test/run-pass/auxiliary/issue-12133-rlib.rs
diff --git a/src/test/run-pass/aux/issue-12660-aux.rs b/src/test/run-pass/auxiliary/issue-12660-aux.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-12660-aux.rs
rename to src/test/run-pass/auxiliary/issue-12660-aux.rs
diff --git a/src/test/run-pass/aux/issue-13620-1.rs b/src/test/run-pass/auxiliary/issue-13620-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-13620-1.rs
rename to src/test/run-pass/auxiliary/issue-13620-1.rs
diff --git a/src/test/run-pass/aux/issue-13620-2.rs b/src/test/run-pass/auxiliary/issue-13620-2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-13620-2.rs
rename to src/test/run-pass/auxiliary/issue-13620-2.rs
diff --git a/src/test/run-pass/aux/issue-13872-1.rs b/src/test/run-pass/auxiliary/issue-13872-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-13872-1.rs
rename to src/test/run-pass/auxiliary/issue-13872-1.rs
diff --git a/src/test/run-pass/aux/issue-13872-2.rs b/src/test/run-pass/auxiliary/issue-13872-2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-13872-2.rs
rename to src/test/run-pass/auxiliary/issue-13872-2.rs
diff --git a/src/test/run-pass/aux/issue-13872-3.rs b/src/test/run-pass/auxiliary/issue-13872-3.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-13872-3.rs
rename to src/test/run-pass/auxiliary/issue-13872-3.rs
diff --git a/src/test/run-pass/aux/issue-14344-1.rs b/src/test/run-pass/auxiliary/issue-14344-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-14344-1.rs
rename to src/test/run-pass/auxiliary/issue-14344-1.rs
diff --git a/src/test/run-pass/aux/issue-14344-2.rs b/src/test/run-pass/auxiliary/issue-14344-2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-14344-2.rs
rename to src/test/run-pass/auxiliary/issue-14344-2.rs
diff --git a/src/test/run-pass/aux/issue-14421.rs b/src/test/run-pass/auxiliary/issue-14421.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-14421.rs
rename to src/test/run-pass/auxiliary/issue-14421.rs
diff --git a/src/test/run-pass/aux/issue-14422.rs b/src/test/run-pass/auxiliary/issue-14422.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-14422.rs
rename to src/test/run-pass/auxiliary/issue-14422.rs
diff --git a/src/test/run-pass/aux/issue-15562.rs b/src/test/run-pass/auxiliary/issue-15562.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-15562.rs
rename to src/test/run-pass/auxiliary/issue-15562.rs
diff --git a/src/test/run-pass/aux/issue-16643.rs b/src/test/run-pass/auxiliary/issue-16643.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-16643.rs
rename to src/test/run-pass/auxiliary/issue-16643.rs
diff --git a/src/test/run-pass/aux/issue-17662.rs b/src/test/run-pass/auxiliary/issue-17662.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-17662.rs
rename to src/test/run-pass/auxiliary/issue-17662.rs
diff --git a/src/test/run-pass/aux/issue-17718-aux.rs b/src/test/run-pass/auxiliary/issue-17718-aux.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-17718-aux.rs
rename to src/test/run-pass/auxiliary/issue-17718-aux.rs
diff --git a/src/test/run-pass/aux/issue-18501.rs b/src/test/run-pass/auxiliary/issue-18501.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-18501.rs
rename to src/test/run-pass/auxiliary/issue-18501.rs
diff --git a/src/test/run-pass/aux/issue-18514.rs b/src/test/run-pass/auxiliary/issue-18514.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-18514.rs
rename to src/test/run-pass/auxiliary/issue-18514.rs
diff --git a/src/test/run-pass/aux/issue-18711.rs b/src/test/run-pass/auxiliary/issue-18711.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-18711.rs
rename to src/test/run-pass/auxiliary/issue-18711.rs
diff --git a/src/test/run-pass/aux/issue-18913-1.rs b/src/test/run-pass/auxiliary/issue-18913-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-18913-1.rs
rename to src/test/run-pass/auxiliary/issue-18913-1.rs
diff --git a/src/test/run-pass/aux/issue-18913-2.rs b/src/test/run-pass/auxiliary/issue-18913-2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-18913-2.rs
rename to src/test/run-pass/auxiliary/issue-18913-2.rs
diff --git a/src/test/run-pass/aux/issue-19340-1.rs b/src/test/run-pass/auxiliary/issue-19340-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-19340-1.rs
rename to src/test/run-pass/auxiliary/issue-19340-1.rs
diff --git a/src/test/run-pass/aux/issue-2380.rs b/src/test/run-pass/auxiliary/issue-2380.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-2380.rs
rename to src/test/run-pass/auxiliary/issue-2380.rs
diff --git a/src/test/run-pass/aux/issue-2414-a.rs b/src/test/run-pass/auxiliary/issue-2414-a.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-2414-a.rs
rename to src/test/run-pass/auxiliary/issue-2414-a.rs
diff --git a/src/test/run-pass/aux/issue-2414-b.rs b/src/test/run-pass/auxiliary/issue-2414-b.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-2414-b.rs
rename to src/test/run-pass/auxiliary/issue-2414-b.rs
diff --git a/src/test/run-pass/aux/issue-25185-1.rs b/src/test/run-pass/auxiliary/issue-25185-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-25185-1.rs
rename to src/test/run-pass/auxiliary/issue-25185-1.rs
diff --git a/src/test/run-pass/aux/issue-25185-2.rs b/src/test/run-pass/auxiliary/issue-25185-2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-25185-2.rs
rename to src/test/run-pass/auxiliary/issue-25185-2.rs
diff --git a/src/test/run-pass/aux/issue-2526.rs b/src/test/run-pass/auxiliary/issue-2526.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-2526.rs
rename to src/test/run-pass/auxiliary/issue-2526.rs
diff --git a/src/test/run-pass/aux/issue-25467.rs b/src/test/run-pass/auxiliary/issue-25467.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-25467.rs
rename to src/test/run-pass/auxiliary/issue-25467.rs
diff --git a/src/test/run-pass/aux/issue-2631-a.rs b/src/test/run-pass/auxiliary/issue-2631-a.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-2631-a.rs
rename to src/test/run-pass/auxiliary/issue-2631-a.rs
diff --git a/src/test/run-pass/aux/issue-29485.rs b/src/test/run-pass/auxiliary/issue-29485.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-29485.rs
rename to src/test/run-pass/auxiliary/issue-29485.rs
diff --git a/src/test/run-pass/aux/issue-3012-1.rs b/src/test/run-pass/auxiliary/issue-3012-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-3012-1.rs
rename to src/test/run-pass/auxiliary/issue-3012-1.rs
diff --git a/src/test/run-pass/aux/issue-31702-1.rs b/src/test/run-pass/auxiliary/issue-31702-1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-31702-1.rs
rename to src/test/run-pass/auxiliary/issue-31702-1.rs
diff --git a/src/test/run-pass/aux/issue-31702-2.rs b/src/test/run-pass/auxiliary/issue-31702-2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-31702-2.rs
rename to src/test/run-pass/auxiliary/issue-31702-2.rs
diff --git a/src/test/run-pass/aux/issue-4208-cc.rs b/src/test/run-pass/auxiliary/issue-4208-cc.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-4208-cc.rs
rename to src/test/run-pass/auxiliary/issue-4208-cc.rs
diff --git a/src/test/run-pass/aux/issue-4545.rs b/src/test/run-pass/auxiliary/issue-4545.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-4545.rs
rename to src/test/run-pass/auxiliary/issue-4545.rs
diff --git a/src/test/run-pass/aux/issue-5518.rs b/src/test/run-pass/auxiliary/issue-5518.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-5518.rs
rename to src/test/run-pass/auxiliary/issue-5518.rs
diff --git a/src/test/run-pass/aux/issue-5521.rs b/src/test/run-pass/auxiliary/issue-5521.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-5521.rs
rename to src/test/run-pass/auxiliary/issue-5521.rs
diff --git a/src/test/run-pass/aux/issue-7178.rs b/src/test/run-pass/auxiliary/issue-7178.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-7178.rs
rename to src/test/run-pass/auxiliary/issue-7178.rs
diff --git a/src/test/run-pass/aux/issue-7899.rs b/src/test/run-pass/auxiliary/issue-7899.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-7899.rs
rename to src/test/run-pass/auxiliary/issue-7899.rs
diff --git a/src/test/run-pass/aux/issue-8044.rs b/src/test/run-pass/auxiliary/issue-8044.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-8044.rs
rename to src/test/run-pass/auxiliary/issue-8044.rs
diff --git a/src/test/run-pass/aux/issue-8259.rs b/src/test/run-pass/auxiliary/issue-8259.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-8259.rs
rename to src/test/run-pass/auxiliary/issue-8259.rs
diff --git a/src/test/run-pass/aux/issue-9906.rs b/src/test/run-pass/auxiliary/issue-9906.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-9906.rs
rename to src/test/run-pass/auxiliary/issue-9906.rs
diff --git a/src/test/run-pass/aux/issue-9968.rs b/src/test/run-pass/auxiliary/issue-9968.rs
similarity index 100%
rename from src/test/run-pass/aux/issue-9968.rs
rename to src/test/run-pass/auxiliary/issue-9968.rs
diff --git a/src/test/run-pass/aux/issue13507.rs b/src/test/run-pass/auxiliary/issue13507.rs
similarity index 100%
rename from src/test/run-pass/aux/issue13507.rs
rename to src/test/run-pass/auxiliary/issue13507.rs
diff --git a/src/test/run-pass/aux/issue2170lib.rs b/src/test/run-pass/auxiliary/issue2170lib.rs
similarity index 100%
rename from src/test/run-pass/aux/issue2170lib.rs
rename to src/test/run-pass/auxiliary/issue2170lib.rs
diff --git a/src/test/run-pass/aux/issue_10031_aux.rs b/src/test/run-pass/auxiliary/issue_10031_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_10031_aux.rs
rename to src/test/run-pass/auxiliary/issue_10031_aux.rs
diff --git a/src/test/run-pass/aux/issue_12612_1.rs b/src/test/run-pass/auxiliary/issue_12612_1.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_12612_1.rs
rename to src/test/run-pass/auxiliary/issue_12612_1.rs
diff --git a/src/test/run-pass/aux/issue_12612_2.rs b/src/test/run-pass/auxiliary/issue_12612_2.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_12612_2.rs
rename to src/test/run-pass/auxiliary/issue_12612_2.rs
diff --git a/src/test/run-pass/aux/issue_19293.rs b/src/test/run-pass/auxiliary/issue_19293.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_19293.rs
rename to src/test/run-pass/auxiliary/issue_19293.rs
diff --git a/src/test/run-pass/aux/issue_20389.rs b/src/test/run-pass/auxiliary/issue_20389.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_20389.rs
rename to src/test/run-pass/auxiliary/issue_20389.rs
diff --git a/src/test/run-pass/aux/issue_2316_a.rs b/src/test/run-pass/auxiliary/issue_2316_a.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_2316_a.rs
rename to src/test/run-pass/auxiliary/issue_2316_a.rs
diff --git a/src/test/run-pass/aux/issue_2316_b.rs b/src/test/run-pass/auxiliary/issue_2316_b.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_2316_b.rs
rename to src/test/run-pass/auxiliary/issue_2316_b.rs
diff --git a/src/test/run-pass/aux/issue_2472_b.rs b/src/test/run-pass/auxiliary/issue_2472_b.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_2472_b.rs
rename to src/test/run-pass/auxiliary/issue_2472_b.rs
diff --git a/src/test/run-pass/aux/issue_2723_a.rs b/src/test/run-pass/auxiliary/issue_2723_a.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_2723_a.rs
rename to src/test/run-pass/auxiliary/issue_2723_a.rs
diff --git a/src/test/run-pass/aux/issue_3136_a.rc b/src/test/run-pass/auxiliary/issue_3136_a.rc
similarity index 100%
rename from src/test/run-pass/aux/issue_3136_a.rc
rename to src/test/run-pass/auxiliary/issue_3136_a.rc
diff --git a/src/test/run-pass/aux/issue_3136_a.rs b/src/test/run-pass/auxiliary/issue_3136_a.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_3136_a.rs
rename to src/test/run-pass/auxiliary/issue_3136_a.rs
diff --git a/src/test/run-pass/aux/issue_3979_traits.rs b/src/test/run-pass/auxiliary/issue_3979_traits.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_3979_traits.rs
rename to src/test/run-pass/auxiliary/issue_3979_traits.rs
diff --git a/src/test/run-pass/aux/issue_8401.rs b/src/test/run-pass/auxiliary/issue_8401.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_8401.rs
rename to src/test/run-pass/auxiliary/issue_8401.rs
diff --git a/src/test/run-pass/aux/issue_9123.rs b/src/test/run-pass/auxiliary/issue_9123.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_9123.rs
rename to src/test/run-pass/auxiliary/issue_9123.rs
diff --git a/src/test/run-pass/aux/issue_9155.rs b/src/test/run-pass/auxiliary/issue_9155.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_9155.rs
rename to src/test/run-pass/auxiliary/issue_9155.rs
diff --git a/src/test/run-pass/aux/issue_9188.rs b/src/test/run-pass/auxiliary/issue_9188.rs
similarity index 100%
rename from src/test/run-pass/aux/issue_9188.rs
rename to src/test/run-pass/auxiliary/issue_9188.rs
diff --git a/src/test/run-pass/aux/kinds_in_metadata.rs b/src/test/run-pass/auxiliary/kinds_in_metadata.rs
similarity index 100%
rename from src/test/run-pass/aux/kinds_in_metadata.rs
rename to src/test/run-pass/auxiliary/kinds_in_metadata.rs
diff --git a/src/test/run-pass/aux/linkage1.rs b/src/test/run-pass/auxiliary/linkage1.rs
similarity index 100%
rename from src/test/run-pass/aux/linkage1.rs
rename to src/test/run-pass/auxiliary/linkage1.rs
diff --git a/src/test/run-pass/aux/macro-include-items-expr.rs b/src/test/run-pass/auxiliary/macro-include-items-expr.rs
similarity index 100%
rename from src/test/run-pass/aux/macro-include-items-expr.rs
rename to src/test/run-pass/auxiliary/macro-include-items-expr.rs
diff --git a/src/test/run-pass/aux/macro-include-items-item.rs b/src/test/run-pass/auxiliary/macro-include-items-item.rs
similarity index 100%
rename from src/test/run-pass/aux/macro-include-items-item.rs
rename to src/test/run-pass/auxiliary/macro-include-items-item.rs
diff --git a/src/test/run-pass/aux/macro_crate_def_only.rs b/src/test/run-pass/auxiliary/macro_crate_def_only.rs
similarity index 100%
rename from src/test/run-pass/aux/macro_crate_def_only.rs
rename to src/test/run-pass/auxiliary/macro_crate_def_only.rs
diff --git a/src/test/run-pass/aux/macro_crate_nonterminal.rs b/src/test/run-pass/auxiliary/macro_crate_nonterminal.rs
similarity index 100%
rename from src/test/run-pass/aux/macro_crate_nonterminal.rs
rename to src/test/run-pass/auxiliary/macro_crate_nonterminal.rs
diff --git a/src/test/run-pass/aux/macro_export_inner_module.rs b/src/test/run-pass/auxiliary/macro_export_inner_module.rs
similarity index 100%
rename from src/test/run-pass/aux/macro_export_inner_module.rs
rename to src/test/run-pass/auxiliary/macro_export_inner_module.rs
diff --git a/src/test/run-pass/aux/macro_reexport_1.rs b/src/test/run-pass/auxiliary/macro_reexport_1.rs
similarity index 100%
rename from src/test/run-pass/aux/macro_reexport_1.rs
rename to src/test/run-pass/auxiliary/macro_reexport_1.rs
diff --git a/src/test/run-pass/aux/macro_reexport_2.rs b/src/test/run-pass/auxiliary/macro_reexport_2.rs
similarity index 100%
rename from src/test/run-pass/aux/macro_reexport_2.rs
rename to src/test/run-pass/auxiliary/macro_reexport_2.rs
diff --git a/src/test/run-pass/aux/macro_reexport_2_no_use.rs b/src/test/run-pass/auxiliary/macro_reexport_2_no_use.rs
similarity index 100%
rename from src/test/run-pass/aux/macro_reexport_2_no_use.rs
rename to src/test/run-pass/auxiliary/macro_reexport_2_no_use.rs
diff --git a/src/test/run-pass/aux/macro_with_super_1.rs b/src/test/run-pass/auxiliary/macro_with_super_1.rs
similarity index 100%
rename from src/test/run-pass/aux/macro_with_super_1.rs
rename to src/test/run-pass/auxiliary/macro_with_super_1.rs
diff --git a/src/test/run-pass/aux/method_self_arg1.rs b/src/test/run-pass/auxiliary/method_self_arg1.rs
similarity index 100%
rename from src/test/run-pass/aux/method_self_arg1.rs
rename to src/test/run-pass/auxiliary/method_self_arg1.rs
diff --git a/src/test/run-pass/aux/method_self_arg2.rs b/src/test/run-pass/auxiliary/method_self_arg2.rs
similarity index 100%
rename from src/test/run-pass/aux/method_self_arg2.rs
rename to src/test/run-pass/auxiliary/method_self_arg2.rs
diff --git a/src/test/run-pass/aux/mir_external_refs.rs b/src/test/run-pass/auxiliary/mir_external_refs.rs
similarity index 100%
rename from src/test/run-pass/aux/mir_external_refs.rs
rename to src/test/run-pass/auxiliary/mir_external_refs.rs
diff --git a/src/test/run-pass/aux/moves_based_on_type_lib.rs b/src/test/run-pass/auxiliary/moves_based_on_type_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/moves_based_on_type_lib.rs
rename to src/test/run-pass/auxiliary/moves_based_on_type_lib.rs
diff --git a/src/test/run-pass/aux/msvc-data-only-lib.rs b/src/test/run-pass/auxiliary/msvc-data-only-lib.rs
similarity index 100%
rename from src/test/run-pass/aux/msvc-data-only-lib.rs
rename to src/test/run-pass/auxiliary/msvc-data-only-lib.rs
diff --git a/src/test/run-pass/aux/namespaced_enum_emulate_flat.rs b/src/test/run-pass/auxiliary/namespaced_enum_emulate_flat.rs
similarity index 100%
rename from src/test/run-pass/aux/namespaced_enum_emulate_flat.rs
rename to src/test/run-pass/auxiliary/namespaced_enum_emulate_flat.rs
diff --git a/src/test/run-pass/aux/namespaced_enums.rs b/src/test/run-pass/auxiliary/namespaced_enums.rs
similarity index 100%
rename from src/test/run-pass/aux/namespaced_enums.rs
rename to src/test/run-pass/auxiliary/namespaced_enums.rs
diff --git a/src/test/run-pass/aux/nested_item.rs b/src/test/run-pass/auxiliary/nested_item.rs
similarity index 100%
rename from src/test/run-pass/aux/nested_item.rs
rename to src/test/run-pass/auxiliary/nested_item.rs
diff --git a/src/test/run-pass/aux/newtype_struct_xc.rs b/src/test/run-pass/auxiliary/newtype_struct_xc.rs
similarity index 100%
rename from src/test/run-pass/aux/newtype_struct_xc.rs
rename to src/test/run-pass/auxiliary/newtype_struct_xc.rs
diff --git a/src/test/run-pass/aux/overloaded_autoderef_xc.rs b/src/test/run-pass/auxiliary/overloaded_autoderef_xc.rs
similarity index 100%
rename from src/test/run-pass/aux/overloaded_autoderef_xc.rs
rename to src/test/run-pass/auxiliary/overloaded_autoderef_xc.rs
diff --git a/src/test/run-pass/aux/packed.rs b/src/test/run-pass/auxiliary/packed.rs
similarity index 100%
rename from src/test/run-pass/aux/packed.rs
rename to src/test/run-pass/auxiliary/packed.rs
diff --git a/src/test/run-pass/aux/priv-impl-prim-ty.rs b/src/test/run-pass/auxiliary/priv-impl-prim-ty.rs
similarity index 100%
rename from src/test/run-pass/aux/priv-impl-prim-ty.rs
rename to src/test/run-pass/auxiliary/priv-impl-prim-ty.rs
diff --git a/src/test/run-pass/aux/privacy_reexport.rs b/src/test/run-pass/auxiliary/privacy_reexport.rs
similarity index 100%
rename from src/test/run-pass/aux/privacy_reexport.rs
rename to src/test/run-pass/auxiliary/privacy_reexport.rs
diff --git a/src/test/run-pass/aux/pub_use_mods_xcrate.rs b/src/test/run-pass/auxiliary/pub_use_mods_xcrate.rs
similarity index 100%
rename from src/test/run-pass/aux/pub_use_mods_xcrate.rs
rename to src/test/run-pass/auxiliary/pub_use_mods_xcrate.rs
diff --git a/src/test/run-pass/aux/pub_use_xcrate1.rs b/src/test/run-pass/auxiliary/pub_use_xcrate1.rs
similarity index 100%
rename from src/test/run-pass/aux/pub_use_xcrate1.rs
rename to src/test/run-pass/auxiliary/pub_use_xcrate1.rs
diff --git a/src/test/run-pass/aux/pub_use_xcrate2.rs b/src/test/run-pass/auxiliary/pub_use_xcrate2.rs
similarity index 100%
rename from src/test/run-pass/aux/pub_use_xcrate2.rs
rename to src/test/run-pass/auxiliary/pub_use_xcrate2.rs
diff --git a/src/test/run-pass/aux/reachable-unnameable-items.rs b/src/test/run-pass/auxiliary/reachable-unnameable-items.rs
similarity index 100%
rename from src/test/run-pass/aux/reachable-unnameable-items.rs
rename to src/test/run-pass/auxiliary/reachable-unnameable-items.rs
diff --git a/src/test/run-pass/aux/reexport-should-still-link.rs b/src/test/run-pass/auxiliary/reexport-should-still-link.rs
similarity index 100%
rename from src/test/run-pass/aux/reexport-should-still-link.rs
rename to src/test/run-pass/auxiliary/reexport-should-still-link.rs
diff --git a/src/test/run-pass/aux/reexported_static_methods.rs b/src/test/run-pass/auxiliary/reexported_static_methods.rs
similarity index 100%
rename from src/test/run-pass/aux/reexported_static_methods.rs
rename to src/test/run-pass/auxiliary/reexported_static_methods.rs
diff --git a/src/test/run-pass/aux/sepcomp-extern-lib.rs b/src/test/run-pass/auxiliary/sepcomp-extern-lib.rs
similarity index 100%
rename from src/test/run-pass/aux/sepcomp-extern-lib.rs
rename to src/test/run-pass/auxiliary/sepcomp-extern-lib.rs
diff --git a/src/test/run-pass/aux/sepcomp_cci_lib.rs b/src/test/run-pass/auxiliary/sepcomp_cci_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/sepcomp_cci_lib.rs
rename to src/test/run-pass/auxiliary/sepcomp_cci_lib.rs
diff --git a/src/test/run-pass/aux/sepcomp_lib.rs b/src/test/run-pass/auxiliary/sepcomp_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/sepcomp_lib.rs
rename to src/test/run-pass/auxiliary/sepcomp_lib.rs
diff --git a/src/test/run-pass/aux/static-function-pointer-aux.rs b/src/test/run-pass/auxiliary/static-function-pointer-aux.rs
similarity index 100%
rename from src/test/run-pass/aux/static-function-pointer-aux.rs
rename to src/test/run-pass/auxiliary/static-function-pointer-aux.rs
diff --git a/src/test/run-pass/aux/static-methods-crate.rs b/src/test/run-pass/auxiliary/static-methods-crate.rs
similarity index 100%
rename from src/test/run-pass/aux/static-methods-crate.rs
rename to src/test/run-pass/auxiliary/static-methods-crate.rs
diff --git a/src/test/run-pass/aux/static_fn_inline_xc_aux.rs b/src/test/run-pass/auxiliary/static_fn_inline_xc_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/static_fn_inline_xc_aux.rs
rename to src/test/run-pass/auxiliary/static_fn_inline_xc_aux.rs
diff --git a/src/test/run-pass/aux/static_fn_trait_xc_aux.rs b/src/test/run-pass/auxiliary/static_fn_trait_xc_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/static_fn_trait_xc_aux.rs
rename to src/test/run-pass/auxiliary/static_fn_trait_xc_aux.rs
diff --git a/src/test/run-pass/aux/static_mut_xc.rs b/src/test/run-pass/auxiliary/static_mut_xc.rs
similarity index 100%
rename from src/test/run-pass/aux/static_mut_xc.rs
rename to src/test/run-pass/auxiliary/static_mut_xc.rs
diff --git a/src/test/run-pass/aux/struct_destructuring_cross_crate.rs b/src/test/run-pass/auxiliary/struct_destructuring_cross_crate.rs
similarity index 100%
rename from src/test/run-pass/aux/struct_destructuring_cross_crate.rs
rename to src/test/run-pass/auxiliary/struct_destructuring_cross_crate.rs
diff --git a/src/test/run-pass/aux/struct_variant_xc_aux.rs b/src/test/run-pass/auxiliary/struct_variant_xc_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/struct_variant_xc_aux.rs
rename to src/test/run-pass/auxiliary/struct_variant_xc_aux.rs
diff --git a/src/test/run-pass/aux/svh-a-base.rs b/src/test/run-pass/auxiliary/svh-a-base.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-a-base.rs
rename to src/test/run-pass/auxiliary/svh-a-base.rs
diff --git a/src/test/run-pass/aux/svh-a-comment.rs b/src/test/run-pass/auxiliary/svh-a-comment.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-a-comment.rs
rename to src/test/run-pass/auxiliary/svh-a-comment.rs
diff --git a/src/test/run-pass/aux/svh-a-doc.rs b/src/test/run-pass/auxiliary/svh-a-doc.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-a-doc.rs
rename to src/test/run-pass/auxiliary/svh-a-doc.rs
diff --git a/src/test/run-pass/aux/svh-a-macro.rs b/src/test/run-pass/auxiliary/svh-a-macro.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-a-macro.rs
rename to src/test/run-pass/auxiliary/svh-a-macro.rs
diff --git a/src/test/run-pass/aux/svh-a-no-change.rs b/src/test/run-pass/auxiliary/svh-a-no-change.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-a-no-change.rs
rename to src/test/run-pass/auxiliary/svh-a-no-change.rs
diff --git a/src/test/run-pass/aux/svh-a-redundant-cfg.rs b/src/test/run-pass/auxiliary/svh-a-redundant-cfg.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-a-redundant-cfg.rs
rename to src/test/run-pass/auxiliary/svh-a-redundant-cfg.rs
diff --git a/src/test/run-pass/aux/svh-a-whitespace.rs b/src/test/run-pass/auxiliary/svh-a-whitespace.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-a-whitespace.rs
rename to src/test/run-pass/auxiliary/svh-a-whitespace.rs
diff --git a/src/test/run-pass/aux/svh-b.rs b/src/test/run-pass/auxiliary/svh-b.rs
similarity index 100%
rename from src/test/run-pass/aux/svh-b.rs
rename to src/test/run-pass/auxiliary/svh-b.rs
diff --git a/src/test/run-pass/aux/thread-local-extern-static.rs b/src/test/run-pass/auxiliary/thread-local-extern-static.rs
similarity index 100%
rename from src/test/run-pass/aux/thread-local-extern-static.rs
rename to src/test/run-pass/auxiliary/thread-local-extern-static.rs
diff --git a/src/test/run-pass/aux/trait_default_method_xc_aux.rs b/src/test/run-pass/auxiliary/trait_default_method_xc_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_default_method_xc_aux.rs
rename to src/test/run-pass/auxiliary/trait_default_method_xc_aux.rs
diff --git a/src/test/run-pass/aux/trait_default_method_xc_aux_2.rs b/src/test/run-pass/auxiliary/trait_default_method_xc_aux_2.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_default_method_xc_aux_2.rs
rename to src/test/run-pass/auxiliary/trait_default_method_xc_aux_2.rs
diff --git a/src/test/run-pass/aux/trait_inheritance_auto_xc_2_aux.rs b/src/test/run-pass/auxiliary/trait_inheritance_auto_xc_2_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_inheritance_auto_xc_2_aux.rs
rename to src/test/run-pass/auxiliary/trait_inheritance_auto_xc_2_aux.rs
diff --git a/src/test/run-pass/aux/trait_inheritance_auto_xc_aux.rs b/src/test/run-pass/auxiliary/trait_inheritance_auto_xc_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_inheritance_auto_xc_aux.rs
rename to src/test/run-pass/auxiliary/trait_inheritance_auto_xc_aux.rs
diff --git a/src/test/run-pass/aux/trait_inheritance_cross_trait_call_xc_aux.rs b/src/test/run-pass/auxiliary/trait_inheritance_cross_trait_call_xc_aux.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_inheritance_cross_trait_call_xc_aux.rs
rename to src/test/run-pass/auxiliary/trait_inheritance_cross_trait_call_xc_aux.rs
diff --git a/src/test/run-pass/aux/trait_inheritance_overloading_xc.rs b/src/test/run-pass/auxiliary/trait_inheritance_overloading_xc.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_inheritance_overloading_xc.rs
rename to src/test/run-pass/auxiliary/trait_inheritance_overloading_xc.rs
diff --git a/src/test/run-pass/aux/trait_safety_lib.rs b/src/test/run-pass/auxiliary/trait_safety_lib.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_safety_lib.rs
rename to src/test/run-pass/auxiliary/trait_safety_lib.rs
diff --git a/src/test/run-pass/aux/trait_superkinds_in_metadata.rs b/src/test/run-pass/auxiliary/trait_superkinds_in_metadata.rs
similarity index 100%
rename from src/test/run-pass/aux/trait_superkinds_in_metadata.rs
rename to src/test/run-pass/auxiliary/trait_superkinds_in_metadata.rs
diff --git a/src/test/run-pass/aux/traitimpl.rs b/src/test/run-pass/auxiliary/traitimpl.rs
similarity index 100%
rename from src/test/run-pass/aux/traitimpl.rs
rename to src/test/run-pass/auxiliary/traitimpl.rs
diff --git a/src/test/run-pass/aux/two_macros.rs b/src/test/run-pass/auxiliary/two_macros.rs
similarity index 100%
rename from src/test/run-pass/aux/two_macros.rs
rename to src/test/run-pass/auxiliary/two_macros.rs
diff --git a/src/test/run-pass/aux/typeid-intrinsic-aux1.rs b/src/test/run-pass/auxiliary/typeid-intrinsic-aux1.rs
similarity index 100%
rename from src/test/run-pass/aux/typeid-intrinsic-aux1.rs
rename to src/test/run-pass/auxiliary/typeid-intrinsic-aux1.rs
diff --git a/src/test/run-pass/aux/typeid-intrinsic-aux2.rs b/src/test/run-pass/auxiliary/typeid-intrinsic-aux2.rs
similarity index 100%
rename from src/test/run-pass/aux/typeid-intrinsic-aux2.rs
rename to src/test/run-pass/auxiliary/typeid-intrinsic-aux2.rs
diff --git a/src/test/run-pass/aux/unboxed-closures-cross-crate.rs b/src/test/run-pass/auxiliary/unboxed-closures-cross-crate.rs
similarity index 100%
rename from src/test/run-pass/aux/unboxed-closures-cross-crate.rs
rename to src/test/run-pass/auxiliary/unboxed-closures-cross-crate.rs
diff --git a/src/test/run-pass/aux/weak-lang-items.rs b/src/test/run-pass/auxiliary/weak-lang-items.rs
similarity index 100%
rename from src/test/run-pass/aux/weak-lang-items.rs
rename to src/test/run-pass/auxiliary/weak-lang-items.rs
diff --git a/src/test/run-pass/aux/where_clauses_xc.rs b/src/test/run-pass/auxiliary/where_clauses_xc.rs
similarity index 100%
rename from src/test/run-pass/aux/where_clauses_xc.rs
rename to src/test/run-pass/auxiliary/where_clauses_xc.rs
diff --git a/src/test/run-pass/aux/xcrate-trait-lifetime-param.rs b/src/test/run-pass/auxiliary/xcrate-trait-lifetime-param.rs
similarity index 100%
rename from src/test/run-pass/aux/xcrate-trait-lifetime-param.rs
rename to src/test/run-pass/auxiliary/xcrate-trait-lifetime-param.rs
diff --git a/src/test/run-pass/aux/xcrate_address_insignificant.rs b/src/test/run-pass/auxiliary/xcrate_address_insignificant.rs
similarity index 100%
rename from src/test/run-pass/aux/xcrate_address_insignificant.rs
rename to src/test/run-pass/auxiliary/xcrate_address_insignificant.rs
diff --git a/src/test/run-pass/aux/xcrate_associated_type_defaults.rs b/src/test/run-pass/auxiliary/xcrate_associated_type_defaults.rs
similarity index 100%
rename from src/test/run-pass/aux/xcrate_associated_type_defaults.rs
rename to src/test/run-pass/auxiliary/xcrate_associated_type_defaults.rs
diff --git a/src/test/run-pass/aux/xcrate_static_addresses.rs b/src/test/run-pass/auxiliary/xcrate_static_addresses.rs
similarity index 100%
rename from src/test/run-pass/aux/xcrate_static_addresses.rs
rename to src/test/run-pass/auxiliary/xcrate_static_addresses.rs
diff --git a/src/test/run-pass/aux/xcrate_struct_aliases.rs b/src/test/run-pass/auxiliary/xcrate_struct_aliases.rs
similarity index 100%
rename from src/test/run-pass/aux/xcrate_struct_aliases.rs
rename to src/test/run-pass/auxiliary/xcrate_struct_aliases.rs
diff --git a/src/test/run-pass/aux/xcrate_unit_struct.rs b/src/test/run-pass/auxiliary/xcrate_unit_struct.rs
similarity index 100%
rename from src/test/run-pass/aux/xcrate_unit_struct.rs
rename to src/test/run-pass/auxiliary/xcrate_unit_struct.rs
diff --git a/src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans.rs b/src/test/run-pass/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs
similarity index 100%
rename from src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans.rs
rename to src/test/run-pass/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans.rs
diff --git a/src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans_macros.rs b/src/test/run-pass/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans_macros.rs
similarity index 100%
rename from src/test/run-pass/import-crate-with-invalid-spans/aux/crate_with_invalid_spans_macros.rs
rename to src/test/run-pass/import-crate-with-invalid-spans/auxiliary/crate_with_invalid_spans_macros.rs
diff --git a/src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_lib.rs b/src/test/run-pass/issue24687-embed-debuginfo/auxiliary/issue24687_lib.rs
similarity index 100%
rename from src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_lib.rs
rename to src/test/run-pass/issue24687-embed-debuginfo/auxiliary/issue24687_lib.rs
diff --git a/src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_mbcs_in_comments.rs b/src/test/run-pass/issue24687-embed-debuginfo/auxiliary/issue24687_mbcs_in_comments.rs
similarity index 100%
rename from src/test/run-pass/issue24687-embed-debuginfo/aux/issue24687_mbcs_in_comments.rs
rename to src/test/run-pass/issue24687-embed-debuginfo/auxiliary/issue24687_mbcs_in_comments.rs
diff --git a/src/test/run-pass/macro-include-items.rs b/src/test/run-pass/macro-include-items.rs
index a2e1d86a990..1e31c85afad 100644
--- a/src/test/run-pass/macro-include-items.rs
+++ b/src/test/run-pass/macro-include-items.rs
@@ -12,9 +12,9 @@
 
 fn bar() {}
 
-include!(concat!("", "", "aux/", "macro-include-items-item.rs"));
+include!(concat!("", "", "auxiliary/", "macro-include-items-item.rs"));
 
 fn main() {
     foo();
-    assert_eq!(include!(concat!("", "aux/", "macro-include-items-expr.rs")), 1_usize);
+    assert_eq!(include!(concat!("", "auxiliary/", "macro-include-items-expr.rs")), 1_usize);
 }
diff --git a/src/test/run-pass/specialization/aux/go_trait.rs b/src/test/run-pass/specialization/auxiliary/go_trait.rs
similarity index 100%
rename from src/test/run-pass/specialization/aux/go_trait.rs
rename to src/test/run-pass/specialization/auxiliary/go_trait.rs
diff --git a/src/test/run-pass/specialization/aux/specialization_cross_crate.rs b/src/test/run-pass/specialization/auxiliary/specialization_cross_crate.rs
similarity index 100%
rename from src/test/run-pass/specialization/aux/specialization_cross_crate.rs
rename to src/test/run-pass/specialization/auxiliary/specialization_cross_crate.rs
diff --git a/src/test/run-pass/specialization/aux/specialization_cross_crate_defaults.rs b/src/test/run-pass/specialization/auxiliary/specialization_cross_crate_defaults.rs
similarity index 100%
rename from src/test/run-pass/specialization/aux/specialization_cross_crate_defaults.rs
rename to src/test/run-pass/specialization/auxiliary/specialization_cross_crate_defaults.rs
diff --git a/src/test/rustdoc/aux/empty.rs b/src/test/rustdoc/auxiliary/empty.rs
similarity index 100%
rename from src/test/rustdoc/aux/empty.rs
rename to src/test/rustdoc/auxiliary/empty.rs
diff --git a/src/test/rustdoc/aux/inline-default-methods.rs b/src/test/rustdoc/auxiliary/inline-default-methods.rs
similarity index 100%
rename from src/test/rustdoc/aux/inline-default-methods.rs
rename to src/test/rustdoc/auxiliary/inline-default-methods.rs
diff --git a/src/test/rustdoc/aux/issue-13698.rs b/src/test/rustdoc/auxiliary/issue-13698.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-13698.rs
rename to src/test/rustdoc/auxiliary/issue-13698.rs
diff --git a/src/test/rustdoc/aux/issue-15318.rs b/src/test/rustdoc/auxiliary/issue-15318.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-15318.rs
rename to src/test/rustdoc/auxiliary/issue-15318.rs
diff --git a/src/test/rustdoc/aux/issue-17476.rs b/src/test/rustdoc/auxiliary/issue-17476.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-17476.rs
rename to src/test/rustdoc/auxiliary/issue-17476.rs
diff --git a/src/test/rustdoc/aux/issue-19190-3.rs b/src/test/rustdoc/auxiliary/issue-19190-3.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-19190-3.rs
rename to src/test/rustdoc/auxiliary/issue-19190-3.rs
diff --git a/src/test/rustdoc/aux/issue-20646.rs b/src/test/rustdoc/auxiliary/issue-20646.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-20646.rs
rename to src/test/rustdoc/auxiliary/issue-20646.rs
diff --git a/src/test/rustdoc/aux/issue-20727.rs b/src/test/rustdoc/auxiliary/issue-20727.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-20727.rs
rename to src/test/rustdoc/auxiliary/issue-20727.rs
diff --git a/src/test/rustdoc/aux/issue-21092.rs b/src/test/rustdoc/auxiliary/issue-21092.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-21092.rs
rename to src/test/rustdoc/auxiliary/issue-21092.rs
diff --git a/src/test/rustdoc/aux/issue-21801.rs b/src/test/rustdoc/auxiliary/issue-21801.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-21801.rs
rename to src/test/rustdoc/auxiliary/issue-21801.rs
diff --git a/src/test/rustdoc/aux/issue-22025.rs b/src/test/rustdoc/auxiliary/issue-22025.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-22025.rs
rename to src/test/rustdoc/auxiliary/issue-22025.rs
diff --git a/src/test/rustdoc/aux/issue-23207-1.rs b/src/test/rustdoc/auxiliary/issue-23207-1.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-23207-1.rs
rename to src/test/rustdoc/auxiliary/issue-23207-1.rs
diff --git a/src/test/rustdoc/aux/issue-23207-2.rs b/src/test/rustdoc/auxiliary/issue-23207-2.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-23207-2.rs
rename to src/test/rustdoc/auxiliary/issue-23207-2.rs
diff --git a/src/test/rustdoc/aux/issue-26606-macro.rs b/src/test/rustdoc/auxiliary/issue-26606-macro.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-26606-macro.rs
rename to src/test/rustdoc/auxiliary/issue-26606-macro.rs
diff --git a/src/test/rustdoc/aux/issue-27362.rs b/src/test/rustdoc/auxiliary/issue-27362.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-27362.rs
rename to src/test/rustdoc/auxiliary/issue-27362.rs
diff --git a/src/test/rustdoc/aux/issue-28927-1.rs b/src/test/rustdoc/auxiliary/issue-28927-1.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-28927-1.rs
rename to src/test/rustdoc/auxiliary/issue-28927-1.rs
diff --git a/src/test/rustdoc/aux/issue-28927-2.rs b/src/test/rustdoc/auxiliary/issue-28927-2.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-28927-2.rs
rename to src/test/rustdoc/auxiliary/issue-28927-2.rs
diff --git a/src/test/rustdoc/aux/issue-29584.rs b/src/test/rustdoc/auxiliary/issue-29584.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-29584.rs
rename to src/test/rustdoc/auxiliary/issue-29584.rs
diff --git a/src/test/rustdoc/aux/issue-30109-1.rs b/src/test/rustdoc/auxiliary/issue-30109-1.rs
similarity index 100%
rename from src/test/rustdoc/aux/issue-30109-1.rs
rename to src/test/rustdoc/auxiliary/issue-30109-1.rs
diff --git a/src/test/rustdoc/aux/reexp_stripped.rs b/src/test/rustdoc/auxiliary/reexp_stripped.rs
similarity index 100%
rename from src/test/rustdoc/aux/reexp_stripped.rs
rename to src/test/rustdoc/auxiliary/reexp_stripped.rs
diff --git a/src/test/rustdoc/aux/rustdoc-default-impl.rs b/src/test/rustdoc/auxiliary/rustdoc-default-impl.rs
similarity index 100%
rename from src/test/rustdoc/aux/rustdoc-default-impl.rs
rename to src/test/rustdoc/auxiliary/rustdoc-default-impl.rs
diff --git a/src/test/rustdoc/aux/rustdoc-extern-default-method.rs b/src/test/rustdoc/auxiliary/rustdoc-extern-default-method.rs
similarity index 100%
rename from src/test/rustdoc/aux/rustdoc-extern-default-method.rs
rename to src/test/rustdoc/auxiliary/rustdoc-extern-default-method.rs
diff --git a/src/test/rustdoc/aux/rustdoc-extern-method.rs b/src/test/rustdoc/auxiliary/rustdoc-extern-method.rs
similarity index 100%
rename from src/test/rustdoc/aux/rustdoc-extern-method.rs
rename to src/test/rustdoc/auxiliary/rustdoc-extern-method.rs
diff --git a/src/test/rustdoc/aux/rustdoc-ffi.rs b/src/test/rustdoc/auxiliary/rustdoc-ffi.rs
similarity index 100%
rename from src/test/rustdoc/aux/rustdoc-ffi.rs
rename to src/test/rustdoc/auxiliary/rustdoc-ffi.rs
diff --git a/src/test/rustdoc/aux/rustdoc-impl-parts-crosscrate.rs b/src/test/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs
similarity index 100%
rename from src/test/rustdoc/aux/rustdoc-impl-parts-crosscrate.rs
rename to src/test/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs
diff --git a/src/test/rustdoc/aux/variant-struct.rs b/src/test/rustdoc/auxiliary/variant-struct.rs
similarity index 100%
rename from src/test/rustdoc/aux/variant-struct.rs
rename to src/test/rustdoc/auxiliary/variant-struct.rs
diff --git a/src/test/rustdoc/inline_cross/aux/issue-33113.rs b/src/test/rustdoc/inline_cross/auxiliary/issue-33113.rs
similarity index 100%
rename from src/test/rustdoc/inline_cross/aux/issue-33113.rs
rename to src/test/rustdoc/inline_cross/auxiliary/issue-33113.rs
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-hidden-sig.rs b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-hidden-sig.rs
similarity index 100%
rename from src/test/rustdoc/inline_cross/aux/rustdoc-hidden-sig.rs
rename to src/test/rustdoc/inline_cross/auxiliary/rustdoc-hidden-sig.rs
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-hidden.rs b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-hidden.rs
similarity index 100%
rename from src/test/rustdoc/inline_cross/aux/rustdoc-hidden.rs
rename to src/test/rustdoc/inline_cross/auxiliary/rustdoc-hidden.rs
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-nonreachable-impls.rs b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-nonreachable-impls.rs
similarity index 100%
rename from src/test/rustdoc/inline_cross/aux/rustdoc-nonreachable-impls.rs
rename to src/test/rustdoc/inline_cross/auxiliary/rustdoc-nonreachable-impls.rs
diff --git a/src/test/rustdoc/inline_cross/aux/rustdoc-trait-object-impl.rs b/src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs
similarity index 100%
rename from src/test/rustdoc/inline_cross/aux/rustdoc-trait-object-impl.rs
rename to src/test/rustdoc/inline_cross/auxiliary/rustdoc-trait-object-impl.rs
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 6e1cae9b25c..245c3992bee 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -360,7 +360,7 @@ fn collect_tests_from_dir(config: &Config,
             tests.push(make_test(config, &paths))
         } else if file_path.is_dir() {
             let relative_file_path = relative_dir_path.join(file.file_name());
-            if &file_name == "aux" {
+            if &file_name == "auxiliary" {
                 // `aux` directories contain other crates used for
                 // cross-crate tests. Don't search them for tests, but
                 // do create a directory in the build dir for them,
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 858cecf8612..74e4b81f555 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1153,7 +1153,7 @@ actual:\n\
         let test_ab = self.testpaths.file
                                     .parent()
                                     .expect("test file path has no parent")
-                                    .join("aux")
+                                    .join("auxiliary")
                                     .join(rel_ab);
         if !test_ab.exists() {
             self.fatal(&format!("aux-build `{}` source not found", test_ab.display()))
@@ -1163,7 +1163,7 @@ actual:\n\
             file: test_ab,
             base: self.testpaths.base.clone(),
             relative_dir: self.testpaths.relative_dir
-                                        .join("aux")
+                                        .join("auxiliary")
                                         .join(rel_ab)
                                         .parent()
                                         .expect("aux-build path has no parent")

From 707012494dcb66d55efebedbd7727469d3baa2b2 Mon Sep 17 00:00:00 2001
From: Niko Matsakis <niko@alum.mit.edu>
Date: Thu, 5 May 2016 05:55:08 -0400
Subject: [PATCH 10/10] remove stray files in auxiliary directory

---
 src/test/auxiliary/issue-33113.rs             | 17 -------------
 src/test/auxiliary/rustdoc-hidden.rs          | 14 -----------
 .../auxiliary/rustdoc-trait-object-impl.rs    | 24 -------------------
 3 files changed, 55 deletions(-)
 delete mode 100644 src/test/auxiliary/issue-33113.rs
 delete mode 100644 src/test/auxiliary/rustdoc-hidden.rs
 delete mode 100644 src/test/auxiliary/rustdoc-trait-object-impl.rs

diff --git a/src/test/auxiliary/issue-33113.rs b/src/test/auxiliary/issue-33113.rs
deleted file mode 100644
index c476dda2690..00000000000
--- a/src/test/auxiliary/issue-33113.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name="bar"]
-
-pub trait Bar {}
-pub struct Foo;
-
-impl<'a> Bar for &'a char {}
-impl Bar for Foo {}
diff --git a/src/test/auxiliary/rustdoc-hidden.rs b/src/test/auxiliary/rustdoc-hidden.rs
deleted file mode 100644
index aae3eb84fb5..00000000000
--- a/src/test/auxiliary/rustdoc-hidden.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[doc(hidden)]
-pub struct Foo;
-
-pub struct Bar;
diff --git a/src/test/auxiliary/rustdoc-trait-object-impl.rs b/src/test/auxiliary/rustdoc-trait-object-impl.rs
deleted file mode 100644
index 317262f4175..00000000000
--- a/src/test/auxiliary/rustdoc-trait-object-impl.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::fmt;
-
-pub trait Bar {}
-
-impl<'a> Bar + 'a {
-    pub fn bar(&self) -> usize { 42 }
-}
-
-impl<'a> fmt::Debug for Bar + 'a {
-    fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
-        Ok(())
-    }
-}
-