]> git.lizzy.rs Git - rust.git/commitdiff
Spellchecking compiler code
authorYuri Astrakhan <YuriAstrakhan@gmail.com>
Wed, 30 Mar 2022 05:42:10 +0000 (01:42 -0400)
committerYuri Astrakhan <YuriAstrakhan@gmail.com>
Wed, 30 Mar 2022 05:42:10 +0000 (01:42 -0400)
Address some spelling mistakes in strings, private function names, and function params.

compiler/rustc_ast_passes/src/ast_validation.rs
compiler/rustc_borrowck/src/dataflow.rs
compiler/rustc_codegen_cranelift/scripts/rustup.sh
compiler/rustc_codegen_gcc/rustup.sh
compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs
compiler/rustc_hir/src/definitions.rs
compiler/rustc_middle/src/mir/interpret/allocation.rs
compiler/rustc_trait_selection/src/traits/auto_trait.rs

index aba0b6a7463cc694324fdf7d5b3da573676750ce..3107dd448f40e83bf4bcd5690376c8000a3bf02b 100644 (file)
@@ -624,7 +624,7 @@ fn check_foreign_item_ascii_only(&self, ident: Ident) {
 
     /// Reject C-varadic type unless the function is foreign,
     /// or free and `unsafe extern "C"` semantically.
-    fn check_c_varadic_type(&self, fk: FnKind<'a>) {
+    fn check_c_variadic_type(&self, fk: FnKind<'a>) {
         match (fk.ctxt(), fk.header()) {
             (Some(FnCtxt::Foreign), _) => return,
             (Some(FnCtxt::Free), Some(header)) => match header.ext {
@@ -1504,7 +1504,7 @@ fn visit_fn(&mut self, fk: FnKind<'a>, span: Span, id: NodeId) {
         };
         self.check_fn_decl(fk.decl(), self_semantic);
 
-        self.check_c_varadic_type(fk);
+        self.check_c_variadic_type(fk);
 
         // Functions cannot both be `const async`
         if let Some(FnHeader {
index f0036f09c3881fccb3af7fccd7025e3b68c70db0..684eba82667fa4897471fbe3ce0f86098a9cb347 100644 (file)
@@ -407,10 +407,10 @@ fn before_terminator_effect(
     fn terminator_effect(
         &self,
         trans: &mut impl GenKill<Self::Idx>,
-        teminator: &mir::Terminator<'tcx>,
+        terminator: &mir::Terminator<'tcx>,
         _location: Location,
     ) {
-        if let mir::TerminatorKind::InlineAsm { operands, .. } = &teminator.kind {
+        if let mir::TerminatorKind::InlineAsm { operands, .. } = &terminator.kind {
             for op in operands {
                 if let mir::InlineAsmOperand::Out { place: Some(place), .. }
                 | mir::InlineAsmOperand::InOut { out_place: Some(place), .. } = *op
index cc34c08088665bc19cdea842e961593052c28e50..bc4c06ed7d2988e6d28810d11ead10c7c8d05022 100755 (executable)
@@ -11,7 +11,7 @@ case $1 in
         sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain
         rustup component add rustfmt || true
 
-        echo "=> Uninstalling all old nighlies"
+        echo "=> Uninstalling all old nightlies"
         for nightly in $(rustup toolchain list | grep nightly | grep -v "$TOOLCHAIN" | grep -v nightly-x86_64); do
             rustup toolchain uninstall "$nightly"
         done
index 01ce5bb78be0f4ebc32253a55ae17a8527e75fbf..11d39a122f559fbf7575f4dcd5fc1ca16ecf130d 100755 (executable)
@@ -10,7 +10,7 @@ case $1 in
         rustup toolchain install --profile minimal nightly-${TOOLCHAIN} # Sanity check to see if the nightly exists
         echo nightly-${TOOLCHAIN} > rust-toolchain
 
-        echo "=> Uninstalling all old nighlies"
+        echo "=> Uninstalling all old nightlies"
         for nightly in $(rustup toolchain list | grep nightly | grep -v $TOOLCHAIN | grep -v nightly-x86_64); do
             rustup toolchain uninstall $nightly
         done
index e9772cd78d7626de9aaad652f44eca00c2488ada..31bb9ed318589441885a41f3d265bccb06e8895b 100644 (file)
@@ -356,7 +356,7 @@ fn build_union_fields_for_direct_tag_generator<'ll, 'tcx>(
     generator_type_di_node: &'ll DIType,
 ) -> SmallVec<&'ll DIType> {
     let Variants::Multiple { tag_encoding: TagEncoding::Direct, tag_field, .. } = generator_type_and_layout.variants else {
-        bug!("This function only supports layouts with direcly encoded tags.")
+        bug!("This function only supports layouts with directly encoded tags.")
     };
 
     let (generator_def_id, generator_substs) = match generator_type_and_layout.ty.kind() {
index 4c93d661fd2fd8b9c4e3e9599fcbe4ee09f53db1..1ff9395c5892b719b3c4604a73402a9de848779e 100644 (file)
@@ -56,7 +56,7 @@ fn allocate(&mut self, key: DefKey, def_path_hash: DefPathHash) -> DefIndex {
             //
             // See the documentation for DefPathHash for more information.
             panic!(
-                "found DefPathHash collsion between {:?} and {:?}. \
+                "found DefPathHash collision between {:?} and {:?}. \
                     Compilation cannot continue.",
                 def_path1, def_path2
             );
index 17ff52cefcfa8f9ee4533de1822f075a3a422014..ec27ce5ea9a642386092f22d7f2c8ffaf18cc99a 100644 (file)
@@ -171,7 +171,7 @@ pub fn uninit(size: Size, align: Align, panic_on_fail: bool) -> InterpResult<'st
                 panic!("Allocation::uninit called with panic_on_fail had allocation failure")
             }
             ty::tls::with(|tcx| {
-                tcx.sess.delay_span_bug(DUMMY_SP, "exhausted memory during interpreation")
+                tcx.sess.delay_span_bug(DUMMY_SP, "exhausted memory during interpretation")
             });
             InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
         })?;
index ee9983ee8b8d8d3034bbcbd1040dac53e6b07405..32516af922332237e0bd17db31f0b7ba44850ca5 100644 (file)
@@ -683,7 +683,7 @@ fn evaluate_nested_obligations(
                         && is_new_pred
                     {
                         debug!(
-                            "evaluate_nested_obligations: adding projection predicate\
+                            "evaluate_nested_obligations: adding projection predicate \
                             to computed_preds: {:?}",
                             predicate
                         );