You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -60,7 +60,7 @@ The `must_not_await` attribute is used to issue a diagnostic warning when a valu
60
60
61
61
The `must_not_await` attribute may include a message by using the [`MetaNameValueStr`] syntax such as `#[must_not_await = "example message"]`. The message will be given alongside the warning.
62
62
63
-
When used on a user-defined composite type, if the [expression] of an [expression statement] has this type and is used across an await point, then this lint is violated.
63
+
When used on a user-defined composite type, if a value exists across an await point, then this lint is violated.
64
64
65
65
66
66
```rust
@@ -74,7 +74,7 @@ async fn foo() {
74
74
}
75
75
```
76
76
77
-
When used on a function, if the [expression] of an [expression statement] is a [call expression] to that function, and the expression is held across an await point, this lint is violated.
77
+
When used on a function, if the value returned by a function is held across an await point, this lint is violated.
78
78
79
79
```rust
80
80
#[must_not_await]
@@ -87,7 +87,7 @@ async fn foo() {
87
87
}
88
88
```
89
89
90
-
When used on a [trait declaration], a [call expression] of an [expression statement] to a function that returns an [impl trait] of that trait and if the value is held across an await point, the lint is violated.
90
+
When used on a [trait declaration], if the value implementing that trait is held across an await point, the lint is violated.
91
91
92
92
```rust
93
93
traitTrait {
@@ -109,11 +109,7 @@ async fn foo() {
109
109
When used on a function in a trait implementation, the attribute does nothing.
0 commit comments