Attribute Macro erg_proc_macros::to_owned
source · #[to_owned]
Expand description
#[erg_proc_macros::to_owned]
fn foo(s: &str) -> &str { s }
↓ ↓
fn foo(s: &str) -> String { let r = s; r.to_owned() }
#[to_owned]
#[erg_proc_macros::to_owned]
fn foo(s: &str) -> &str { s }
↓ ↓
fn foo(s: &str) -> String { let r = s; r.to_owned() }