Skip to content

Commit 9aec231

Browse files
authored
Merge pull request #681 from rust-lang/test/typos
Add spell checking job in the CI
2 parents 3d962df + c430b87 commit 9aec231

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ jobs:
115115
- uses: actions/checkout@v4
116116
- run: python tools/check_intrinsics_duplicates.py
117117

118+
spell_check:
119+
runs-on: ubuntu-24.04
120+
steps:
121+
- uses: actions/checkout@v4
122+
- uses: crate-ci/[email protected]
123+
118124
build_system:
119125
runs-on: ubuntu-24.04
120126
steps:

_typos.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[default.extend-words]
2+
ba = "ba"
3+
hsa = "hsa"
4+
olt = "olt"
5+
seh = "seh"
6+
typ = "typ"
7+
8+
[files]
9+
extend-exclude = ["src/intrinsic/archs.rs"]

example/std_example.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ fn main() {
7777
assert_eq!(tmp as i128, -0x1234_5678_9ABC_DEF0i128);
7878

7979
// Check that all u/i128 <-> float casts work correctly.
80-
let houndred_u128 = 100u128;
81-
let houndred_i128 = 100i128;
82-
let houndred_f32 = 100.0f32;
83-
let houndred_f64 = 100.0f64;
84-
assert_eq!(houndred_u128 as f32, 100.0);
85-
assert_eq!(houndred_u128 as f64, 100.0);
86-
assert_eq!(houndred_f32 as u128, 100);
87-
assert_eq!(houndred_f64 as u128, 100);
88-
assert_eq!(houndred_i128 as f32, 100.0);
89-
assert_eq!(houndred_i128 as f64, 100.0);
90-
assert_eq!(houndred_f32 as i128, 100);
91-
assert_eq!(houndred_f64 as i128, 100);
80+
let hundred_u128 = 100u128;
81+
let hundred_i128 = 100i128;
82+
let hundred_f32 = 100.0f32;
83+
let hundred_f64 = 100.0f64;
84+
assert_eq!(hundred_u128 as f32, 100.0);
85+
assert_eq!(hundred_u128 as f64, 100.0);
86+
assert_eq!(hundred_f32 as u128, 100);
87+
assert_eq!(hundred_f64 as u128, 100);
88+
assert_eq!(hundred_i128 as f32, 100.0);
89+
assert_eq!(hundred_i128 as f64, 100.0);
90+
assert_eq!(hundred_f32 as i128, 100);
91+
assert_eq!(hundred_f64 as i128, 100);
9292

9393
let _a = 1u32 << 2u8;
9494

src/attributes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::gcc_util::to_gcc_features;
1616
/// Checks if the function `instance` is recursively inline.
1717
/// Returns `false` if a functions is guaranteed to be non-recursive, and `true` if it *might* be recursive.
1818
#[cfg(feature = "master")]
19-
fn resursively_inline<'gcc, 'tcx>(
19+
fn recursively_inline<'gcc, 'tcx>(
2020
cx: &CodegenCx<'gcc, 'tcx>,
2121
instance: ty::Instance<'tcx>,
2222
) -> bool {
@@ -61,7 +61,7 @@ fn inline_attr<'gcc, 'tcx>(
6161
//
6262
// That prevents issues steming from recursive `#[inline(always)]` at a *relatively* small cost.
6363
// We *only* need to check all the terminators of a function marked with this attribute.
64-
if resursively_inline(cx, instance) {
64+
if recursively_inline(cx, instance) {
6565
Some(FnAttribute::Inline)
6666
} else {
6767
Some(FnAttribute::AlwaysInline)

src/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
217217
let ty = match *self.ty.kind() {
218218
// NOTE: we cannot remove this match like in the LLVM codegen because the call
219219
// to fn_ptr_backend_type handle the on-stack attribute.
220-
// TODO(antoyo): find a less hackish way to hande the on-stack attribute.
220+
// TODO(antoyo): find a less hackish way to handle the on-stack attribute.
221221
ty::FnPtr(sig_tys, hdr) => cx
222222
.fn_ptr_backend_type(cx.fn_abi_of_fn_ptr(sig_tys.with(hdr), ty::List::empty())),
223223
_ => self.scalar_gcc_type_at(cx, scalar, Size::ZERO),

0 commit comments

Comments
 (0)