-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Otherwise the test function is internalized and LLVM will most likely optimize it out.
- Loading branch information
1 parent
b0f6c29
commit caf7b67
Showing
9 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ fn foo(x: int) -> int { | |
} | ||
|
||
#[no_mangle] | ||
fn test() { | ||
pub fn test() { | ||
let _x = foo(10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
// except according to those terms. | ||
|
||
#[no_mangle] | ||
fn test() -> int { | ||
pub fn test() -> int { | ||
5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
// except according to those terms. | ||
|
||
#[no_mangle] | ||
fn test() { | ||
pub fn test() { | ||
let _x = "hello"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,6 @@ impl Struct { | |
} | ||
|
||
#[no_mangle] | ||
fn test(s: &Struct) -> int { | ||
pub fn test(s: &Struct) -> int { | ||
s.method() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ trait Trait { | |
} | ||
|
||
#[no_mangle] | ||
fn test(t: &Trait) -> int { | ||
pub fn test(t: &Trait) -> int { | ||
t.method().a | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ trait Trait { | |
} | ||
|
||
#[no_mangle] | ||
fn test(t: &Trait) -> int { | ||
pub fn test(t: &Trait) -> int { | ||
t.method() | ||
} |
caf7b67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from catamorphism
at alexcrichton@caf7b67
caf7b67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging alexcrichton/rust/reachable = caf7b67 into auto
caf7b67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alexcrichton/rust/reachable = caf7b67 merged ok, testing candidate = 8015f9c
caf7b67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/1932
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1937
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1042
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1042
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1950
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1042
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1042
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1951
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1042
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1042
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/1122
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1935
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1041
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1042
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/1720
caf7b67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 8015f9c