diff options
| author | bors <bors@rust-lang.org> | 2021-10-06 13:23:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-06 13:23:13 +0000 |
| commit | b9d753e4f5eb921a4185d5bbaef15a5af2c43e2f (patch) | |
| tree | 463a2919d122d902453ddc70c504aecdef57d68c | |
| parent | c6b915825f279bd3f1bea4dbbbd2829a57308280 (diff) | |
| parent | 8b379281311e28384cefa554b5f6dc02b8977377 (diff) | |
| download | rust-b9d753e4f5eb921a4185d5bbaef15a5af2c43e2f.tar.gz rust-b9d753e4f5eb921a4185d5bbaef15a5af2c43e2f.zip | |
Auto merge of #7776 - tsoutsman:patch-1, r=flip1995
Fix typos I'm not sure whether I should add links to `bool`, `char`, and `str`. `slice` could also be linked to. changelog: none
| -rw-r--r-- | clippy_utils/src/ty.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs index d6f9ebe89bc..834889314db 100644 --- a/clippy_utils/src/ty.rs +++ b/clippy_utils/src/ty.rs @@ -224,15 +224,15 @@ fn is_normalizable_helper<'tcx>( result } -/// Returns true iff the given type is a non aggregate primitive (a bool or char, any integer or -/// floating-point number type). For checking aggregation of primitive types (e.g. tuples and slices -/// of primitive type) see `is_recursively_primitive_type` +/// Returns `true` if the given type is a non aggregate primitive (a `bool` or `char`, any +/// integer or floating-point number type). For checking aggregation of primitive types (e.g. +/// tuples and slices of primitive type) see `is_recursively_primitive_type` pub fn is_non_aggregate_primitive_type(ty: Ty<'_>) -> bool { matches!(ty.kind(), ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_)) } -/// Returns true iff the given type is a primitive (a bool or char, any integer or floating-point -/// number type, a str, or an array, slice, or tuple of those types). +/// Returns `true` if the given type is a primitive (a `bool` or `char`, any integer or +/// floating-point number type, a `str`, or an array, slice, or tuple of those types). pub fn is_recursively_primitive_type(ty: Ty<'_>) -> bool { match ty.kind() { ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => true, |
