You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structClosure<'a>{inner1:&'a i32,}impl<'a>Closure<'a>{fncall(&self,a:i32) -> i32{self.inner1 + a
}}fnmain(){let x = 1_i32;let add_x = Closure{inner1:&x };let result = add_x.call(5);println!("result is {}", result);}
The text was updated successfully, but these errors were encountered:
hyuuko1
changed the title
[机工社 P254] inner1 的类型应为 &i32
[机工社 P254 P328] inner1 的类型应为 &i32 等问题
Aug 6, 2020
应该改成
The text was updated successfully, but these errors were encountered: