Skip to content

Commit 86b7777

Browse files
committed
Add note to Rust example explaining why functions are missing in the output
Rust issue: rust-lang/rust#119850
1 parent 5b9af2f commit 86b7777

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/rust/default.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
// Type your code here, or load an example.
2+
3+
// As of Rust 1.75, small functions are automatically
4+
// marked as `#[inline]` so they will not show up in
5+
// the output when compiling with optimisations. Use
6+
// `#[no_mangle]` or `#[inline(never)]` to work around
7+
// this issue.
8+
#[no_mangle]
29
pub fn square(num: i32) -> i32 {
310
num * num
411
}

0 commit comments

Comments
 (0)