// Here, some_integer goes out of scope. Nothing special happens.
Here, some_integer goes out of scope. Nothing special happens.
Here some_integer goes out of scope . Nothing special happens .
fn gives_ownership() -> String {             // gives_ownership will move its
                                             // return value into the function
                                             // that calls it
    let some_string = String::from("hello"); // some_string comes into scope
    some_string                              // some_string is returned and
                                             // moves out to the calling
                                             // function
}
fn gives_ownership ( ) -> String { // gives_ownership will move its // return value into the function // that calls it let some_string = String :: from ( " " ) ; // some_string comes into scope some_string // some_string is returned and // moves out to the calling // function }
Here, some_integer goes out of scope.
Here some_integer goes out of scope .