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! {
144144 ///
145145 /// ### Example
146146 ///
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.
149150 ///
150151 /// ```toml
151152 /// await-holding-invalid-types = [
152- /// "tracing::span::Entered",
153- /// "tracing::span::EnteredSpan",
153+ /// "std::string::String",
154154 /// ]
155155 /// ```
156156 ///
157157 /// ```rust
158158 /// # async fn baz() {}
159159 /// 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
162162 /// }
163163 /// ```
164164 #[ clippy:: version = "1.49.0" ]
You can’t perform that action at this time.
0 commit comments