]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/error-codes/E0311.stderr
Improve description again
[rust.git] / src / test / ui / error-codes / E0311.stderr
index a219a6352adc8a2061ee44bcf3b7e526b4f41c16..2cf6404f2f1c0265eb3dec8d20240884d417c219 100644 (file)
@@ -20,10 +20,10 @@ LL |     U: BorrowMut<V> + 'a, // Error is caused by missing lifetime here
    |                     ++++
 
 error[E0311]: the parameter type `U` may not live long enough
-  --> $DIR/E0311.rs:14:9
+  --> $DIR/E0311.rs:14:21
    |
-LL |         u_ref.borrow_mut()
-   |         ^^^^^^^^^^^^^^^^^^
+LL |         let v_ref = u_ref.borrow_mut();
+   |                     ^^^^^^^^^^^^^^^^^^
    |
 note: the parameter type `U` must be valid for the anonymous lifetime defined here...
   --> $DIR/E0311.rs:12:26
@@ -31,10 +31,10 @@ note: the parameter type `U` must be valid for the anonymous lifetime defined he
 LL |     fn nested_borrow_mut(&mut self) -> &mut V {
    |                          ^^^^^^^^^
 note: ...so that the type `U` will meet its required lifetime bounds
-  --> $DIR/E0311.rs:14:9
+  --> $DIR/E0311.rs:14:21
    |
-LL |         u_ref.borrow_mut()
-   |         ^^^^^^^^^^^^^^^^^^
+LL |         let v_ref = u_ref.borrow_mut();
+   |                     ^^^^^^^^^^^^^^^^^^
 help: consider adding an explicit lifetime bound...
    |
 LL |     U: BorrowMut<V> + 'a, // Error is caused by missing lifetime here