File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -144,21 +144,21 @@ declare_clippy_lint! {
144
144
///
145
145
/// ### Example
146
146
///
147
- /// The `tracing` library has types which should not be held across `await`
148
- /// points.
147
+ /// Strings are, of course, safe to hold across await points. This example
148
+ /// exists only to show how this lint might be configured for third-party
149
+ /// crates.
149
150
///
150
151
/// ```toml
151
152
/// await-holding-invalid-types = [
152
- /// "tracing::span::Entered",
153
- /// "tracing::span::EnteredSpan",
153
+ /// "std::string::String",
154
154
/// ]
155
155
/// ```
156
156
///
157
157
/// ```rust
158
158
/// # async fn baz() {}
159
159
/// async fn foo() {
160
- /// let _entered = tracing::info_span!("baz").entered( );
161
- /// baz().await;
160
+ /// let _x = String::from("hello!" );
161
+ /// baz().await; // Lint violation
162
162
/// }
163
163
/// ```
164
164
#[ clippy:: version = "1.49.0" ]
You can’t perform that action at this time.
0 commit comments