Skip to content

Commit a629b2a

Browse files
authored
Rollup merge of rust-lang#95460 - nyurik:spelling-str, r=lcnr
Spellchecking compiler code Address some spelling mistakes in strings, private function names, and function params.
2 parents abb02d4 + a9cc3f6 commit a629b2a

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

compiler/rustc_ast_passes/src/ast_validation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ impl<'a> AstValidator<'a> {
624624

625625
/// Reject C-varadic type unless the function is foreign,
626626
/// or free and `unsafe extern "C"` semantically.
627-
fn check_c_varadic_type(&self, fk: FnKind<'a>) {
627+
fn check_c_variadic_type(&self, fk: FnKind<'a>) {
628628
match (fk.ctxt(), fk.header()) {
629629
(Some(FnCtxt::Foreign), _) => return,
630630
(Some(FnCtxt::Free), Some(header)) => match header.ext {
@@ -1504,7 +1504,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
15041504
};
15051505
self.check_fn_decl(fk.decl(), self_semantic);
15061506

1507-
self.check_c_varadic_type(fk);
1507+
self.check_c_variadic_type(fk);
15081508

15091509
// Functions cannot both be `const async`
15101510
if let Some(FnHeader {

compiler/rustc_borrowck/src/dataflow.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,10 @@ impl<'tcx> rustc_mir_dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
407407
fn terminator_effect(
408408
&self,
409409
trans: &mut impl GenKill<Self::Idx>,
410-
teminator: &mir::Terminator<'tcx>,
410+
terminator: &mir::Terminator<'tcx>,
411411
_location: Location,
412412
) {
413-
if let mir::TerminatorKind::InlineAsm { operands, .. } = &teminator.kind {
413+
if let mir::TerminatorKind::InlineAsm { operands, .. } = &terminator.kind {
414414
for op in operands {
415415
if let mir::InlineAsmOperand::Out { place: Some(place), .. }
416416
| mir::InlineAsmOperand::InOut { out_place: Some(place), .. } = *op

compiler/rustc_codegen_cranelift/scripts/rustup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ case $1 in
1111
sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain
1212
rustup component add rustfmt || true
1313

14-
echo "=> Uninstalling all old nighlies"
14+
echo "=> Uninstalling all old nightlies"
1515
for nightly in $(rustup toolchain list | grep nightly | grep -v "$TOOLCHAIN" | grep -v nightly-x86_64); do
1616
rustup toolchain uninstall "$nightly"
1717
done

compiler/rustc_codegen_gcc/rustup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ case $1 in
1010
rustup toolchain install --profile minimal nightly-${TOOLCHAIN} # Sanity check to see if the nightly exists
1111
echo nightly-${TOOLCHAIN} > rust-toolchain
1212

13-
echo "=> Uninstalling all old nighlies"
13+
echo "=> Uninstalling all old nightlies"
1414
for nightly in $(rustup toolchain list | grep nightly | grep -v $TOOLCHAIN | grep -v nightly-x86_64); do
1515
rustup toolchain uninstall $nightly
1616
done

compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ fn build_union_fields_for_direct_tag_generator<'ll, 'tcx>(
356356
generator_type_di_node: &'ll DIType,
357357
) -> SmallVec<&'ll DIType> {
358358
let Variants::Multiple { tag_encoding: TagEncoding::Direct, tag_field, .. } = generator_type_and_layout.variants else {
359-
bug!("This function only supports layouts with direcly encoded tags.")
359+
bug!("This function only supports layouts with directly encoded tags.")
360360
};
361361

362362
let (generator_def_id, generator_substs) = match generator_type_and_layout.ty.kind() {

compiler/rustc_hir/src/definitions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl DefPathTable {
5656
//
5757
// See the documentation for DefPathHash for more information.
5858
panic!(
59-
"found DefPathHash collsion between {:?} and {:?}. \
59+
"found DefPathHash collision between {:?} and {:?}. \
6060
Compilation cannot continue.",
6161
def_path1, def_path2
6262
);

compiler/rustc_middle/src/mir/interpret/allocation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<Tag> Allocation<Tag> {
171171
panic!("Allocation::uninit called with panic_on_fail had allocation failure")
172172
}
173173
ty::tls::with(|tcx| {
174-
tcx.sess.delay_span_bug(DUMMY_SP, "exhausted memory during interpreation")
174+
tcx.sess.delay_span_bug(DUMMY_SP, "exhausted memory during interpretation")
175175
});
176176
InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
177177
})?;

compiler/rustc_trait_selection/src/traits/auto_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
683683
&& is_new_pred
684684
{
685685
debug!(
686-
"evaluate_nested_obligations: adding projection predicate\
686+
"evaluate_nested_obligations: adding projection predicate \
687687
to computed_preds: {:?}",
688688
predicate
689689
);

0 commit comments

Comments
 (0)