Skip to content

Commit 6713631

Browse files
committed
Auto merge of #13165 - riyueguang:master, r=Jarcho
chore: fix some comments fix some comments *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: none
2 parents 479491e + 8ca8ed9 commit 6713631

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

clippy_lints/src/from_str_radix_10.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl<'tcx> LateLintPass<'tcx> for FromStrRadix10 {
6262
&& matches!(prim_ty, PrimTy::Int(_) | PrimTy::Uint(_))
6363

6464
// do not lint in constant context, because the suggestion won't work.
65-
// NB: keep this check until a new `const_trait_impl` is available and stablized.
65+
// NB: keep this check until a new `const_trait_impl` is available and stabilized.
6666
&& !in_constant(cx, exp.hir_id)
6767
{
6868
let expr = if let ExprKind::AddrOf(_, _, expr) = &src.kind {

clippy_lints/src/loops/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ declare_clippy_lint! {
448448
#[clippy::version = "1.80.0"]
449449
pub WHILE_FLOAT,
450450
nursery,
451-
"while loops comaparing floating point values"
451+
"while loops comparing floating point values"
452452
}
453453

454454
declare_clippy_lint! {

clippy_lints/src/missing_const_for_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn already_const(header: hir::FnHeader) -> bool {
186186
fn could_be_const_with_abi(cx: &LateContext<'_>, msrv: &Msrv, abi: Abi) -> bool {
187187
match abi {
188188
Abi::Rust => true,
189-
// `const extern "C"` was stablized after 1.62.0
189+
// `const extern "C"` was stabilized after 1.62.0
190190
Abi::C { unwind: false } => msrv.meets(msrvs::CONST_EXTERN_FN),
191191
// Rest ABIs are still unstable and need the `const_extern_fn` feature enabled.
192192
_ => cx.tcx.features().const_extern_fn,

clippy_lints/src/pathbuf_init_then_push.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ declare_clippy_lint! {
2121
/// `PathBuf::from` instead.
2222
///
2323
/// ### Known problems
24-
/// `.join()` introduces an implicit `clone()`. `PathBuf::from` can alternativly be
25-
/// used when the `PathBuf` is newly constructed. This will avoild the implicit clone.
24+
/// `.join()` introduces an implicit `clone()`. `PathBuf::from` can alternatively be
25+
/// used when the `PathBuf` is newly constructed. This will avoid the implicit clone.
2626
///
2727
/// ### Example
2828
/// ```rust

clippy_lints/src/returns.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ fn check_final_expr<'tcx>(
395395
// Returns may be used to turn an expression into a statement in rustc's AST.
396396
// This allows the addition of attributes, like `#[allow]` (See: clippy#9361)
397397
// `#[expect(clippy::needless_return)]` needs to be handled separatly to
398-
// actually fullfil the expectation (clippy::#12998)
398+
// actually fulfill the expectation (clippy::#12998)
399399
match cx.tcx.hir().attrs(expr.hir_id) {
400400
[] => {},
401401
[attr] => {

tests/ui/unwrap_expect_used.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() {
3131

3232
// Don't trigger on unwrap_err on an option
3333
Some(3).unwrap_err();
34-
Some(3).expect_err("Hellow none!");
34+
Some(3).expect_err("Hello none!");
3535

3636
// Issue #11245: The `Err` variant can never be constructed so do not lint this.
3737
let x: Result<(), !> = Ok(());

0 commit comments

Comments
 (0)