From a0b3452fb5809fab08b6c10fc778abbe6f3e0abf Mon Sep 17 00:00:00 2001 From: ericlehong <193237094+ericlehong@users.noreply.github.com> Date: Mon, 30 Dec 2024 21:43:22 +0800 Subject: [PATCH] Fix typos Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com> --- src/etc/test-float-parse/README.md | 2 +- src/etc/test-float-parse/src/lib.rs | 8 ++++---- src/tools/suggest-tests/src/static_suggestions.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/etc/test-float-parse/README.md b/src/etc/test-float-parse/README.md index 21b20d0a072d7..5e2c43d1cad61 100644 --- a/src/etc/test-float-parse/README.md +++ b/src/etc/test-float-parse/README.md @@ -3,7 +3,7 @@ These are tests designed to test decimal to float conversions (`dec2flt`) used by the standard library. -It consistes of a collection of test generators that each generate a set of +It consists of a collection of test generators that each generate a set of patterns intended to test a specific property. In addition, there are exhaustive tests (for <= `f32`) and fuzzers (for anything that can't be run exhaustively). diff --git a/src/etc/test-float-parse/src/lib.rs b/src/etc/test-float-parse/src/lib.rs index 71b1aa0667109..3c71b0dc32e74 100644 --- a/src/etc/test-float-parse/src/lib.rs +++ b/src/etc/test-float-parse/src/lib.rs @@ -35,7 +35,7 @@ const DEFAULT_MAX_FAILURES: u64 = 20; /// Register exhaustive tests only for <= 32 bits. No more because it would take years. const MAX_BITS_FOR_EXHAUUSTIVE: u32 = 32; -/// If there are more tests than this threashold, the test will be defered until after all +/// If there are more tests than this threshold, the test will be deferred until after all /// others run (so as to avoid thread pool starvation). They also can be excluded with /// `--skip-huge`. const HUGE_TEST_CUTOFF: u64 = 5_000_000; @@ -109,7 +109,7 @@ pub fn run(cfg: Config, include: &[String], exclude: &[String]) -> ExitCode { ui::finish(&tests, elapsed, &cfg) } -/// Enumerate tests to run but don't actaully run them. +/// Enumerate tests to run but don't actually run them. pub fn register_tests(cfg: &Config) -> Vec { let mut tests = Vec::new(); @@ -120,7 +120,7 @@ pub fn register_tests(cfg: &Config) -> Vec { tests.sort_unstable_by_key(|t| (t.float_name, t.gen_name)); for i in 0..(tests.len() - 1) { if tests[i].gen_name == tests[i + 1].gen_name { - panic!("dupliate test name {}", tests[i].gen_name); + panic!("duplicate test name {}", tests[i].gen_name); } } @@ -295,7 +295,7 @@ enum Update { fail: CheckFailure, /// String for which parsing was attempted. input: Box, - /// The parsed & decomposed `FloatRes`, aleady stringified so we don't need generics here. + /// The parsed & decomposed `FloatRes`, already stringified so we don't need generics here. float_res: Box, }, /// Exited with an unexpected condition. diff --git a/src/tools/suggest-tests/src/static_suggestions.rs b/src/tools/suggest-tests/src/static_suggestions.rs index b216138cf9a58..d363d583b546f 100644 --- a/src/tools/suggest-tests/src/static_suggestions.rs +++ b/src/tools/suggest-tests/src/static_suggestions.rs @@ -2,7 +2,7 @@ use std::sync::OnceLock; use crate::{Suggestion, sug}; -// FIXME: perhaps this could use `std::lazy` when it is stablizied +// FIXME: perhaps this could use `std::lazy` when it is stabilized macro_rules! static_suggestions { ($( [ $( $glob:expr ),* $(,)? ] => [ $( $suggestion:expr ),* $(,)? ] ),* $(,)? ) => { pub(crate) fn static_suggestions() -> &'static [(Vec<&'static str>, Vec)]