-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The culprit lied in rust-lang/rust#116505 In short, with default features turned off, main was trivial enough to be marked as inline function automatically which then made the symbol weak. Since nobody was referencing it, it got stripped away. Marking main in default-features=false config as #[inline(never)] or replacing 1 + 1 in it's body with a simple println!("foo") call (to make the main function sophisticated enough not to be subject to the new automatic marking as inline) makes the test pass again.
- Loading branch information
Showing
3 changed files
with
12 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#[inline(never)] | ||
pub fn add(a: usize, b: usize) -> usize { | ||
a + b | ||
} | ||
|