Skip to content

Commit

Permalink
Add note to Rust example explaining why functions are missing in the …
Browse files Browse the repository at this point in the history
…output

Rust issue: rust-lang/rust#119850
  • Loading branch information
narpfel committed Jan 16, 2024
1 parent 5b9af2f commit 86b7777
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/rust/default.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
// Type your code here, or load an example.

// As of Rust 1.75, small functions are automatically
// marked as `#[inline]` so they will not show up in
// the output when compiling with optimisations. Use
// `#[no_mangle]` or `#[inline(never)]` to work around
// this issue.
#[no_mangle]
pub fn square(num: i32) -> i32 {
num * num
}
Expand Down

0 comments on commit 86b7777

Please sign in to comment.