diff options
| author | Jana Dönszelmann <jonathan@donsz.nl> | 2025-07-03 13:29:35 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-03 13:29:35 +0200 | 
| commit | f6d37a25a96fd2c20f4349474d81bbb35e2ecba3 (patch) | |
| tree | 0c4096e8522b6b084fdb12974cb7b4d5a6479e87 /compiler/rustc_mir_transform/src/check_enums.rs | |
| parent | d6120810e56387730b2e86115471354c8084ca4a (diff) | |
| parent | c76d032f0144b650a438ee1efba89c475e0b115b (diff) | |
| download | rust-f6d37a25a96fd2c20f4349474d81bbb35e2ecba3.tar.gz rust-f6d37a25a96fd2c20f4349474d81bbb35e2ecba3.zip | |
Rollup merge of #134006 - klensy:typos, r=nnethercote
setup typos check in CI This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying? Also includes commits with actual typo fixes. MCP: https://github.com/rust-lang/compiler-team/issues/817 typos check currently turned for: * ./compiler * ./library * ./src/bootstrap * ./src/librustdoc After merging, PRs which enables checks for other crates (tools) can be implemented too. Found typos will **not break** other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr. Check typos: `python x.py test tidy --extra-checks=spellcheck` Apply typo fixes: `python x.py test tidy --extra-checks=spellcheck:fix` (in case if there only 1 suggestion of each typo) Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.
Diffstat (limited to 'compiler/rustc_mir_transform/src/check_enums.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/check_enums.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/compiler/rustc_mir_transform/src/check_enums.rs b/compiler/rustc_mir_transform/src/check_enums.rs index fae984b4936..33a87cb9873 100644 --- a/compiler/rustc_mir_transform/src/check_enums.rs +++ b/compiler/rustc_mir_transform/src/check_enums.rs @@ -311,7 +311,7 @@ fn insert_discr_cast_to_u128<'tcx>( StatementKind::Assign(Box::new((discr_in_discr_ty, rvalue))), )); - // Cast the discriminant to a u128 (base for comparisions of enum discriminants). + // Cast the discriminant to a u128 (base for comparisons of enum discriminants). let const_u128 = Ty::new_uint(tcx, ty::UintTy::U128); let rvalue = Rvalue::Cast(CastKind::IntToInt, Operand::Copy(discr_in_discr_ty), const_u128); let discr = local_decls.push(LocalDecl::with_source_info(const_u128, source_info)).into(); @@ -467,7 +467,7 @@ fn insert_niche_check<'tcx>( source_info, ); - // Compare the discriminant agains the valid_range. + // Compare the discriminant against the valid_range. let start_const = Operand::Constant(Box::new(ConstOperand { span: source_info.span, user_ty: None, | 
