Fix some typos

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2023-10-29 11:59:40 +08:00
parent 5852ca8443
commit 2030c58b81
6 changed files with 8 additions and 8 deletions

View File

@ -409,7 +409,7 @@ declare_clippy_lint! {
/// ///
/// ### Why is this bad? /// ### Why is this bad?
/// Misspelling `feature` as `features` can be sometimes hard to spot. It /// 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 /// ### Example
/// ```no_run /// ```no_run

View File

@ -110,12 +110,12 @@ impl<'tcx> LateLintPass<'tcx> for FromOverInto {
extract_msrv_attr!(LateContext); extract_msrv_attr!(LateContext);
} }
/// Finds the occurences of `Self` and `self` /// Finds the occurrences of `Self` and `self`
struct SelfFinder<'a, 'tcx> { struct SelfFinder<'a, 'tcx> {
cx: &'a LateContext<'tcx>, cx: &'a LateContext<'tcx>,
/// Occurences of `Self` /// Occurrences of `Self`
upper: Vec<Span>, upper: Vec<Span>,
/// Occurences of `self` /// Occurrences of `self`
lower: Vec<Span>, lower: Vec<Span>,
/// If any of the `self`/`Self` usages were from an expansion, or the body contained a binding /// If any of the `self`/`Self` usages were from an expansion, or the body contained a binding
/// already named `val` /// already named `val`

View File

@ -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 // block with 2+ statements or 1 expr and 1+ statement
Some(els) Some(els)
} else { } 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; return;
}; };

View File

@ -29,7 +29,7 @@ declare_clippy_lint! {
#[clippy::version = "1.73.0"] #[clippy::version = "1.73.0"]
pub RESERVE_AFTER_INITIALIZATION, pub RESERVE_AFTER_INITIALIZATION,
complexity, complexity,
"`reserve` called immediatly after `Vec` creation" "`reserve` called immediately after `Vec` creation"
} }
impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]); impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]);

View File

@ -9,7 +9,7 @@ use rustc_span::sym;
declare_clippy_lint! { declare_clippy_lint! {
/// ### What it does /// ### 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? /// ### Why is this bad?
/// It introduces unnecessary complexity. In this case the function can be used directly and /// It introduces unnecessary complexity. In this case the function can be used directly and

View File

@ -11,7 +11,7 @@ declare_clippy_lint! {
/// Checks if lint formulations have a standardized format. /// Checks if lint formulations have a standardized format.
/// ///
/// ### Why is this bad? /// ### 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 /// ### Example
/// `Checks for use...` can be written as `Checks for usage...` . /// `Checks for use...` can be written as `Checks for usage...` .