Skip to content

Commit 7bb9353

Browse files
Update codegen-unit tests.
1 parent b61ee51 commit 7bb9353

File tree

7 files changed

+47
-47
lines changed

7 files changed

+47
-47
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// compile-flags:-Zinline-in-all-cgus
1717

1818
#![allow(dead_code)]
19-
#![crate_type="lib"]
19+
#![crate_type="rlib"]
2020

2121
// aux-build:cgu_extern_drop_glue.rs
2222
extern crate cgu_extern_drop_glue;
@@ -25,20 +25,20 @@ extern crate cgu_extern_drop_glue;
2525

2626
struct LocalStruct(cgu_extern_drop_glue::Struct);
2727

28-
//~ TRANS_ITEM fn extern_drop_glue::user[0] @@ extern_drop_glue[Internal]
29-
fn user()
28+
//~ TRANS_ITEM fn extern_drop_glue::user[0] @@ extern_drop_glue[External]
29+
pub fn user()
3030
{
3131
//~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::LocalStruct[0]> @@ extern_drop_glue[Internal]
3232
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
3333
}
3434

35-
mod mod1 {
35+
pub mod mod1 {
3636
use cgu_extern_drop_glue;
3737

3838
struct LocalStruct(cgu_extern_drop_glue::Struct);
3939

40-
//~ TRANS_ITEM fn extern_drop_glue::mod1[0]::user[0] @@ extern_drop_glue-mod1[Internal]
41-
fn user()
40+
//~ TRANS_ITEM fn extern_drop_glue::mod1[0]::user[0] @@ extern_drop_glue-mod1[External]
41+
pub fn user()
4242
{
4343
//~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::mod1[0]::LocalStruct[0]> @@ extern_drop_glue-mod1[Internal]
4444
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));

src/test/codegen-units/partitioning/inlining-from-extern-crate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ pub fn user()
3535
cgu_explicit_inlining::never_inlined();
3636
}
3737

