diff options
Diffstat (limited to 'src/symbols/rust_str.rs')
-rw-r--r-- | src/symbols/rust_str.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/symbols/rust_str.rs b/src/symbols/rust_str.rs index 3d5ec344..3b33bc4a 100644 --- a/src/symbols/rust_str.rs +++ b/src/symbols/rust_str.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "alloc")] use alloc::string::String; use core::mem::MaybeUninit; use core::ptr; @@ -10,6 +11,7 @@ unsafe extern "C" fn str_new(this: &mut MaybeUninit<&str>) { unsafe { ptr::write(this, "") } } +#[cfg(feature = "alloc")] #[export_name = "cxxbridge1$str$ref"] unsafe extern "C" fn str_ref<'a>(this: &mut MaybeUninit<&'a str>, string: &'a String) { let this = this.as_mut_ptr(); |