summaryrefslogtreecommitdiff
path: root/examples/rust/src/print.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rust/src/print.rs')
-rw-r--r--examples/rust/src/print.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/rust/src/print.rs b/examples/rust/src/print.rs
index d2934f0..991ea4a 100644
--- a/examples/rust/src/print.rs
+++ b/examples/rust/src/print.rs
@@ -7,5 +7,7 @@ unsafe extern "C" {
#[unsafe(no_mangle)]
pub unsafe extern "C" fn add_and_print(lh: i32, rh: i32) {
- printi32(lh + rh);
+ unsafe {
+ printi32(lh + rh);
+ }
}