diff options
| author | bors <bors@rust-lang.org> | 2022-05-24 17:11:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-24 17:11:45 +0000 |
| commit | 6269ab1eec7a84a66cf61d6231d6db1def1f1947 (patch) | |
| tree | 45b05a3412d22cd007dd0ccd83fe49118e4c6fd5 | |
| parent | fbb9e565e399e0e67ca1a8235776db8e2889d12b (diff) | |
| parent | 21d949381c282355cc949eea70a9b1617315bdd3 (diff) | |
| download | rust-6269ab1eec7a84a66cf61d6231d6db1def1f1947.tar.gz rust-6269ab1eec7a84a66cf61d6231d6db1def1f1947.zip | |
Auto merge of #8881 - dmarcoux:update-outdated-doc, r=llogiq
Fix imports for "Checking if a type defines a specific method" The import of `clippy_utils::is_type_diagnostic_item` would cause this error: ``` error[E0432]: unresolved import `clippy_utils::is_type_diagnostic_item ``` changelog: none
| -rw-r--r-- | doc/common_tools_writing_lints.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/common_tools_writing_lints.md b/doc/common_tools_writing_lints.md index 131ac3c3611..1d1aee0da2c 100644 --- a/doc/common_tools_writing_lints.md +++ b/doc/common_tools_writing_lints.md @@ -159,7 +159,8 @@ A list of defined paths for Clippy can be found in [paths.rs][paths] To check if our type defines a method called `some_method`: ```rust -use clippy_utils::{is_type_diagnostic_item, return_ty}; +use clippy_utils::ty::is_type_diagnostic_item; +use clippy_utils::return_ty; impl<'tcx> LateLintPass<'tcx> for MyTypeImpl { fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) { |
