PR3-Rust-SS26/D-ownership/example-code/02-ownership/memory-leak.rs

7 lines
98 B
Rust

fn main() {
let s1 = String::from("hello");
let s2 = s1;
println!("{s1}, world!");
}