38-
mod mod1 {
38+
pub mod mod1 {
3939
use cgu_explicit_inlining;
4040

41-
//~ TRANS_ITEM fn inlining_from_extern_crate::mod1[0]::user[0] @@ inlining_from_extern_crate-mod1[Internal]
41+
//~ TRANS_ITEM fn inlining_from_extern_crate::mod1[0]::user[0] @@ inlining_from_extern_crate-mod1[External]
4242
pub fn user()
4343
{
4444
cgu_explicit_inlining::inlined();
@@ -48,10 +48,10 @@ mod mod1 {
4848
}
4949
}
5050

51-
mod mod2 {
51+
pub mod mod2 {
5252
use cgu_explicit_inlining;
5353

54-
//~ TRANS_ITEM fn inlining_from_extern_crate::mod2[0]::user[0] @@ inlining_from_extern_crate-mod2[Internal]
54+
//~ TRANS_ITEM fn inlining_from_extern_crate::mod2[0]::user[0] @@ inlining_from_extern_crate-mod2[External]
5555
pub fn user()
5656
{
5757
cgu_explicit_inlining::always_inlined();

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// compile-flags:-Zinline-in-all-cgus
1616

1717
#![allow(dead_code)]
18-
#![crate_type="lib"]
18+
#![crate_type="rlib"]
1919

2020
//~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Struct[0]> @@ local_drop_glue[Internal] local_drop_glue-mod1[Internal]
2121
struct Struct {
@@ -32,8 +32,8 @@ struct Outer {
3232
_a: Struct
3333
}
3434

35-
//~ TRANS_ITEM fn local_drop_glue::user[0] @@ local_drop_glue[Internal]
36-
fn user()
35+
//~ TRANS_ITEM fn local_drop_glue::user[0] @@ local_drop_glue[External]
36+
pub fn user()
3737
{
3838
let _ = Outer {
3939
_a: Struct {
@@ -42,7 +42,7 @@ fn user()
4242
};
4343
}
4444

45-
mod mod1
45+
pub mod mod1
4646
{
4747
use super::Struct;
4848

@@ -53,8 +53,8 @@ mod mod1
5353
_b: (u32, Struct),
5454
}
5555

56-
//~ TRANS_ITEM fn local_drop_glue::mod1[0]::user[0] @@ local_drop_glue-mod1[Internal]
57-
fn user()
56+
//~ TRANS_ITEM fn local_drop_glue::mod1[0]::user[0] @@ local_drop_glue-mod1[External]
57+
pub fn user()
5858
{
5959
let _ = Struct2 {
6060
_a: Struct { _a: 0 },

src/test/codegen-units/partitioning/local-inlining-but-not-all.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,28 @@ mod inline {
2727
}
2828
}
2929

30-
mod user1 {
30+
pub mod user1 {
3131
use super::inline;
3232

33-
//~ TRANS_ITEM fn local_inlining_but_not_all::user1[0]::foo[0] @@ local_inlining_but_not_all-user1[Internal]
34-
fn foo() {
33+
//~ TRANS_ITEM fn local_inlining_but_not_all::user1[0]::foo[0] @@ local_inlining_but_not_all-user1[External]
34+
pub fn foo() {
3535
inline::inlined_function();
3636
}
3737
}
3838

39-
mod user2 {
39+
pub mod user2 {
4040
use super::inline;
4141

42-
//~ TRANS_ITEM fn local_inlining_but_not_all::user2[0]::bar[0] @@ local_inlining_but_not_all-user2[Internal]
43-
fn bar() {
42+
//~ TRANS_ITEM fn local_inlining_but_not_all::user2[0]::bar[0] @@ local_inlining_but_not_all-user2[External]
43+
pub fn bar() {
4444
inline::inlined_function();
4545
}
4646
}
4747

48-
mod non_user {
48+
pub mod non_user {
4949

50-
//~ TRANS_ITEM fn local_inlining_but_not_all::non_user[0]::baz[0] @@ local_inlining_but_not_all-non_user[Internal]
51-
fn baz() {
50+
//~ TRANS_ITEM fn local_inlining_but_not_all::non_user[0]::baz[0] @@ local_inlining_but_not_all-non_user[External]
51+
pub fn baz() {
5252

5353
}
5454
}

src/test/codegen-units/partitioning/local-inlining.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@ mod inline {
2828
}
2929
}
3030

31-
mod user1 {
31+
pub mod user1 {
3232
use super::inline;
3333

34-
//~ TRANS_ITEM fn local_inlining::user1[0]::foo[0] @@ local_inlining-user1[Internal]
35-
fn foo() {
34+
//~ TRANS_ITEM fn local_inlining::user1[0]::foo[0] @@ local_inlining-user1[External]
35+
pub fn foo() {
3636
inline::inlined_function();
3737
}
3838
}
3939

40-
mod user2 {
40+
pub mod user2 {
4141
use super::inline;
4242

43-
//~ TRANS_ITEM fn local_inlining::user2[0]::bar[0] @@ local_inlining-user2[Internal]
44-
fn bar() {
43+
//~ TRANS_ITEM fn local_inlining::user2[0]::bar[0] @@ local_inlining-user2[External]
44+
pub fn bar() {
4545
inline::inlined_function();
4646
}
4747
}
4848

49-
mod non_user {
49+
pub mod non_user {
5050

51-
//~ TRANS_ITEM fn local_inlining::non_user[0]::baz[0] @@ local_inlining-non_user[Internal]
52-
fn baz() {
51+
//~ TRANS_ITEM fn local_inlining::non_user[0]::baz[0] @@ local_inlining-non_user[External]
52+
pub fn baz() {
5353

5454
}
5555
}

src/test/codegen-units/partitioning/local-transitive-inlining.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// compile-flags:-Zinline-in-all-cgus
1616

1717
#![allow(dead_code)]
18-
#![crate_type="lib"]
18+
#![crate_type="rlib"]
1919

2020
mod inline {
2121

@@ -37,19 +37,19 @@ mod direct_user {
3737
}
3838
}
3939

40-
mod indirect_user {
40+
pub mod indirect_user {
4141
use super::direct_user;
4242

43-
//~ TRANS_ITEM fn local_transitive_inlining::indirect_user[0]::bar[0] @@ local_transitive_inlining-indirect_user[Internal]
44-
fn bar() {
43+
//~ TRANS_ITEM fn local_transitive_inlining::indirect_user[0]::bar[0] @@ local_transitive_inlining-indirect_user[External]
44+
pub fn bar() {
4545
direct_user::foo();
4646
}
4747
}
4848

49-
mod non_user {
49+
pub mod non_user {
5050

51-
//~ TRANS_ITEM fn local_transitive_inlining::non_user[0]::baz[0] @@ local_transitive_inlining-non_user[Internal]
52-
fn baz() {
51+
//~ TRANS_ITEM fn local_transitive_inlining::non_user[0]::baz[0] @@ local_transitive_inlining-non_user[External]
52+
pub fn baz() {
5353

5454
}
5555
}

src/test/codegen-units/partitioning/statics.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
// incremental compilation
1414
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/statics
1515

16-
#![crate_type="lib"]
16+
#![crate_type="rlib"]
1717

1818
//~ TRANS_ITEM static statics::FOO[0] @@ statics[Internal]
1919
static FOO: u32 = 0;
2020

2121
//~ TRANS_ITEM static statics::BAR[0] @@ statics[Internal]
2222
static BAR: u32 = 0;
2323

24-
//~ TRANS_ITEM fn statics::function[0] @@ statics[Internal]
25-
fn function() {
24+
//~ TRANS_ITEM fn statics::function[0] @@ statics[External]
25+
pub fn function() {
2626
//~ TRANS_ITEM static statics::function[0]::FOO[0] @@ statics[Internal]
2727
static FOO: u32 = 0;
2828

2929
//~ TRANS_ITEM static statics::function[0]::BAR[0] @@ statics[Internal]
3030
static BAR: u32 = 0;
3131
}
3232

33-
mod mod1 {
33+
pub mod mod1 {
3434
//~ TRANS_ITEM static statics::mod1[0]::FOO[0] @@ statics-mod1[Internal]
3535
static FOO: u32 = 0;
3636

3737
//~ TRANS_ITEM static statics::mod1[0]::BAR[0] @@ statics-mod1[Internal]
3838
static BAR: u32 = 0;
3939

40-
//~ TRANS_ITEM fn statics::mod1[0]::function[0] @@ statics-mod1[Internal]
41-
fn function() {
40+
//~ TRANS_ITEM fn statics::mod1[0]::function[0] @@ statics-mod1[External]
41+
pub fn function() {
4242
//~ TRANS_ITEM static statics::mod1[0]::function[0]::FOO[0] @@ statics-mod1[Internal]
4343
static FOO: u32 = 0;
4444

0 commit comments

Comments
 (0)