3.5.2自引用结构体中 #511
swellingWu
started this conversation in
内容建议
Replies: 1 comment
-
书写错误。。感谢提醒,已修复 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
struct RefWithMe<'a> {
value: String,
pointer_to_value: &'a str,
}
fn main(){
let s = "aaa".to_string();
let v = SelfRef {
value: s,
pointer_to_value: &s
};
}
——>main函数中 SelfRef 是书写错误么,还是象征 引用结构体 的意思
Beta Was this translation helpful? Give feedback.
All reactions