Fix some typos
Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
parent
5852ca8443
commit
2030c58b81
@ -409,7 +409,7 @@ declare_clippy_lint! {
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// Misspelling `feature` as `features` can be sometimes hard to spot. It
|
||||
/// may cause conditional compilation not work quitely.
|
||||
/// may cause conditional compilation not work quietly.
|
||||
///
|
||||
/// ### Example
|
||||
/// ```no_run
|
||||
|
@ -110,12 +110,12 @@ impl<'tcx> LateLintPass<'tcx> for FromOverInto {
|
||||
extract_msrv_attr!(LateContext);
|
||||
}
|
||||
|
||||
/// Finds the occurences of `Self` and `self`
|
||||
/// Finds the occurrences of `Self` and `self`
|
||||
struct SelfFinder<'a, 'tcx> {
|
||||
cx: &'a LateContext<'tcx>,
|
||||
/// Occurences of `Self`
|
||||
/// Occurrences of `Self`
|
||||
upper: Vec<Span>,
|
||||
/// Occurences of `self`
|
||||
/// Occurrences of `self`
|
||||
lower: Vec<Span>,
|
||||
/// If any of the `self`/`Self` usages were from an expansion, or the body contained a binding
|
||||
/// already named `val`
|
||||
|
@ -51,7 +51,7 @@ pub(crate) fn check(cx: &LateContext<'_>, ex: &Expr<'_>, arms: &[Arm<'_>], expr:
|
||||
// block with 2+ statements or 1 expr and 1+ statement
|
||||
Some(els)
|
||||
} else {
|
||||
// not a block or an emtpy block w/ comments, don't lint
|
||||
// not a block or an empty block w/ comments, don't lint
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@ declare_clippy_lint! {
|
||||
#[clippy::version = "1.73.0"]
|
||||
pub RESERVE_AFTER_INITIALIZATION,
|
||||
complexity,
|
||||
"`reserve` called immediatly after `Vec` creation"
|
||||
"`reserve` called immediately after `Vec` creation"
|
||||
}
|
||||
impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]);
|
||||
|
||||
|
@ -9,7 +9,7 @@ use rustc_span::sym;
|
||||
|
||||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// Suggest removing the use of a may (or map_err) method when an Option or Result is being construted.
|
||||
/// Suggest removing the use of a may (or map_err) method when an Option or Result is being constructed.
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// It introduces unnecessary complexity. In this case the function can be used directly and
|
||||
|
@ -11,7 +11,7 @@ declare_clippy_lint! {
|
||||
/// Checks if lint formulations have a standardized format.
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// It's not neccessarily bad, but we try to enforce a standard in Clippy.
|
||||
/// It's not necessarily bad, but we try to enforce a standard in Clippy.
|
||||
///
|
||||
/// ### Example
|
||||
/// `Checks for use...` can be written as `Checks for usage...` .
|
||||
|
Loading…
x
Reference in New Issue
Block a user