diff options
| author | Philipp Krones <hello@philkrones.com> | 2025-05-31 14:09:03 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2025-05-31 14:09:03 +0200 |
| commit | 384b53eee2a479969347bbe3a46c504353cc00a2 (patch) | |
| tree | f11d7e335b46a53087a622c8360b5b842ef59e20 /book/src | |
| parent | 660aede53066ca0ab4354160d982d19b7962739b (diff) | |
| parent | 2948678647a298047a42c72d7060bf509d74bd1d (diff) | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'book/src')
| -rw-r--r-- | book/src/development/trait_checking.md | 4 | ||||
| -rw-r--r-- | book/src/lint_configuration.md | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/book/src/development/trait_checking.md b/book/src/development/trait_checking.md index cc4eb966f59..6d01496eebe 100644 --- a/book/src/development/trait_checking.md +++ b/book/src/development/trait_checking.md @@ -17,7 +17,7 @@ providing the `LateContext` (`cx`), our expression at hand, and the symbol of the trait in question: ```rust -use clippy_utils::is_trait_method; +use clippy_utils::ty::implements_trait; use rustc_hir::Expr; use rustc_lint::{LateContext, LateLintPass}; use rustc_span::symbol::sym; @@ -25,7 +25,7 @@ use rustc_span::symbol::sym; impl LateLintPass<'_> for CheckIteratorTraitLint { fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { let implements_iterator = cx.tcx.get_diagnostic_item(sym::Iterator).map_or(false, |id| { - implements_trait(cx, cx.typeck_results().expr_ty(arg), id, &[]) + implements_trait(cx, cx.typeck_results().expr_ty(expr), id, &[]) }); if implements_iterator { // [...] diff --git a/book/src/lint_configuration.md b/book/src/lint_configuration.md index 9809e32de8a..7c850b4b023 100644 --- a/book/src/lint_configuration.md +++ b/book/src/lint_configuration.md @@ -1026,7 +1026,7 @@ The order of associated items in traits. The maximum size (in bytes) to consider a `Copy` type for passing by value instead of by reference. -**Default Value:** `target_pointer_width * 2` +**Default Value:** `target_pointer_width` --- **Affected lints:** |
