- プログラミング言語 Rust
193 :192[sage]:2015/02/06(金) 01:49:34.64 ID:f5aiPF8n - エラーこんな感じで
src/main.rs:3:14: 3:17 error: borrowed value does not live long enough src/main.rs:3 let mut b = &2is; ^~~ src/main.rs:2:17: 5:2 note: reference must be valid for the block suffix following statement 0 at 2:16... src/main.rs:2 let mut a = &1is; src/main.rs:3 let mut b = &2is; src/main.rs:4 a = b; src/main.rs:5 } src/main.rs:3:17: 5:2 note: ...but borrowed value is only valid for the block suffix following statement 1 at 3:16 src/main.rs:3 let mut b = &2is; src/main.rs:4 a = b; src/main.rs:5 }
|