[−][src]Function tao_of_rust::ch05::borrow::deref_move_type
pub fn deref_move_type()
解引用操作将获得所有权
Base usage: 解引用移动语义类型需要注意
fn join(s: &String) -> String { let append = *s; "Hello".to_string() + &append } fn main(){ let x = " hello".to_string(); join(&x); }Run