about summary refs log tree commit diff
path: root/src/test/codegen-units/partitioning
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/codegen-units/partitioning
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'src/test/codegen-units/partitioning')
-rw-r--r--src/test/codegen-units/partitioning/auxiliary/cgu_explicit_inlining.rs10
-rw-r--r--src/test/codegen-units/partitioning/auxiliary/cgu_extern_drop_glue.rs7
-rw-r--r--src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs26
-rw-r--r--src/test/codegen-units/partitioning/auxiliary/shared_generics_aux.rs26
-rw-r--r--src/test/codegen-units/partitioning/extern-drop-glue.rs36
-rw-r--r--src/test/codegen-units/partitioning/extern-generic.rs53
-rw-r--r--src/test/codegen-units/partitioning/incremental-merging.rs42
-rw-r--r--src/test/codegen-units/partitioning/inlining-from-extern-crate.rs53
-rw-r--r--src/test/codegen-units/partitioning/local-drop-glue.rs46
-rw-r--r--src/test/codegen-units/partitioning/local-generic.rs45
-rw-r--r--src/test/codegen-units/partitioning/local-inlining-but-not-all.rs45
-rw-r--r--src/test/codegen-units/partitioning/local-inlining.rs46
-rw-r--r--src/test/codegen-units/partitioning/local-transitive-inlining.rs46
-rw-r--r--src/test/codegen-units/partitioning/methods-are-with-self-type.rs79
-rw-r--r--src/test/codegen-units/partitioning/regular-modules.rs72
-rw-r--r--src/test/codegen-units/partitioning/shared-generics.rs28
-rw-r--r--src/test/codegen-units/partitioning/statics.rs38
-rw-r--r--src/test/codegen-units/partitioning/vtable-through-const.rs94
18 files changed, 0 insertions, 792 deletions
diff --git a/src/test/codegen-units/partitioning/auxiliary/cgu_explicit_inlining.rs b/src/test/codegen-units/partitioning/auxiliary/cgu_explicit_inlining.rs
deleted file mode 100644
index 4a3a63cc1b4..00000000000
--- a/src/test/codegen-units/partitioning/auxiliary/cgu_explicit_inlining.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![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/auxiliary/cgu_extern_drop_glue.rs b/src/test/codegen-units/partitioning/auxiliary/cgu_extern_drop_glue.rs
deleted file mode 100644
index b5fec23375a..00000000000
--- a/src/test/codegen-units/partitioning/auxiliary/cgu_extern_drop_glue.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![crate_type = "lib"]
-
-pub struct Struct(pub u32);
-
-impl Drop for Struct {
-    fn drop(&mut self) {}
-}
diff --git a/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs b/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs
deleted file mode 100644
index 3926f295742..00000000000
--- a/src/test/codegen-units/partitioning/auxiliary/cgu_generic_function.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-#![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/auxiliary/shared_generics_aux.rs b/src/test/codegen-units/partitioning/auxiliary/shared_generics_aux.rs
deleted file mode 100644
index ffbd0dc5484..00000000000
--- a/src/test/codegen-units/partitioning/auxiliary/shared_generics_aux.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
-//       prevent drop-glue from participating in share-generics.
-// compile-flags:-Zshare-generics=yes -Copt-level=0
-// no-prefer-dynamic
-
-#![crate_type="rlib"]
-
-pub fn generic_fn<T>(x: T, y: T) -> (T, T) {
-    (x, y)
-}
-
-pub fn use_generic_fn_f32() -> (f32, f32) {
-    // This line causes drop glue for Foo to be instantiated. We want to make
-    // sure that this crate exports an instance to be re-used by share-generics.
-    let _ = Foo(0);
-
-    generic_fn(0.0f32, 1.0f32)
-}
-
-pub struct Foo(pub u32);
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-        println!("foo");
-    }
-}
diff --git a/src/test/codegen-units/partitioning/extern-drop-glue.rs b/src/test/codegen-units/partitioning/extern-drop-glue.rs
deleted file mode 100644
index c73d2a10a96..00000000000
--- a/src/test/codegen-units/partitioning/extern-drop-glue.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Zinline-in-all-cgus -Copt-level=0
-
-#![allow(dead_code)]
-#![crate_type = "rlib"]
-
-// aux-build:cgu_extern_drop_glue.rs
-extern crate cgu_extern_drop_glue;
-
-//~ MONO_ITEM fn std::ptr::drop_in_place::<cgu_extern_drop_glue::Struct> - shim(Some(cgu_extern_drop_glue::Struct)) @@ extern_drop_glue-fallback.cgu[External]
-
-struct LocalStruct(cgu_extern_drop_glue::Struct);
-
-//~ MONO_ITEM fn user @@ extern_drop_glue[External]
-pub fn user() {
-    //~ MONO_ITEM fn std::ptr::drop_in_place::<LocalStruct> - shim(Some(LocalStruct)) @@ extern_drop_glue-fallback.cgu[External]
-    let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
-}
-
-pub mod mod1 {
-    use cgu_extern_drop_glue;
-
-    struct LocalStruct(cgu_extern_drop_glue::Struct);
-
-    //~ MONO_ITEM fn mod1::user @@ extern_drop_glue-mod1[External]
-    pub fn user() {
-        //~ MONO_ITEM fn std::ptr::drop_in_place::<mod1::LocalStruct> - shim(Some(mod1::LocalStruct)) @@ extern_drop_glue-fallback.cgu[External]
-        let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
-    }
-}
diff --git a/src/test/codegen-units/partitioning/extern-generic.rs b/src/test/codegen-units/partitioning/extern-generic.rs
deleted file mode 100644
index 638ec079a0b..00000000000
--- a/src/test/codegen-units/partitioning/extern-generic.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=eager -Zshare-generics=y
-
-#![allow(dead_code)]
-#![crate_type="lib"]
-
-// aux-build:cgu_generic_function.rs
-extern crate cgu_generic_function;
-
-//~ MONO_ITEM fn user @@ extern_generic[Internal]
-fn user() {
-    let _ = cgu_generic_function::foo("abc");
-}
-
-mod mod1 {
-    use cgu_generic_function;
-
-    //~ MONO_ITEM fn mod1::user @@ extern_generic-mod1[Internal]
-    fn user() {
-        let _ = cgu_generic_function::foo("abc");
-    }
-
-    mod mod1 {
-        use cgu_generic_function;
-
-        //~ MONO_ITEM fn mod1::mod1::user @@ extern_generic-mod1-mod1[Internal]
-        fn user() {
-            let _ = cgu_generic_function::foo("abc");
-        }
-    }
-}
-
-mod mod2 {
-    use cgu_generic_function;
-
-    //~ MONO_ITEM fn mod2::user @@ extern_generic-mod2[Internal]
-    fn user() {
-        let _ = cgu_generic_function::foo("abc");
-    }
-}
-
-mod mod3 {
-    //~ MONO_ITEM fn mod3::non_user @@ extern_generic-mod3[Internal]
-    fn non_user() {}
-}
-
-// Make sure the two generic functions from the extern crate get instantiated
-// once for the current crate
-//~ MONO_ITEM fn cgu_generic_function::foo::<&str> @@ cgu_generic_function-in-extern_generic.volatile[External]
-//~ MONO_ITEM fn cgu_generic_function::bar::<&str> @@ cgu_generic_function-in-extern_generic.volatile[External]
diff --git a/src/test/codegen-units/partitioning/incremental-merging.rs b/src/test/codegen-units/partitioning/incremental-merging.rs
deleted file mode 100644
index 118b7bdf4da..00000000000
--- a/src/test/codegen-units/partitioning/incremental-merging.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Ccodegen-units=3
-
-#![crate_type = "rlib"]
-
-// This test makes sure that merging of CGUs works together with incremental
-// compilation but at the same time does not modify names of CGUs that were not
-// affected by merging.
-//
-// We expect CGUs `aaa` and `bbb` to be merged (because they are the smallest),
-// while `ccc` and `ddd` are supposed to stay untouched.
-
-pub mod aaa {
-    //~ MONO_ITEM fn aaa::foo @@ incremental_merging-aaa--incremental_merging-bbb[External]
-    pub fn foo(a: u64) -> u64 {
-        a + 1
-    }
-}
-
-pub mod bbb {
-    //~ MONO_ITEM fn bbb::foo @@ incremental_merging-aaa--incremental_merging-bbb[External]
-    pub fn foo(a: u64, b: u64) -> u64 {
-        a + b + 1
-    }
-}
-
-pub mod ccc {
-    //~ MONO_ITEM fn ccc::foo @@ incremental_merging-ccc[External]
-    pub fn foo(a: u64, b: u64, c: u64) -> u64 {
-        a + b + c + 1
-    }
-}
-
-pub mod ddd {
-    //~ MONO_ITEM fn ddd::foo @@ incremental_merging-ddd[External]
-    pub fn foo(a: u64, b: u64, c: u64, d: u64) -> u64 {
-        a + b + c + d + 1
-    }
-}
diff --git a/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs b/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs
deleted file mode 100644
index 1cc21632e48..00000000000
--- a/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Zinline-in-all-cgus
-
-#![crate_type="lib"]
-
-// aux-build:cgu_explicit_inlining.rs
-extern crate cgu_explicit_inlining;
-
-// This test makes sure that items inlined from external crates are privately
-// instantiated in every codegen unit they are used in.
-
-//~ MONO_ITEM fn cgu_explicit_inlining::inlined @@ inlining_from_extern_crate[Internal] inlining_from_extern_crate-mod1[Internal]
-//~ MONO_ITEM fn cgu_explicit_inlining::always_inlined @@ inlining_from_extern_crate[Internal] inlining_from_extern_crate-mod2[Internal]
-
-//~ MONO_ITEM fn user @@ inlining_from_extern_crate[External]
-pub fn user()
-{
-    cgu_explicit_inlining::inlined();
-    cgu_explicit_inlining::always_inlined();
-
-    // does not generate a monomorphization in this crate
-    cgu_explicit_inlining::never_inlined();
-}
-
-pub mod mod1 {
-    use cgu_explicit_inlining;
-
-    //~ MONO_ITEM fn mod1::user @@ inlining_from_extern_crate-mod1[External]
-    pub fn user()
-    {
-        cgu_explicit_inlining::inlined();
-
-        // does not generate a monomorphization in this crate
-        cgu_explicit_inlining::never_inlined();
-    }
-}
-
-pub mod mod2 {
-    use cgu_explicit_inlining;
-
-    //~ MONO_ITEM fn mod2::user @@ inlining_from_extern_crate-mod2[External]
-    pub fn user()
-    {
-        cgu_explicit_inlining::always_inlined();
-
-        // does not generate a monomorphization in this crate
-        cgu_explicit_inlining::never_inlined();
-    }
-}
diff --git a/src/test/codegen-units/partitioning/local-drop-glue.rs b/src/test/codegen-units/partitioning/local-drop-glue.rs
deleted file mode 100644
index 2fd853a44b8..00000000000
--- a/src/test/codegen-units/partitioning/local-drop-glue.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Zinline-in-all-cgus -Copt-level=0
-
-#![allow(dead_code)]
-#![crate_type = "rlib"]
-
-//~ MONO_ITEM fn std::ptr::drop_in_place::<Struct> - shim(Some(Struct)) @@ local_drop_glue-fallback.cgu[External]
-struct Struct {
-    _a: u32,
-}
-
-impl Drop for Struct {
-    //~ MONO_ITEM fn <Struct as std::ops::Drop>::drop @@ local_drop_glue-fallback.cgu[External]
-    fn drop(&mut self) {}
-}
-
-//~ MONO_ITEM fn std::ptr::drop_in_place::<Outer> - shim(Some(Outer)) @@ local_drop_glue-fallback.cgu[External]
-struct Outer {
-    _a: Struct,
-}
-
-//~ MONO_ITEM fn user @@ local_drop_glue[External]
-pub fn user() {
-    let _ = Outer { _a: Struct { _a: 0 } };
-}
-
-pub mod mod1 {
-    use super::Struct;
-
-    //~ MONO_ITEM fn std::ptr::drop_in_place::<mod1::Struct2> - shim(Some(mod1::Struct2)) @@ local_drop_glue-fallback.cgu[External]
-    struct Struct2 {
-        _a: Struct,
-        //~ MONO_ITEM fn std::ptr::drop_in_place::<(u32, Struct)> - shim(Some((u32, Struct))) @@ local_drop_glue-fallback.cgu[Internal]
-        _b: (u32, Struct),
-    }
-
-    //~ MONO_ITEM fn mod1::user @@ local_drop_glue-mod1[External]
-    pub fn user() {
-        let _ = Struct2 { _a: Struct { _a: 0 }, _b: (0, Struct { _a: 0 }) };
-    }
-}
diff --git a/src/test/codegen-units/partitioning/local-generic.rs b/src/test/codegen-units/partitioning/local-generic.rs
deleted file mode 100644
index 38aec7291df..00000000000
--- a/src/test/codegen-units/partitioning/local-generic.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=eager
-
-#![allow(dead_code)]
-#![crate_type="lib"]
-
-//~ MONO_ITEM fn generic::<u32> @@ local_generic.volatile[External]
-//~ MONO_ITEM fn generic::<u64> @@ local_generic.volatile[External]
-//~ MONO_ITEM fn generic::<char> @@ local_generic.volatile[External]
-//~ MONO_ITEM fn generic::<&str> @@ local_generic.volatile[External]
-pub fn generic<T>(x: T) -> T { x }
-
-//~ MONO_ITEM fn user @@ local_generic[Internal]
-fn user() {
-    let _ = generic(0u32);
-}
-
-mod mod1 {
-    pub use super::generic;
-
-    //~ MONO_ITEM fn mod1::user @@ local_generic-mod1[Internal]
-    fn user() {
-        let _ = generic(0u64);
-    }
-
-    mod mod1 {
-        use super::generic;
-
-        //~ MONO_ITEM fn mod1::mod1::user @@ local_generic-mod1-mod1[Internal]
-        fn user() {
-            let _ = generic('c');
-        }
-    }
-}
-
-mod mod2 {
-    use super::generic;
-
-    //~ MONO_ITEM fn mod2::user @@ local_generic-mod2[Internal]
-    fn user() {
-        let _ = generic("abc");
-    }
-}
diff --git a/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs b/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs
deleted file mode 100644
index 318f0c28a59..00000000000
--- a/src/test/codegen-units/partitioning/local-inlining-but-not-all.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Zinline-in-all-cgus=no
-
-#![allow(dead_code)]
-#![crate_type="lib"]
-
-mod inline {
-
-    //~ MONO_ITEM fn inline::inlined_function @@ local_inlining_but_not_all-inline[External]
-    #[inline]
-    pub fn inlined_function()
-    {
-
-    }
-}
-
-pub mod user1 {
-    use super::inline;
-
-    //~ MONO_ITEM fn user1::foo @@ local_inlining_but_not_all-user1[External]
-    pub fn foo() {
-        inline::inlined_function();
-    }
-}
-
-pub mod user2 {
-    use super::inline;
-
-    //~ MONO_ITEM fn user2::bar @@ local_inlining_but_not_all-user2[External]
-    pub fn bar() {
-        inline::inlined_function();
-    }
-}
-
-pub mod non_user {
-
-    //~ MONO_ITEM fn non_user::baz @@ local_inlining_but_not_all-non_user[External]
-    pub fn baz() {
-
-    }
-}
diff --git a/src/test/codegen-units/partitioning/local-inlining.rs b/src/test/codegen-units/partitioning/local-inlining.rs
deleted file mode 100644
index 841a428e9dd..00000000000
--- a/src/test/codegen-units/partitioning/local-inlining.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Zinline-in-all-cgus
-
-#![allow(dead_code)]
-#![crate_type="lib"]
-
-mod inline {
-
-    // Important: This function should show up in all codegen units where it is inlined
-    //~ MONO_ITEM fn inline::inlined_function @@ local_inlining-user1[Internal] local_inlining-user2[Internal]
-    #[inline(always)]
-    pub fn inlined_function()
-    {
-
-    }
-}
-
-pub mod user1 {
-    use super::inline;
-
-    //~ MONO_ITEM fn user1::foo @@ local_inlining-user1[External]
-    pub fn foo() {
-        inline::inlined_function();
-    }
-}
-
-pub mod user2 {
-    use super::inline;
-
-    //~ MONO_ITEM fn user2::bar @@ local_inlining-user2[External]
-    pub fn bar() {
-        inline::inlined_function();
-    }
-}
-
-pub mod non_user {
-
-    //~ MONO_ITEM fn non_user::baz @@ local_inlining-non_user[External]
-    pub fn baz() {
-
-    }
-}
diff --git a/src/test/codegen-units/partitioning/local-transitive-inlining.rs b/src/test/codegen-units/partitioning/local-transitive-inlining.rs
deleted file mode 100644
index 03c37954d15..00000000000
--- a/src/test/codegen-units/partitioning/local-transitive-inlining.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Zinline-in-all-cgus
-
-#![allow(dead_code)]
-#![crate_type="rlib"]
-
-mod inline {
-
-    //~ MONO_ITEM fn inline::inlined_function @@ local_transitive_inlining-indirect_user[Internal]
-    #[inline(always)]
-    pub fn inlined_function()
-    {
-
-    }
-}
-
-mod direct_user {
-    use super::inline;
-
-    //~ MONO_ITEM fn direct_user::foo @@ local_transitive_inlining-indirect_user[Internal]
-    #[inline(always)]
-    pub fn foo() {
-        inline::inlined_function();
-    }
-}
-
-pub mod indirect_user {
-    use super::direct_user;
-
-    //~ MONO_ITEM fn indirect_user::bar @@ local_transitive_inlining-indirect_user[External]
-    pub fn bar() {
-        direct_user::foo();
-    }
-}
-
-pub mod non_user {
-
-    //~ MONO_ITEM fn non_user::baz @@ local_transitive_inlining-non_user[External]
-    pub fn baz() {
-
-    }
-}
diff --git a/src/test/codegen-units/partitioning/methods-are-with-self-type.rs b/src/test/codegen-units/partitioning/methods-are-with-self-type.rs
deleted file mode 100644
index 8220dc12ee0..00000000000
--- a/src/test/codegen-units/partitioning/methods-are-with-self-type.rs
+++ /dev/null
@@ -1,79 +0,0 @@
-// Currently, all generic functions are instantiated in each codegen unit that
-// uses them, even those not marked with #[inline], so this test does not make
-// much sense at the moment.
-// ignore-test
-
-//
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-
-#![allow(dead_code)]
-#![feature(start)]
-
-struct SomeType;
-
-struct SomeGenericType<T1, T2>(T1, T2);
-
-mod mod1 {
-    use super::{SomeType, SomeGenericType};
-
-    // Even though the impl is in `mod1`, the methods should end up in the
-    // parent module, since that is where their self-type is.
-    impl SomeType {
-        //~ MONO_ITEM fn methods_are_with_self_type::mod1[0]::{{impl}}[0]::method[0] @@ methods_are_with_self_type[External]
-        fn method(&self) {}
-
-        //~ MONO_ITEM fn methods_are_with_self_type::mod1[0]::{{impl}}[0]::associated_fn[0] @@ methods_are_with_self_type[External]
-        fn associated_fn() {}
-    }
-
-    impl<T1, T2> SomeGenericType<T1, T2> {
-        pub fn method(&self) {}
-        pub fn associated_fn(_: T1, _: T2) {}
-    }
-}
-
-trait Trait {
-    fn foo(&self);
-    fn default(&self) {}
-}
-
-// We provide an implementation of `Trait` for all types. The corresponding
-// monomorphizations should end up in whichever module the concrete `T` is.
-impl<T> Trait for T
-{
-    fn foo(&self) {}
-}
-
-mod type1 {
-    pub struct Struct;
-}
-
-mod type2 {
-    pub struct Struct;
-}
-
-//~ MONO_ITEM fn methods_are_with_self_type::start[0]
-#[start]
-fn start(_: isize, _: *const *const u8) -> isize {
-    //~ MONO_ITEM fn methods_are_with_self_type::mod1[0]::{{impl}}[1]::method[0]<u32, u64> @@ methods_are_with_self_type.volatile[WeakODR]
-    SomeGenericType(0u32, 0u64).method();
-    //~ MONO_ITEM fn methods_are_with_self_type::mod1[0]::{{impl}}[1]::associated_fn[0]<char, &str> @@ methods_are_with_self_type.volatile[WeakODR]
-    SomeGenericType::associated_fn('c', "&str");
-
-    //~ MONO_ITEM fn methods_are_with_self_type::{{impl}}[0]::foo[0]<methods_are_with_self_type::type1[0]::Struct[0]> @@ methods_are_with_self_type-type1.volatile[WeakODR]
-    type1::Struct.foo();
-    //~ MONO_ITEM fn methods_are_with_self_type::{{impl}}[0]::foo[0]<methods_are_with_self_type::type2[0]::Struct[0]> @@ methods_are_with_self_type-type2.volatile[WeakODR]
-    type2::Struct.foo();
-
-    //~ MONO_ITEM fn methods_are_with_self_type::Trait[0]::default[0]<methods_are_with_self_type::type1[0]::Struct[0]> @@ methods_are_with_self_type-type1.volatile[WeakODR]
-    type1::Struct.default();
-    //~ MONO_ITEM fn methods_are_with_self_type::Trait[0]::default[0]<methods_are_with_self_type::type2[0]::Struct[0]> @@ methods_are_with_self_type-type2.volatile[WeakODR]
-    type2::Struct.default();
-
-    0
-}
-
-//~ MONO_ITEM drop-glue i8
diff --git a/src/test/codegen-units/partitioning/regular-modules.rs b/src/test/codegen-units/partitioning/regular-modules.rs
deleted file mode 100644
index ce7fe9c3a4f..00000000000
--- a/src/test/codegen-units/partitioning/regular-modules.rs
+++ /dev/null
@@ -1,72 +0,0 @@
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=eager
-
-#![allow(dead_code)]
-#![crate_type="lib"]
-
-//~ MONO_ITEM fn foo @@ regular_modules[Internal]
-fn foo() {}
-
-//~ MONO_ITEM fn bar @@ regular_modules[Internal]
-fn bar() {}
-
-//~ MONO_ITEM static BAZ @@ regular_modules[Internal]
-static BAZ: u64 = 0;
-
-mod mod1 {
-
-    //~ MONO_ITEM fn mod1::foo @@ regular_modules-mod1[Internal]
-    fn foo() {}
-    //~ MONO_ITEM fn mod1::bar @@ regular_modules-mod1[Internal]
-    fn bar() {}
-    //~ MONO_ITEM static mod1::BAZ @@ regular_modules-mod1[Internal]
-    static BAZ: u64 = 0;
-
-    mod mod1 {
-        //~ MONO_ITEM fn mod1::mod1::foo @@ regular_modules-mod1-mod1[Internal]
-        fn foo() {}
-        //~ MONO_ITEM fn mod1::mod1::bar @@ regular_modules-mod1-mod1[Internal]
-        fn bar() {}
-        //~ MONO_ITEM static mod1::mod1::BAZ @@ regular_modules-mod1-mod1[Internal]
-        static BAZ: u64 = 0;
-    }
-
-    mod mod2 {
-        //~ MONO_ITEM fn mod1::mod2::foo @@ regular_modules-mod1-mod2[Internal]
-        fn foo() {}
-        //~ MONO_ITEM fn mod1::mod2::bar @@ regular_modules-mod1-mod2[Internal]
-        fn bar() {}
-        //~ MONO_ITEM static mod1::mod2::BAZ @@ regular_modules-mod1-mod2[Internal]
-        static BAZ: u64 = 0;
-    }
-}
-
-mod mod2 {
-
-    //~ MONO_ITEM fn mod2::foo @@ regular_modules-mod2[Internal]
-    fn foo() {}
-    //~ MONO_ITEM fn mod2::bar @@ regular_modules-mod2[Internal]
-    fn bar() {}
-    //~ MONO_ITEM static mod2::BAZ @@ regular_modules-mod2[Internal]
-    static BAZ: u64 = 0;
-
-    mod mod1 {
-        //~ MONO_ITEM fn mod2::mod1::foo @@ regular_modules-mod2-mod1[Internal]
-        fn foo() {}
-        //~ MONO_ITEM fn mod2::mod1::bar @@ regular_modules-mod2-mod1[Internal]
-        fn bar() {}
-        //~ MONO_ITEM static mod2::mod1::BAZ @@ regular_modules-mod2-mod1[Internal]
-        static BAZ: u64 = 0;
-    }
-
-    mod mod2 {
-        //~ MONO_ITEM fn mod2::mod2::foo @@ regular_modules-mod2-mod2[Internal]
-        fn foo() {}
-        //~ MONO_ITEM fn mod2::mod2::bar @@ regular_modules-mod2-mod2[Internal]
-        fn bar() {}
-        //~ MONO_ITEM static mod2::mod2::BAZ @@ regular_modules-mod2-mod2[Internal]
-        static BAZ: u64 = 0;
-    }
-}
diff --git a/src/test/codegen-units/partitioning/shared-generics.rs b/src/test/codegen-units/partitioning/shared-generics.rs
deleted file mode 100644
index ebe96bfb746..00000000000
--- a/src/test/codegen-units/partitioning/shared-generics.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// no-prefer-dynamic
-// NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
-//       prevent drop-glue from participating in share-generics.
-// incremental
-// compile-flags:-Zprint-mono-items=eager -Zshare-generics=yes -Copt-level=0
-
-#![crate_type="rlib"]
-
-// aux-build:shared_generics_aux.rs
-extern crate shared_generics_aux;
-
-//~ MONO_ITEM fn foo
-pub fn foo() {
-
-    //~ MONO_ITEM fn shared_generics_aux::generic_fn::<u16> @@ shared_generics_aux-in-shared_generics.volatile[External]
-    let _ = shared_generics_aux::generic_fn(0u16, 1u16);
-
-    // This should not generate a monomorphization because it's already
-    // available in `shared_generics_aux`.
-    let _ = shared_generics_aux::generic_fn(0.0f32, 3.0f32);
-
-    // The following line will drop an instance of `Foo`, generating a call to
-    // Foo's drop-glue function. However, share-generics should take care of
-    // reusing the drop-glue from the upstream crate, so we do not expect a
-    // mono item for the drop-glue
-    let _ = shared_generics_aux::Foo(1);
-}
diff --git a/src/test/codegen-units/partitioning/statics.rs b/src/test/codegen-units/partitioning/statics.rs
deleted file mode 100644
index b11d6696dc0..00000000000
--- a/src/test/codegen-units/partitioning/statics.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-
-#![crate_type="rlib"]
-
-//~ MONO_ITEM static FOO @@ statics[Internal]
-static FOO: u32 = 0;
-
-//~ MONO_ITEM static BAR @@ statics[Internal]
-static BAR: u32 = 0;
-
-//~ MONO_ITEM fn function @@ statics[External]
-pub fn function() {
-    //~ MONO_ITEM static function::FOO @@ statics[Internal]
-    static FOO: u32 = 0;
-
-    //~ MONO_ITEM static function::BAR @@ statics[Internal]
-    static BAR: u32 = 0;
-}
-
-pub mod mod1 {
-    //~ MONO_ITEM static mod1::FOO @@ statics-mod1[Internal]
-    static FOO: u32 = 0;
-
-    //~ MONO_ITEM static mod1::BAR @@ statics-mod1[Internal]
-    static BAR: u32 = 0;
-
-    //~ MONO_ITEM fn mod1::function @@ statics-mod1[External]
-    pub fn function() {
-        //~ MONO_ITEM static mod1::function::FOO @@ statics-mod1[Internal]
-        static FOO: u32 = 0;
-
-        //~ MONO_ITEM static mod1::function::BAR @@ statics-mod1[Internal]
-        static BAR: u32 = 0;
-    }
-}
diff --git a/src/test/codegen-units/partitioning/vtable-through-const.rs b/src/test/codegen-units/partitioning/vtable-through-const.rs
deleted file mode 100644
index cedcca804b3..00000000000
--- a/src/test/codegen-units/partitioning/vtable-through-const.rs
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-
-// We specify incremental here because we want to test the partitioning for
-// incremental compilation
-// incremental
-// compile-flags:-Zprint-mono-items=lazy
-// compile-flags:-Zinline-in-all-cgus
-
-// This test case makes sure, that references made through constants are
-// recorded properly in the InliningMap.
-
-#![feature(start)]
-
-mod mod1 {
-    pub trait Trait1 {
-        fn do_something(&self) {}
-        fn do_something_else(&self) {}
-    }
-
-    impl Trait1 for u32 {}
-
-    pub trait Trait1Gen<T> {
-        fn do_something(&self, x: T) -> T;
-        fn do_something_else(&self, x: T) -> T;
-    }
-
-    impl<T> Trait1Gen<T> for u32 {
-        fn do_something(&self, x: T) -> T { x }
-        fn do_something_else(&self, x: T) -> T { x }
-    }
-
-    //~ MONO_ITEM fn mod1::id::<i64> @@ vtable_through_const-mod1.volatile[Internal]
-    fn id<T>(x: T) -> T { x }
-
-    // These are referenced, so they produce mono-items (see start())
-    pub const TRAIT1_REF: &'static Trait1 = &0u32 as &Trait1;
-    pub const TRAIT1_GEN_REF: &'static Trait1Gen<u8> = &0u32 as &Trait1Gen<u8>;
-    pub const ID_CHAR: fn(char) -> char = id::<char>;
-
-
-
-    pub trait Trait2 {
-        fn do_something(&self) {}
-        fn do_something_else(&self) {}
-    }
-
-    //~ MONO_ITEM fn <u32 as mod1::Trait2>::do_something @@ vtable_through_const-mod1.volatile[Internal]
-    //~ MONO_ITEM fn <u32 as mod1::Trait2>::do_something_else @@ vtable_through_const-mod1.volatile[Internal]
-    impl Trait2 for u32 {}
-
-    pub trait Trait2Gen<T> {
-        fn do_something(&self, x: T) -> T;
-        fn do_something_else(&self, x: T) -> T;
-    }
-
-    impl<T> Trait2Gen<T> for u32 {
-        fn do_something(&self, x: T) -> T { x }
-        fn do_something_else(&self, x: T) -> T { x }
-    }
-
-    // These are not referenced, so they do not produce mono-items
-    pub const TRAIT2_REF: &'static Trait2 = &0u32 as &Trait2;
-    pub const TRAIT2_GEN_REF: &'static Trait2Gen<u8> = &0u32 as &Trait2Gen<u8>;
-    pub const ID_I64: fn(i64) -> i64 = id::<i64>;
-}
-
-//~ MONO_ITEM fn start
-#[start]
-fn start(_: isize, _: *const *const u8) -> isize {
-    //~ MONO_ITEM fn std::ptr::drop_in_place::<u32> - shim(None) @@ vtable_through_const[Internal]
-
-    // Since Trait1::do_something() is instantiated via its default implementation,
-    // it is considered a generic and is instantiated here only because it is
-    // referenced in this module.
-    //~ MONO_ITEM fn <u32 as mod1::Trait1>::do_something_else @@ vtable_through_const-mod1.volatile[External]
-
-    // Although it is never used, Trait1::do_something_else() has to be
-    // instantiated locally here too, otherwise the <&u32 as &Trait1> vtable
-    // could not be fully constructed.
-    //~ MONO_ITEM fn <u32 as mod1::Trait1>::do_something @@ vtable_through_const-mod1.volatile[External]
-    mod1::TRAIT1_REF.do_something();
-
-    // Same as above
-    //~ MONO_ITEM fn <u32 as mod1::Trait1Gen<u8>>::do_something @@ vtable_through_const-mod1.volatile[External]
-    //~ MONO_ITEM fn <u32 as mod1::Trait1Gen<u8>>::do_something_else @@ vtable_through_const-mod1.volatile[External]
-    //~ MONO_ITEM fn <u32 as mod1::Trait2Gen<u8>>::do_something @@ vtable_through_const-mod1.volatile[Internal]
-    //~ MONO_ITEM fn <u32 as mod1::Trait2Gen<u8>>::do_something_else @@ vtable_through_const-mod1.volatile[Internal]
-    mod1::TRAIT1_GEN_REF.do_something(0u8);
-
-    //~ MONO_ITEM fn mod1::id::<char> @@ vtable_through_const-mod1.volatile[External]
-    mod1::ID_CHAR('x');
-
-    0
-}