Skip to content

Commit 295df88

Browse files
committed
Reword is_trait_item description
1 parent 23d398b commit 295df88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_utils/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ pub fn is_trait_method(cx: &LateContext<'_>, expr: &Expr<'_>, diag_item: Symbol)
332332
/// For checking method call expressions instead of path expressions, use
333333
/// [`is_trait_method`].
334334
///
335-
/// For example, to find if an expression like `u64::default` refers to an item
336-
/// of the trait `Default`, which is marked `#[rustc_diagnostic_item = "Default"]`,
337-
/// a `diag_item` of `sym::Default` should be used.
335+
/// For example, this can be used to find if an expression like `u64::default`
336+
/// refers to an item of the trait `Default`, which is associated with the
337+
/// `diag_item` of `sym::Default`.
338338
pub fn is_trait_item(cx: &LateContext<'_>, expr: &Expr<'_>, diag_item: Symbol) -> bool {
339339
if let hir::ExprKind::Path(ref qpath) = expr.kind {
340340
cx.qpath_res(qpath, expr.hir_id)

0 commit comments

Comments
 (0)