博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2020年3月26日

摘要: 在使用 闭包+move后 数值类型的变量仍然可以引用,但是string变量不能再引用,提示已经“value borrowed here after move”,从这里可以引申,其它引用类型如struct 应该跟string一样处理。 pub fn main(){ let ch='英'; let ch 阅读全文

posted @ 2020-03-26 01:20 liufu627 阅读(213) 评论(0) 推荐(0)