diff --git a/book/src/development/trait_checking.md b/book/src/development/trait_checking.md index 089f20b6ce0..1c6f70cc059 100644 --- a/book/src/development/trait_checking.md +++ b/book/src/development/trait_checking.md @@ -78,8 +78,7 @@ implementation. > **Note**: This approach should be avoided if possible, the best thing to do would be to make a PR to [`rust-lang/rust`][rust]. -Below, we check if the given `expr` implements `tokio`'s -[`AsyncReadExt`][AsyncReadExt] trait: +Below, we check if the given `expr` implements the `Iterator`'s trait method `cloned` : ```rust use clippy_utils::{match_trait_method, paths}; @@ -95,7 +94,6 @@ impl LateLintPass<'_> for CheckTokioAsyncReadExtTrait { } ``` -[AsyncReadExt]: https://docs.rs/tokio/latest/tokio/io/trait.AsyncReadExt.html [DefId]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html [diagnostic_items]: https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-items.html [lang_items]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/lang_items/struct.LanguageItems.html @@ -105,4 +103,4 @@ impl LateLintPass<'_> for CheckTokioAsyncReadExtTrait { [symbol_index]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_span/symbol/sym/index.html [TyCtxt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html [using_diagnostic_items]: https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-items.html#using-diagnostic-items -[rust]: https://github.com/rust-lang/rust \ No newline at end of file +[rust]: https://github.com/rust-lang/rust