News for hackers. Stuff that matters.
Re:An Overview of Memory Management in Rust by dbaupp on Tuesday March 19, 2013 @04:19AM (#5399560)
pcwalton is the voice of authority here, but to add to that, the following (verbose) example compiles and works as expected:

  fn make_string() -> ~str {
      return ~"foo";
  }

  fn main() {
     let string: ~str = make_string();

     io::println(string);
  } // deallocated here
Re:An Overview of Memory Management in Rust by minamea on Tuesday March 19, 2013 @02:51PM (#5402823)
My bad folks :)