diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-05 09:13:28 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-11 09:32:08 +0000 |
| commit | cf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch) | |
| tree | 40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/codegen-units/partitioning/auxiliary | |
| parent | ca855e6e42787ecd062d81d53336fe6788ef51a9 (diff) | |
Move /src/test to /tests
Diffstat (limited to 'src/test/codegen-units/partitioning/auxiliary')
4 files changed, 0 insertions, 69 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"); - } -} |
