diff options
| author | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 18:15:49 +0200 |
|---|---|---|
| committer | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 18:15:49 +0200 |
| commit | 2f9ddf3bc7cfa79d272b1409be80905be946d831 (patch) | |
| tree | a88f54853c40da892b1da6ae223176df5ba6469b /src/tools | |
| parent | 2396fad0950980cd3bf53bc825cdfa79ec7fd85f (diff) | |
| download | rust-2f9ddf3bc7cfa79d272b1409be80905be946d831.tar.gz rust-2f9ddf3bc7cfa79d272b1409be80905be946d831.zip | |
Fix typos “an”→“a” and a few different ones that appeared in the same search
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/ptr_eq.rs | 2 | ||||
| -rw-r--r-- | src/tools/rustfmt/src/macros.rs | 2 | ||||
| -rw-r--r-- | src/tools/rustfmt/src/string.rs | 2 | ||||
| -rw-r--r-- | src/tools/rustfmt/tests/source/cfg_if/detect/arch/x86.rs | 2 | ||||
| -rw-r--r-- | src/tools/rustfmt/tests/target/cfg_if/detect/arch/x86.rs | 2 | ||||
| -rw-r--r-- | src/tools/tidy/src/style.rs | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/clippy/clippy_lints/src/ptr_eq.rs b/src/tools/clippy/clippy_lints/src/ptr_eq.rs index d6d7049fb61..3258c9fb3fe 100644 --- a/src/tools/clippy/clippy_lints/src/ptr_eq.rs +++ b/src/tools/clippy/clippy_lints/src/ptr_eq.rs @@ -74,7 +74,7 @@ impl LateLintPass<'_> for PtrEq { } } -// If the given expression is a cast to an usize, return the lhs of the cast +// If the given expression is a cast to a usize, return the lhs of the cast // E.g., `foo as *const _ as usize` returns `foo as *const _`. fn expr_as_cast_to_usize<'tcx>(cx: &LateContext<'tcx>, cast_expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { if cx.typeck_results().expr_ty(cast_expr) == cx.tcx.types.usize { diff --git a/src/tools/rustfmt/src/macros.rs b/src/tools/rustfmt/src/macros.rs index c8ee590b6cc..a9bc89544d8 100644 --- a/src/tools/rustfmt/src/macros.rs +++ b/src/tools/rustfmt/src/macros.rs @@ -401,7 +401,7 @@ fn rewrite_macro_inner( handle_vec_semi(context, shape, arg_vec, macro_name, style) } else { // If we are rewriting `vec!` macro or other special macros, - // then we can rewrite this as an usual array literal. + // then we can rewrite this as a usual array literal. // Otherwise, we must preserve the original existence of trailing comma. let macro_name = ¯o_name.as_str(); let mut force_trailing_comma = if trailing_comma { diff --git a/src/tools/rustfmt/src/string.rs b/src/tools/rustfmt/src/string.rs index 0cb9d817ca2..64ae15672df 100644 --- a/src/tools/rustfmt/src/string.rs +++ b/src/tools/rustfmt/src/string.rs @@ -153,7 +153,7 @@ pub(crate) fn rewrite_string<'a>( wrap_str(result, fmt.config.max_width(), fmt.shape) } -/// Returns the index to the end of the URL if the split at index of the given string includes an +/// Returns the index to the end of the URL if the split at index of the given string includes a /// URL or alike. Otherwise, returns `None`. fn detect_url(s: &[&str], index: usize) -> Option<usize> { let start = match s[..=index].iter().rposition(|g| is_whitespace(g)) { diff --git a/src/tools/rustfmt/tests/source/cfg_if/detect/arch/x86.rs b/src/tools/rustfmt/tests/source/cfg_if/detect/arch/x86.rs index 50d5cfa87c4..4c71a2c6ab9 100644 --- a/src/tools/rustfmt/tests/source/cfg_if/detect/arch/x86.rs +++ b/src/tools/rustfmt/tests/source/cfg_if/detect/arch/x86.rs @@ -2,7 +2,7 @@ //! //! The features are detected using the `detect_features` function below. //! This function uses the CPUID instruction to read the feature flags from the -//! CPU and encodes them in an `usize` where each bit position represents +//! CPU and encodes them in a `usize` where each bit position represents //! whether a feature is available (bit is set) or unavaiable (bit is cleared). //! //! The enum `Feature` is used to map bit positions to feature names, and the diff --git a/src/tools/rustfmt/tests/target/cfg_if/detect/arch/x86.rs b/src/tools/rustfmt/tests/target/cfg_if/detect/arch/x86.rs index 9219a4a577f..b985dd8caa1 100644 --- a/src/tools/rustfmt/tests/target/cfg_if/detect/arch/x86.rs +++ b/src/tools/rustfmt/tests/target/cfg_if/detect/arch/x86.rs @@ -2,7 +2,7 @@ //! //! The features are detected using the `detect_features` function below. //! This function uses the CPUID instruction to read the feature flags from the -//! CPU and encodes them in an `usize` where each bit position represents +//! CPU and encodes them in a `usize` where each bit position represents //! whether a feature is available (bit is set) or unavaiable (bit is cleared). //! //! The enum `Feature` is used to map bit positions to feature names, and the diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index d8d3dc3ddb1..022a3dfde82 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -66,7 +66,7 @@ enum LIUState { EXP_END, } -/// Returns `true` if `line` appears to be a line comment containing an URL, +/// Returns `true` if `line` appears to be a line comment containing a URL, /// possibly with a Markdown link label in front, and nothing else. /// The Markdown link label, if present, may not contain whitespace. /// Lines of this form are allowed to be overlength, because Markdown |
