diff options
| -rw-r--r-- | doc/common_tools_writing_lints.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/common_tools_writing_lints.md b/doc/common_tools_writing_lints.md index 3390e60297c..552b9b2587b 100644 --- a/doc/common_tools_writing_lints.md +++ b/doc/common_tools_writing_lints.md @@ -105,6 +105,7 @@ impl LateLintPass<'_> for MyStructLint { } // 3. Using the type path + // This method should be avoided if possible if match_def_path(cx, def_id, &paths::RESULT) { // The type is a `core::result::Result` } @@ -142,6 +143,7 @@ impl LateLintPass<'_> for MyStructLint { // 3. Using the type path with the expression // we use `match_trait_method` function from Clippy's utils + // (This method should be avoided if possible) if match_trait_method(cx, expr, &paths::INTO) { // `expr` implements `Into` trait } |
