Update must_not_suspend lint to traverse references
This commit is contained in:
parent
bdfc688558
commit
89d35060b9
2 changed files with 12 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
error: `Umm` held across a suspend point, but should not be
|
||||
--> $DIR/ref.rs:18:26
|
||||
error: reference to `Umm` held across a suspend point, but should not be
|
||||
--> $DIR/ref.rs:18:13
|
||||
|
|
||||
LL | let guard = &mut self.u;
|
||||
| ^^^^^^
|
||||
|
|
@ -13,15 +13,15 @@ note: the lint level is defined here
|
|||
LL | #![deny(must_not_suspend)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
note: You gotta use Umm's, ya know?
|
||||
--> $DIR/ref.rs:18:26
|
||||
--> $DIR/ref.rs:18:13
|
||||
|
|
||||
LL | let guard = &mut self.u;
|
||||
| ^^^^^^
|
||||
| ^^^^^
|
||||
help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
|
||||
--> $DIR/ref.rs:18:26
|
||||
--> $DIR/ref.rs:18:13
|
||||
|
|
||||
LL | let guard = &mut self.u;
|
||||
| ^^^^^^
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue