fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0506]: cannot assign to `*s` because it is borrowed 2 --> $DIR/guarantor-issue-46974.rs:7:5 3 | 4LL | let t = &mut *s; // this borrow should last for the entire function 5 | ------- `*s` is borrowed here 6LL | let x = &t.0; 7LL | *s = (2,); 8 | ^^^^^^^^^ `*s` is assigned to here but it was already borrowed 9LL | *x 10 | -- borrow later used here 11 12error: lifetime may not live long enough 13 --> $DIR/guarantor-issue-46974.rs:12:5 14 | 15LL | fn bar(s: &Box<(i32,)>) -> &'static i32 { 16 | - let's call the lifetime of this reference `'1` 17LL | &s.0 18 | ^^^^ returning this value requires that `'1` must outlive `'static` 19 20error: aborting due to 2 previous errors 21 22For more information about this error, try `rustc --explain E0506`.