Skip to content

Commit b944531

Browse files
committed
Update codegen-units tests
1 parent 8593023 commit b944531

File tree

2 files changed

+23
-33
lines changed

2 files changed

+23
-33
lines changed

src/test/codegen-units/partitioning/extern-drop-glue.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
// We specify -Z incremental here because we want to test the partitioning for
44
// incremental compilation
5+
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
56
// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/extern-drop-glue
6-
// compile-flags:-Zinline-in-all-cgus
7+
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
78

89
#![allow(dead_code)]
9-
#![crate_type="rlib"]
10+
#![crate_type = "rlib"]
1011

1112
// aux-build:cgu_extern_drop_glue.rs
1213
extern crate cgu_extern_drop_glue;
1314

14-
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<cgu_extern_drop_glue::Struct[0]> @@ extern_drop_glue[Internal] extern_drop_glue-mod1[Internal]
15+
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<cgu_extern_drop_glue::Struct[0]> @@ extern_drop_glue-fallback.cgu[External]
1516

1617
struct LocalStruct(cgu_extern_drop_glue::Struct);
1718

1819
//~ MONO_ITEM fn extern_drop_glue::user[0] @@ extern_drop_glue[External]
19-
pub fn user()
20-
{
21-
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::LocalStruct[0]> @@ extern_drop_glue[Internal]
20+
pub fn user() {
21+
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::LocalStruct[0]> @@ extern_drop_glue-fallback.cgu[External]
2222
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
2323
}
2424

@@ -28,9 +28,8 @@ pub mod mod1 {
2828
struct LocalStruct(cgu_extern_drop_glue::Struct);
2929

3030
//~ MONO_ITEM fn extern_drop_glue::mod1[0]::user[0] @@ extern_drop_glue-mod1[External]
31-
pub fn user()
32-
{
33-
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::mod1[0]::LocalStruct[0]> @@ extern_drop_glue-mod1[Internal]
31+
pub fn user() {
32+
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::mod1[0]::LocalStruct[0]> @@ extern_drop_glue-fallback.cgu[External]
3433
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
3534
}
3635
}
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,45 @@
11
// ignore-tidy-linelength
22
// We specify -Z incremental here because we want to test the partitioning for
33
// incremental compilation
4+
// We specify opt-level=0 because `drop_in_place` is `Internal` when optimizing
45
// compile-flags:-Zprint-mono-items=lazy -Zincremental=tmp/partitioning-tests/local-drop-glue
5-
// compile-flags:-Zinline-in-all-cgus
6+
// compile-flags:-Zinline-in-all-cgus -Copt-level=0
67

78
#![allow(dead_code)]
8-
#![crate_type="rlib"]
9+
#![crate_type = "rlib"]
910

10-
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Struct[0]> @@ local_drop_glue[Internal] local_drop_glue-mod1[Internal]
11+
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Struct[0]> @@ local_drop_glue-fallback.cgu[External]
1112
struct Struct {
12-
_a: u32
13+
_a: u32,
1314
}
1415

1516
impl Drop for Struct {
16-
//~ MONO_ITEM fn local_drop_glue::{{impl}}[0]::drop[0] @@ local_drop_glue[External]
17+
//~ MONO_ITEM fn local_drop_glue::{{impl}}[0]::drop[0] @@ local_drop_glue-fallback.cgu[External]
1718
fn drop(&mut self) {}
1819
}
1920

20-
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Outer[0]> @@ local_drop_glue[Internal]
21+
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Outer[0]> @@ local_drop_glue-fallback.cgu[External]
2122
struct Outer {
22-
_a: Struct
23+
_a: Struct,
2324
}
2425

2526
//~ MONO_ITEM fn local_drop_glue::user[0] @@ local_drop_glue[External]
26-
pub fn user()
27-
{
28-
let _ = Outer {
29-
_a: Struct {
30-
_a: 0
31-
}
32-
};
27+
pub fn user() {
28+
let _ = Outer { _a: Struct { _a: 0 } };
3329
}
3430

35-
pub mod mod1
36-
{
31+
pub mod mod1 {
3732
use super::Struct;
3833

39-
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::mod1[0]::Struct2[0]> @@ local_drop_glue-mod1[Internal]
34+
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::mod1[0]::Struct2[0]> @@ local_drop_glue-fallback.cgu[External]
4035
struct Struct2 {
4136
_a: Struct,
42-
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<(u32, local_drop_glue::Struct[0])> @@ local_drop_glue-mod1[Internal]
37+
//~ MONO_ITEM fn core::ptr[0]::drop_in_place[0]<(u32, local_drop_glue::Struct[0])> @@ local_drop_glue-fallback.cgu[Internal]
4338
_b: (u32, Struct),
4439
}
4540

4641
//~ MONO_ITEM fn local_drop_glue::mod1[0]::user[0] @@ local_drop_glue-mod1[External]
47-
pub fn user()
48-
{
49-
let _ = Struct2 {
50-
_a: Struct { _a: 0 },
51-
_b: (0, Struct { _a: 0 }),
52-
};
42+
pub fn user() {
43+
let _ = Struct2 { _a: Struct { _a: 0 }, _b: (0, Struct { _a: 0 }) };
5344
}
5445
}

0 commit comments

Comments
 (0)