diff --git a/.github/ISSUE_TEMPLATE/library_tracking_issue.md b/.github/ISSUE_TEMPLATE/library_tracking_issue.md index 91c06402ca10a..934312662beb6 100644 --- a/.github/ISSUE_TEMPLATE/library_tracking_issue.md +++ b/.github/ISSUE_TEMPLATE/library_tracking_issue.md @@ -12,7 +12,7 @@ Tracking issues are for tracking a feature from implementation to stabilization. Make sure to include the relevant RFC for the feature if it has one. If the new feature is small, it may be fine to skip the RFC process. In that -case, you can use use `issue = "none"` in your initial implementation PR. The +case, you can use `issue = "none"` in your initial implementation PR. The reviewer will ask you to open a tracking issue if they agree your feature can be added without an RFC. --> @@ -65,7 +65,7 @@ the rfcbot will ask all the team members to verify they agree with stabilization. Once enough members agree and there are no concerns, the final comment period begins: this issue will be marked as such and will be listed in the next This Week in Rust newsletter. If no blocking concerns are raised in -that period of 10 days, a stabilzation PR can be opened by anyone. +that period of 10 days, a stabilization PR can be opened by anyone. --> ### Unresolved Questions diff --git a/RELEASES.md b/RELEASES.md index b89178a6f68fe..699735de6fb4d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -963,7 +963,7 @@ Compatibility Notes - [rustdoc: doctests are now run on unexported `macro_rules!` macros, matching other private items][96630] - [rustdoc: Remove .woff font files][96279] - [Enforce Copy bounds for repeat elements while considering lifetimes][95819] -- [Windows: Fix potentinal unsoundness by aborting if `File` reads or writes cannot +- [Windows: Fix potential unsoundness by aborting if `File` reads or writes cannot complete synchronously][95469]. Internal Changes @@ -1794,10 +1794,10 @@ Libraries - [impl Default, Copy, Clone for std::io::Sink and std::io::Empty][rust#86744] - [`impl From<[(K, V); N]>` for all collections.][rust#84111] - [Remove `P: Unpin` bound on impl Future for Pin.][rust#81363] -- [Treat invalid environment variable names as non-existent.][rust#86183] +- [Treat invalid environment variable names as nonexistent.][rust#86183] Previously, the environment functions would panic if given a variable name with an internal null character or equal sign (`=`). Now, these functions will - just treat such names as non-existent variables, since the OS cannot represent + just treat such names as nonexistent variables, since the OS cannot represent the existence of a variable with such a name. Stabilised APIs @@ -1990,7 +1990,7 @@ Compatibility Notes kinds of errors could be categorised [into newer more specific `ErrorKind` variants][79965], and that they do not represent a user error. - [Using environment variable names with `process::Command` on Windows now - behaves as expected.][85270] Previously using envionment variables with + behaves as expected.][85270] Previously using environment variables with `Command` would cause them to be ASCII-uppercased. - [Rustdoc will now warn on using rustdoc lints that aren't prefixed with `rustdoc::`][86849] @@ -6367,7 +6367,7 @@ eg. `static MINUTE: Duration = Duration::from_secs(60);` Cargo ----- -- [`cargo new` no longer removes `rust` or `rs` prefixs/suffixs.][cargo/5013] +- [`cargo new` no longer removes `rust` or `rs` prefixes/suffixes.][cargo/5013] - [`cargo new` now defaults to creating a binary crate, instead of a library crate.][cargo/5029] diff --git a/compiler/rustc_apfloat/src/ieee.rs b/compiler/rustc_apfloat/src/ieee.rs index 2286712f02565..944318911ffbb 100644 --- a/compiler/rustc_apfloat/src/ieee.rs +++ b/compiler/rustc_apfloat/src/ieee.rs @@ -2645,7 +2645,7 @@ mod sig { // Convert the result having "2 * precision" significant-bits back to the one // having "precision" significant-bits. First, move the radix point from - // poision "2*precision - 1" to "precision - 1". The exponent need to be + // poisson "2*precision - 1" to "precision - 1". The exponent need to be // adjusted by "2*precision - 1" - "precision - 1" = "precision". *exp -= precision as ExpInt + 1; diff --git a/compiler/rustc_apfloat/tests/ieee.rs b/compiler/rustc_apfloat/tests/ieee.rs index f8fac0c2358c9..a94e755fdec42 100644 --- a/compiler/rustc_apfloat/tests/ieee.rs +++ b/compiler/rustc_apfloat/tests/ieee.rs @@ -53,7 +53,7 @@ fn is_signaling() { fn next() { // 1. Test Special Cases Values. // - // Test all special values for nextUp and nextDown perscribed by IEEE-754R + // Test all special values for nextUp and nextDown prescribed by IEEE-754R // 2008. These are: // 1. +inf // 2. -inf diff --git a/compiler/rustc_ast_passes/messages.ftl b/compiler/rustc_ast_passes/messages.ftl index a349fe6a3c44b..ffca37ae9d5f6 100644 --- a/compiler/rustc_ast_passes/messages.ftl +++ b/compiler/rustc_ast_passes/messages.ftl @@ -231,7 +231,7 @@ ast_passes_feature_on_non_nightly = `#![feature]` may not be used on the {$chann .suggestion = remove the attribute .stable_since = the feature `{$name}` has been stable since `{$since}` and no longer requires an attribute to enable -ast_passes_incompatbile_features = `{$f1}` and `{$f2}` are incompatible, using them at the same time is not allowed +ast_passes_incompatible_features = `{$f1}` and `{$f2}` are incompatible, using them at the same time is not allowed .help = remove one of these features ast_passes_show_span = {$msg} diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs index 27bbd237961a9..1732865f0bb64 100644 --- a/compiler/rustc_ast_passes/src/errors.rs +++ b/compiler/rustc_ast_passes/src/errors.rs @@ -677,7 +677,7 @@ impl AddToDiagnostic for StableFeature { } #[derive(Diagnostic)] -#[diag(ast_passes_incompatbile_features)] +#[diag(ast_passes_incompatible_features)] #[help] pub struct IncompatibleFeatures { #[primary_span] diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs index 9d90400965040..32d0334a56202 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs @@ -1143,7 +1143,7 @@ pub fn mut_borrow_of_mutable_ref(local_decl: &LocalDecl<'_>, local_name: Option< // suggest removing the `&mut`. // // Deliberately fall into this case for all implicit self types, - // so that we don't fall in to the next case with them. + // so that we don't fall into the next case with them. kind == hir::ImplicitSelfKind::MutRef } _ if Some(kw::SelfLower) == local_name => { @@ -1231,7 +1231,7 @@ fn suggest_ampmut<'tcx>( } } - let (suggestability, highlight_span) = match opt_ty_info { + let (suggestibility, highlight_span) = match opt_ty_info { // if this is a variable binding with an explicit type, // try to highlight that for the suggestion. Some(ty_span) => (true, ty_span), @@ -1252,7 +1252,7 @@ fn suggest_ampmut<'tcx>( let ty_mut = local_decl.ty.builtin_deref(true).unwrap(); assert_eq!(ty_mut.mutbl, hir::Mutability::Not); ( - suggestability, + suggestibility, highlight_span, if local_decl.ty.is_ref() { format!("&mut {}", ty_mut.ty) diff --git a/compiler/rustc_codegen_cranelift/Readme.md b/compiler/rustc_codegen_cranelift/Readme.md index b87a9dc51e8d0..a44f28012ef7d 100644 --- a/compiler/rustc_codegen_cranelift/Readme.md +++ b/compiler/rustc_codegen_cranelift/Readme.md @@ -22,10 +22,10 @@ $ ./test.sh For more docs on how to build and test see [build_system/usage.txt](build_system/usage.txt) or the help message of `./y.rs`. -Alternatively you can download a pre built version from [Github Actions]. It is listed in the artifacts section +Alternatively you can download a pre built version from [GitHub Actions]. It is listed in the artifacts section of workflow runs. Unfortunately due to GHA restrictions you need to be logged in to access it. -[Github Actions]: https://github.com/bjorn3/rustc_codegen_cranelift/actions?query=branch%3Amaster+event%3Apush+is%3Asuccess +[GitHub Actions]: https://github.com/bjorn3/rustc_codegen_cranelift/actions?query=branch%3Amaster+event%3Apush+is%3Asuccess ## Usage diff --git a/compiler/rustc_codegen_cranelift/example/std_example.rs b/compiler/rustc_codegen_cranelift/example/std_example.rs index e34b35d5c4a8c..bab8f037e5b86 100644 --- a/compiler/rustc_codegen_cranelift/example/std_example.rs +++ b/compiler/rustc_codegen_cranelift/example/std_example.rs @@ -74,18 +74,18 @@ fn main() { assert_eq!(tmp as i128, -0x1234_5678_9ABC_DEF0i128); // Check that all u/i128 <-> float casts work correctly. - let houndred_u128 = 100u128; - let houndred_i128 = 100i128; - let houndred_f32 = 100.0f32; - let houndred_f64 = 100.0f64; - assert_eq!(houndred_u128 as f32, 100.0); - assert_eq!(houndred_u128 as f64, 100.0); - assert_eq!(houndred_f32 as u128, 100); - assert_eq!(houndred_f64 as u128, 100); - assert_eq!(houndred_i128 as f32, 100.0); - assert_eq!(houndred_i128 as f64, 100.0); - assert_eq!(houndred_f32 as i128, 100); - assert_eq!(houndred_f64 as i128, 100); + let hundred_u128 = 100u128; + let hundred_i128 = 100i128; + let hundred_f32 = 100.0f32; + let hundred_f64 = 100.0f64; + assert_eq!(hundred_u128 as f32, 100.0); + assert_eq!(hundred_u128 as f64, 100.0); + assert_eq!(hundred_f32 as u128, 100); + assert_eq!(hundred_f64 as u128, 100); + assert_eq!(hundred_i128 as f32, 100.0); + assert_eq!(hundred_i128 as f64, 100.0); + assert_eq!(hundred_f32 as i128, 100); + assert_eq!(hundred_f64 as i128, 100); assert_eq!(1u128.rotate_left(2), 4); assert_eq!(black_box(f32::NAN) as i128, 0); diff --git a/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs b/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs index f3b963200a0fb..c89fd47edd7bf 100644 --- a/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs +++ b/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs @@ -3,7 +3,7 @@ use std::ffi::c_int; #[cfg(feature = "jit")] use std::ffi::c_void; -// FIXME replace with core::ffi::c_size_t once stablized +// FIXME replace with core::ffi::c_size_t once stabilized #[allow(non_camel_case_types)] #[cfg(feature = "jit")] type size_t = usize; diff --git a/compiler/rustc_codegen_gcc/Readme.md b/compiler/rustc_codegen_gcc/Readme.md index bb74194389254..ba770e469f673 100644 --- a/compiler/rustc_codegen_gcc/Readme.md +++ b/compiler/rustc_codegen_gcc/Readme.md @@ -164,7 +164,7 @@ debug_tree(expr); (defined in print-tree.h) -To print a debug reprensentation of a gimple struct: +To print a debug representation of a gimple struct: ```c debug_gimple_stmt(gimple_struct) diff --git a/compiler/rustc_codegen_gcc/example/std_example.rs b/compiler/rustc_codegen_gcc/example/std_example.rs index 5c171c49fd194..56cf712333dbd 100644 --- a/compiler/rustc_codegen_gcc/example/std_example.rs +++ b/compiler/rustc_codegen_gcc/example/std_example.rs @@ -74,18 +74,18 @@ fn main() { assert_eq!(tmp as i128, -0x1234_5678_9ABC_DEF0i128); // Check that all u/i128 <-> float casts work correctly. - let houndred_u128 = 100u128; - let houndred_i128 = 100i128; - let houndred_f32 = 100.0f32; - let houndred_f64 = 100.0f64; - assert_eq!(houndred_u128 as f32, 100.0); - assert_eq!(houndred_u128 as f64, 100.0); - assert_eq!(houndred_f32 as u128, 100); - assert_eq!(houndred_f64 as u128, 100); - assert_eq!(houndred_i128 as f32, 100.0); - assert_eq!(houndred_i128 as f64, 100.0); - assert_eq!(houndred_f32 as i128, 100); - assert_eq!(houndred_f64 as i128, 100); + let hundred_u128 = 100u128; + let hundred_i128 = 100i128; + let hundred_f32 = 100.0f32; + let hundred_f64 = 100.0f64; + assert_eq!(hundred_u128 as f32, 100.0); + assert_eq!(hundred_u128 as f64, 100.0); + assert_eq!(hundred_f32 as u128, 100); + assert_eq!(hundred_f64 as u128, 100); + assert_eq!(hundred_i128 as f32, 100.0); + assert_eq!(hundred_i128 as f64, 100.0); + assert_eq!(hundred_f32 as i128, 100); + assert_eq!(hundred_f64 as i128, 100); let _a = 1u32 << 2u8; diff --git a/compiler/rustc_codegen_gcc/src/base.rs b/compiler/rustc_codegen_gcc/src/base.rs index dcd560b3dcd95..dd4d2e8b4dce9 100644 --- a/compiler/rustc_codegen_gcc/src/base.rs +++ b/compiler/rustc_codegen_gcc/src/base.rs @@ -152,7 +152,7 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol, supports_128bit_i context.set_keep_intermediates(true); } - // NOTE: The codegen generates unrechable blocks. + // NOTE: The codegen generates unreachable blocks. context.set_allow_unreachable_blocks(true); { diff --git a/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py b/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py index 6188924b0d50a..c3457163da9e5 100644 --- a/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py +++ b/compiler/rustc_codegen_gcc/tools/generate_intrinsics.py @@ -46,7 +46,7 @@ def convert_to_string(content): return content -def extract_instrinsics_from_llvm(llvm_path, intrinsics): +def extract_intrinsics_from_llvm(llvm_path, intrinsics): p = subprocess.Popen( ["llvm-tblgen", "llvm/IR/Intrinsics.td"], cwd=os.path.join(llvm_path, "llvm/include"), @@ -89,7 +89,7 @@ def append_translation(json_data, p, array): append_intrinsic(array, content[1], content[3]) -def extract_instrinsics_from_llvmint(llvmint, intrinsics): +def extract_intrinsics_from_llvmint(llvmint, intrinsics): archs = [ "AMDGPU", "aarch64", @@ -153,9 +153,9 @@ def update_intrinsics(llvm_path, llvmint, llvmint2): intrinsics_llvmint = {} all_intrinsics = {} - extract_instrinsics_from_llvm(llvm_path, intrinsics_llvm) - extract_instrinsics_from_llvmint(llvmint, intrinsics_llvmint) - extract_instrinsics_from_llvmint(llvmint2, intrinsics_llvmint) + extract_intrinsics_from_llvm(llvm_path, intrinsics_llvm) + extract_intrinsics_from_llvmint(llvmint, intrinsics_llvmint) + extract_intrinsics_from_llvmint(llvmint2, intrinsics_llvmint) intrinsics = {} # We give priority to translations from LLVM over the ones from llvmint. diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs index ff2b005d75767..aaf5dbd9930c7 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs @@ -22,9 +22,9 @@ pub fn insert_reference_to_gdb_debug_scripts_section_global(bx: &mut Builder<'_, bx.const_bitcast(get_or_insert_gdb_debug_scripts_section_global(bx), bx.type_i8p()); // Load just the first byte as that's all that's necessary to force // LLVM to keep around the reference to the global. - let volative_load_instruction = bx.volatile_load(bx.type_i8(), gdb_debug_scripts_section); + let volatile_load_instruction = bx.volatile_load(bx.type_i8(), gdb_debug_scripts_section); unsafe { - llvm::LLVMSetAlignment(volative_load_instruction, 1); + llvm::LLVMSetAlignment(volatile_load_instruction, 1); } } } diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs index 69443b9b828e2..38ad42370d3fe 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs @@ -62,7 +62,7 @@ const SINGLE_VARIANT_VIRTUAL_DISR: u64 = 0; /// In CPP-like mode, we generate a union with a field for each variant and an /// explicit tag field. The field of each variant has a struct type -/// that encodes the discrimiant of the variant and it's data layout. +/// that encodes the discriminant of the variant and it's data layout. /// The union also has a nested enumeration type that is only used for encoding /// variant names in an efficient way. Its enumerator values do _not_ correspond /// to the enum's discriminant values. diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index 3f77ea77effe3..4926f4e50c417 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -69,7 +69,7 @@ mod declare; mod errors; mod intrinsic; -// The following is a work around that replaces `pub mod llvm;` and that fixes issue 53912. +// The following is a workaround that replaces `pub mod llvm;` and that fixes issue 53912. #[path = "llvm/mod.rs"] mod llvm_; pub mod llvm { diff --git a/compiler/rustc_codegen_ssa/messages.ftl b/compiler/rustc_codegen_ssa/messages.ftl index 243be0e1f70e7..85a96e3e89c05 100644 --- a/compiler/rustc_codegen_ssa/messages.ftl +++ b/compiler/rustc_codegen_ssa/messages.ftl @@ -148,7 +148,7 @@ codegen_ssa_processing_dymutil_failed = processing debug info with `dsymutil` fa codegen_ssa_unable_to_run_dsymutil = unable to run `dsymutil`: {$error} -codegen_ssa_stripping_debu_info_failed = stripping debug info with `{$util}` failed: {$status} +codegen_ssa_stripping_debug_info_failed = stripping debug info with `{$util}` failed: {$status} .note = {$output} codegen_ssa_unable_to_run = unable to run `{$util}`: {$error} diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index 2dda4cd169410..c80347448cbb2 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -872,7 +872,7 @@ fn execute_copy_from_cache_work_item( let load_from_incr_comp_dir = |output_path: PathBuf, saved_path: &str| { let source_file = in_incr_comp_dir(&incr_comp_session_dir, saved_path); debug!( - "copying pre-existing module `{}` from {:?} to {}", + "copying preexisting module `{}` from {:?} to {}", module.name, source_file, output_path.display() diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs index 8542bab689d6d..9bfe426c00766 100644 --- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs +++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs @@ -156,7 +156,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { None => { // Unfortunately, unconditionally using `llvm.used` causes // issues in handling `.init_array` with the gold linker, - // but using `llvm.compiler.used` caused a nontrival amount + // but using `llvm.compiler.used` caused a nontrivial amount // of unintentional ecosystem breakage -- particularly on // Mach-O targets. // diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs index 66e7e314f79d8..4493176667867 100644 --- a/compiler/rustc_codegen_ssa/src/errors.rs +++ b/compiler/rustc_codegen_ssa/src/errors.rs @@ -424,7 +424,7 @@ pub struct UnableToRunDsymutil { } #[derive(Diagnostic)] -#[diag(codegen_ssa_stripping_debu_info_failed)] +#[diag(codegen_ssa_stripping_debug_info_failed)] #[note] pub struct StrippingDebugInfoFailed<'a> { pub util: &'a str, diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index 93b5273e1b146..e06b634cdc330 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -784,7 +784,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> Abi::Scalar(scalar_layout) => { if !scalar_layout.is_uninit_valid() { // There is something to check here. - let scalar = self.read_scalar(op, "initiailized scalar value")?; + let scalar = self.read_scalar(op, "initialized scalar value")?; self.visit_scalar(scalar, scalar_layout)?; } } @@ -794,7 +794,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> // the other must be init. if !a_layout.is_uninit_valid() && !b_layout.is_uninit_valid() { let (a, b) = - self.read_immediate(op, "initiailized scalar value")?.to_scalar_pair(); + self.read_immediate(op, "initialized scalar value")?.to_scalar_pair(); self.visit_scalar(a, a_layout)?; self.visit_scalar(b, b_layout)?; } diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs index d4bed97380ba1..8aee019e99494 100644 --- a/compiler/rustc_const_eval/src/transform/validate.rs +++ b/compiler/rustc_const_eval/src/transform/validate.rs @@ -262,7 +262,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { // We sometimes have to use `defining_opaque_types` for subtyping // to succeed here and figuring out how exactly that should work // is annoying. It is harmless enough to just not validate anything - // in that case. We still check this after analysis as all opque + // in that case. We still check this after analysis as all opaque // types have been revealed at this point. if (src, dest).has_opaque_types() { return true; diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs index 1ed584eafad30..2ab7757638aef 100644 --- a/compiler/rustc_data_structures/src/profiling.rs +++ b/compiler/rustc_data_structures/src/profiling.rs @@ -557,7 +557,7 @@ impl SelfProfiler { let crate_name = crate_name.unwrap_or("unknown-crate"); // HACK(eddyb) we need to pad the PID, strange as it may seem, as its // length can behave as a source of entropy for heap addresses, when - // ASLR is disabled and the heap is otherwise determinic. + // ASLR is disabled and the heap is otherwise deterministic. let pid: u32 = process::id(); let filename = format!("{crate_name}-{pid:07}.rustc_profile"); let path = output_directory.join(&filename); diff --git a/compiler/rustc_error_codes/src/error_codes/E0026.md b/compiler/rustc_error_codes/src/error_codes/E0026.md index 72c575aabb643..f485112cca29f 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0026.md +++ b/compiler/rustc_error_codes/src/error_codes/E0026.md @@ -1,4 +1,4 @@ -A struct pattern attempted to extract a non-existent field from a struct. +A struct pattern attempted to extract a nonexistent field from a struct. Erroneous code example: diff --git a/compiler/rustc_error_codes/src/error_codes/E0208.md b/compiler/rustc_error_codes/src/error_codes/E0208.md index 1ae01106f2014..c6db9b5d61bea 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0208.md +++ b/compiler/rustc_error_codes/src/error_codes/E0208.md @@ -32,7 +32,7 @@ error: [-, o] This error is deliberately triggered with the `#[rustc_variance]` attribute (`#![feature(rustc_attrs)]` must be enabled) and helps to show you the variance of the type's generic parameters. You can read more about variance and -subtyping in [this section of the Rustnomicon]. For a more in depth look at +subtyping in [this section of the Rustonomicon]. For a more in depth look at variance (including a more complete list of common variances) see [this section of the Reference]. For information on how variance is implemented in the compiler, see [this section of `rustc-dev-guide`]. @@ -41,6 +41,6 @@ This error can be easily fixed by removing the `#[rustc_variance]` attribute, the compiler's suggestion to comment it out can be applied automatically with `rustfix`. -[this section of the Rustnomicon]: https://doc.rust-lang.org/nomicon/subtyping.html +[this section of the Rustonomicon]: https://doc.rust-lang.org/nomicon/subtyping.html [this section of the Reference]: https://doc.rust-lang.org/reference/subtyping.html#variance [this section of `rustc-dev-guide`]: https://rustc-dev-guide.rust-lang.org/variance.html diff --git a/compiler/rustc_error_codes/src/error_codes/E0311.md b/compiler/rustc_error_codes/src/error_codes/E0311.md index 08159d3f469ac..c1104a88a7676 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0311.md +++ b/compiler/rustc_error_codes/src/error_codes/E0311.md @@ -29,7 +29,7 @@ If `no_restriction()` were to use `&T` instead of `&()` as an argument, the compiler would have added an implied bound, causing this to compile. This error can be resolved by explicitly naming the elided lifetime for `x` and -then explicily requiring that the generic parameter `T` outlives that lifetime: +then explicitly requiring that the generic parameter `T` outlives that lifetime: ``` fn no_restriction<'a, T: 'a>(x: &'a ()) -> &'a () { diff --git a/compiler/rustc_error_codes/src/error_codes/E0457.md b/compiler/rustc_error_codes/src/error_codes/E0457.md index 53d384d36c426..2c33d1e6a2419 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0457.md +++ b/compiler/rustc_error_codes/src/error_codes/E0457.md @@ -1,6 +1,6 @@ Plugin `..` only found in rlib format, but must be available in dylib format. -Erroronous code example: +Erroneous code example: `rlib-plugin.rs` ```ignore (needs-linkage-with-other-tests) diff --git a/compiler/rustc_error_codes/src/error_codes/E0576.md b/compiler/rustc_error_codes/src/error_codes/E0576.md index 8eead4e7e3b51..300a57a1985f5 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0576.md +++ b/compiler/rustc_error_codes/src/error_codes/E0576.md @@ -10,7 +10,7 @@ trait Hello { } ``` -In this example, we tried to use the non-existent associated type `You` of the +In this example, we tried to use the nonexistent associated type `You` of the `Hello` trait. To fix this error, use an existing associated type: ``` diff --git a/compiler/rustc_error_codes/src/error_codes/E0609.md b/compiler/rustc_error_codes/src/error_codes/E0609.md index a9db34f474e25..0f5ac94e6d589 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0609.md +++ b/compiler/rustc_error_codes/src/error_codes/E0609.md @@ -1,4 +1,4 @@ -Attempted to access a non-existent field in a struct. +Attempted to access a nonexistent field in a struct. Erroneous code example: diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index fe44799efdb6a..8c76d5e010ff9 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -1980,7 +1980,7 @@ impl EmitterWriter { } if let DisplaySuggestion::Add = show_code_change && is_item_attribute { // The suggestion adds an entire line of code, ending on a newline, so we'll also - // print the *following* line, to provide context of what we're advicing people to + // print the *following* line, to provide context of what we're advising people to // do. Otherwise you would only see contextless code that can be confused for // already existing code, despite the colors and UI elements. // We special case `#[derive(_)]\n` and other attribute suggestions, because those diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index 5679cdcbbd062..3aeb2edb54ca0 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -341,7 +341,7 @@ pub(super) fn try_match_macro<'matcher, T: Tracker<'matcher>>( Success(named_matches) => { debug!("Parsed arm successfully"); // The matcher was `Success(..)`ful. - // Merge the gated spans from parsing the matcher with the pre-existing ones. + // Merge the gated spans from parsing the matcher with the preexisting ones. sess.gated_spans.merge(gated_spans_snapshot); return Ok((i, named_matches)); @@ -873,7 +873,7 @@ impl<'tt> FirstSets<'tt> { } } -// Most `mbe::TokenTree`s are pre-existing in the matcher, but some are defined +// Most `mbe::TokenTree`s are preexisting in the matcher, but some are defined // implicitly, such as opening/closing delimiters and sequence repetition ops. // This type encapsulates both kinds. It implements `Clone` while avoiding the // need for `mbe::TokenTree` to implement `Clone`. diff --git a/compiler/rustc_expand/src/tests.rs b/compiler/rustc_expand/src/tests.rs index 480d95b77e901..8a5e09475ff13 100644 --- a/compiler/rustc_expand/src/tests.rs +++ b/compiler/rustc_expand/src/tests.rs @@ -513,7 +513,7 @@ error: foo } #[test] -fn non_overlaping() { +fn non_overlapping() { test_harness( r#" fn foo() { @@ -552,7 +552,7 @@ error: foo } #[test] -fn overlaping_start_and_end() { +fn overlapping_start_and_end() { test_harness( r#" fn foo() { diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 48d9fbfa6d261..7ec8269384480 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -60,7 +60,7 @@ declare_features! ( (removed, const_compare_raw_pointers, "1.46.0", Some(53020), None, Some("cannot be allowed in const eval in any meaningful way")), /// Allows non-trivial generic constants which have to be manually propagated upwards. - (removed, const_evaluatable_checked, "1.48.0", Some(76560), None, Some("renamed to `generic_const_exprs`")), + (removed, const_evaluable_checked, "1.48.0", Some(76560), None, Some("renamed to `generic_const_exprs`")), /// Allows the definition of `const` functions with some advanced features. (removed, const_fn, "1.54.0", Some(57563), None, Some("split into finer-grained feature gates")), @@ -139,7 +139,7 @@ declare_features! ( /// Allows using `#[on_unimplemented(..)]` on traits. /// (Moved to `rustc_attrs`.) (removed, on_unimplemented, "1.40.0", None, None, None), - /// A way to temporarily opt out of opt in copy. This will *never* be accepted. + /// A way to temporarily opt out of opt-in copy. This will *never* be accepted. (removed, opt_out_copy, "1.0.0", None, None, None), /// Allows features specific to OIBIT (now called auto traits). /// Renamed to `auto_traits`. diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs index 8c58129c800f8..9d7a67cca42d9 100644 --- a/compiler/rustc_hir/src/def.rs +++ b/compiler/rustc_hir/src/def.rs @@ -377,7 +377,7 @@ pub enum Res { /// const fn baz() -> usize { 10 } /// ``` /// We do however allow `Self` in repeat expression even if it is generic to not break code - /// which already works on stable while causing the `const_evaluatable_unchecked` future + /// which already works on stable while causing the `const_evaluable_unchecked` future /// compat lint: /// ``` /// fn foo() { diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index 8d1156c1771e9..7eb12d380a769 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -2061,7 +2061,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { err.note("enum variants can't have type parameters"); let type_name = tcx.item_name(adt_def.did()); let msg = format!( - "you might have meant to specity type parameters on enum \ + "you might have meant to specify type parameters on enum \ `{type_name}`" ); let Some(args) = assoc_segment.args else { return; }; diff --git a/compiler/rustc_hir_analysis/src/coherence/builtin.rs b/compiler/rustc_hir_analysis/src/coherence/builtin.rs index 0f40cca9427b4..d7443ea6998e2 100644 --- a/compiler/rustc_hir_analysis/src/coherence/builtin.rs +++ b/compiler/rustc_hir_analysis/src/coherence/builtin.rs @@ -83,7 +83,7 @@ fn visit_implementation_of_copy(tcx: TyCtxt<'_>, impl_did: LocalDefId) { let cause = traits::ObligationCause::misc(span, impl_did); match type_allowed_to_implement_copy(tcx, param_env, self_type, cause) { Ok(()) => {} - Err(CopyImplementationError::InfrigingFields(fields)) => { + Err(CopyImplementationError::InfringingFields(fields)) => { let mut err = struct_span_err!( tcx.sess, span, diff --git a/compiler/rustc_hir_analysis/src/collect/predicates_of.rs b/compiler/rustc_hir_analysis/src/collect/predicates_of.rs index 8c414521b7653..fa278c43d4de3 100644 --- a/compiler/rustc_hir_analysis/src/collect/predicates_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/predicates_of.rs @@ -254,7 +254,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen } if tcx.features().generic_const_exprs { - predicates.extend(const_evaluatable_predicates_of(tcx, def_id)); + predicates.extend(const_evaluable_predicates_of(tcx, def_id)); } let mut predicates: Vec<_> = predicates.into_iter().collect(); @@ -327,7 +327,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen } } -fn const_evaluatable_predicates_of( +fn const_evaluable_predicates_of( tcx: TyCtxt<'_>, def_id: LocalDefId, ) -> FxIndexSet<(ty::Predicate<'_>, Span)> { @@ -366,24 +366,24 @@ fn const_evaluatable_predicates_of( let mut collector = ConstCollector { tcx, preds: FxIndexSet::default() }; if let hir::Node::Item(item) = node && let hir::ItemKind::Impl(impl_) = item.kind { if let Some(of_trait) = &impl_.of_trait { - debug!("const_evaluatable_predicates_of({:?}): visit impl trait_ref", def_id); + debug!("const_evaluable_predicates_of({:?}): visit impl trait_ref", def_id); collector.visit_trait_ref(of_trait); } - debug!("const_evaluatable_predicates_of({:?}): visit_self_ty", def_id); + debug!("const_evaluable_predicates_of({:?}): visit_self_ty", def_id); collector.visit_ty(impl_.self_ty); } if let Some(generics) = node.generics() { - debug!("const_evaluatable_predicates_of({:?}): visit_generics", def_id); + debug!("const_evaluable_predicates_of({:?}): visit_generics", def_id); collector.visit_generics(generics); } if let Some(fn_sig) = tcx.hir().fn_sig_by_hir_id(hir_id) { - debug!("const_evaluatable_predicates_of({:?}): visit_fn_decl", def_id); + debug!("const_evaluable_predicates_of({:?}): visit_fn_decl", def_id); collector.visit_fn_decl(fn_sig.decl); } - debug!("const_evaluatable_predicates_of({:?}) = {:?}", def_id, collector.preds); + debug!("const_evaluable_predicates_of({:?}) = {:?}", def_id, collector.preds); collector.preds } diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs index e758fe95d9c29..3cb217335bda0 100644 --- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs +++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs @@ -1333,7 +1333,7 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> { // We may fail to resolve higher-ranked lifetimes that are mentioned by APIT. // AST-based resolution does not care for impl-trait desugaring, which are the - // responibility of lowering. This may create a mismatch between the resolution + // responsibility of lowering. This may create a mismatch between the resolution // AST found (`region_def_id`) which points to HRTB, and what HIR allows. // ``` // fn foo(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {} diff --git a/compiler/rustc_hir_typeck/src/coercion.rs b/compiler/rustc_hir_typeck/src/coercion.rs index 8fa3bcd68c3d3..507c24d540cc5 100644 --- a/compiler/rustc_hir_typeck/src/coercion.rs +++ b/compiler/rustc_hir_typeck/src/coercion.rs @@ -976,7 +976,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// Attempt to coerce an expression to a type, and return the /// adjusted type of the expression, if successful. /// Adjustments are only recorded if the coercion succeeded. - /// The expressions *must not* have any pre-existing adjustments. + /// The expressions *must not* have any preexisting adjustments. pub fn try_coerce( &self, expr: &hir::Expr<'_>, @@ -1340,7 +1340,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> { } /// As an optimization, you can create a `CoerceMany` with a - /// pre-existing slice of expressions. In this case, you are + /// preexisting slice of expressions. In this case, you are /// expected to pass each element in the slice to `coerce(...)` in /// order. This is used with arrays in particular to avoid /// needlessly cloning the slice. diff --git a/compiler/rustc_hir_typeck/src/errors.rs b/compiler/rustc_hir_typeck/src/errors.rs index 3eee2278dcadd..5be78416e6128 100644 --- a/compiler/rustc_hir_typeck/src/errors.rs +++ b/compiler/rustc_hir_typeck/src/errors.rs @@ -108,7 +108,7 @@ pub enum ExpectedReturnTypeLabel<'tcx> { #[derive(Diagnostic)] #[diag(hir_typeck_missing_parentheses_in_range, code = "E0689")] -pub struct MissingParentheseInRange { +pub struct MissingParenthesesInRange { #[primary_span] #[label(hir_typeck_missing_parentheses_in_range)] pub span: Span, diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs index f736f7a96207e..13a869caa8fa6 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs @@ -827,7 +827,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } QPath::TypeRelative(ref qself, ref segment) => { // Don't use `self.to_ty`, since this will register a WF obligation. - // If we're trying to call a non-existent method on a trait + // If we're trying to call a nonexistent method on a trait // (e.g. `MyTrait::missing_method`), then resolution will // give us a `QPath::TypeRelative` with a trait object as // `qself`. In that case, we want to avoid registering a WF obligation diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs index c3e5f9cb745fc..56c94505727e8 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs @@ -330,7 +330,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// expression mentioned. /// /// `blame_specific_arg_if_possible` will find the most-specific expression anywhere inside - /// the provided function call expression, and mark it as responsible for the fullfillment + /// the provided function call expression, and mark it as responsible for the fulfillment /// error. fn blame_specific_arg_if_possible( &self, diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs index 5fda4e191c2a0..c68b1ccdd59b5 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs @@ -794,7 +794,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { return; }; - // get all where BoundPredicates here, because they are used in to cases below + // get all where BoundPredicates here, because they are used in two cases below let where_predicates = predicates .iter() .filter_map(|p| match p { diff --git a/compiler/rustc_hir_typeck/src/generator_interior/mod.rs b/compiler/rustc_hir_typeck/src/generator_interior/mod.rs index f397108044333..8feef332de8a7 100644 --- a/compiler/rustc_hir_typeck/src/generator_interior/mod.rs +++ b/compiler/rustc_hir_typeck/src/generator_interior/mod.rs @@ -650,7 +650,7 @@ fn check_must_not_suspend_ty<'tcx>( }, ) } - // If drop tracking is enabled, we want to look through references, since the referrent + // If drop tracking is enabled, we want to look through references, since the referent // may not be considered live across the await point. ty::Ref(_region, ty, _mutability) if fcx.sess().opts.unstable_opts.drop_tracking => { let descr_pre = &format!("{}reference{} to ", data.descr_pre, plural_suffix); diff --git a/compiler/rustc_hir_typeck/src/method/suggest.rs b/compiler/rustc_hir_typeck/src/method/suggest.rs index 900a6fa0d8db3..db1f10f645fd4 100644 --- a/compiler/rustc_hir_typeck/src/method/suggest.rs +++ b/compiler/rustc_hir_typeck/src/method/suggest.rs @@ -1530,7 +1530,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ); if pick.is_ok() { let range_span = parent_expr.span.with_hi(expr.span.hi()); - tcx.sess.emit_err(errors::MissingParentheseInRange { + tcx.sess.emit_err(errors::MissingParenthesesInRange { span, ty_str: ty_str.to_string(), method_name: item_name.as_str().to_string(), diff --git a/compiler/rustc_hir_typeck/src/pat.rs b/compiler/rustc_hir_typeck/src/pat.rs index af0bd26dec5f9..7160d1c67b251 100644 --- a/compiler/rustc_hir_typeck/src/pat.rs +++ b/compiler/rustc_hir_typeck/src/pat.rs @@ -1659,7 +1659,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { if tcx.sess.teach(&err.get_code().unwrap()) { err.note( "This error indicates that a struct pattern attempted to \ - extract a non-existent field from a struct. Struct fields \ + extract a nonexistent field from a struct. Struct fields \ are identified by the name used before the colon : so struct \ patterns should resemble the declaration of the struct type \ being matched.\n\n\ diff --git a/compiler/rustc_hir_typeck/src/upvar.rs b/compiler/rustc_hir_typeck/src/upvar.rs index 41a6ad80b65a3..147b3e74d0f8a 100644 --- a/compiler/rustc_hir_typeck/src/upvar.rs +++ b/compiler/rustc_hir_typeck/src/upvar.rs @@ -223,7 +223,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { let closure_hir_id = self.tcx.hir().local_def_id_to_hir_id(closure_def_id); if should_do_rust_2021_incompatible_closure_captures_analysis(self.tcx, closure_hir_id) { - self.perform_2229_migration_anaysis(closure_def_id, body_id, capture_clause, span); + self.perform_2229_migration_analysis(closure_def_id, body_id, capture_clause, span); } let after_feature_tys = self.final_upvar_tys(closure_def_id); @@ -731,7 +731,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// Perform the migration analysis for RFC 2229, and emit lint /// `disjoint_capture_drop_reorder` if needed. - fn perform_2229_migration_anaysis( + fn perform_2229_migration_analysis( &self, closure_def_id: LocalDefId, body_id: hir::BodyId, diff --git a/compiler/rustc_incremental/src/persist/dirty_clean.rs b/compiler/rustc_incremental/src/persist/dirty_clean.rs index 1d88dfd20c8cd..43274091cb873 100644 --- a/compiler/rustc_incremental/src/persist/dirty_clean.rs +++ b/compiler/rustc_incremental/src/persist/dirty_clean.rs @@ -139,7 +139,7 @@ pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) { return; } - // can't add `#[rustc_clean]` etc without opting in to this feature + // can't add `#[rustc_clean]` etc without opting into this feature if !tcx.features().rustc_attrs { return; } diff --git a/compiler/rustc_infer/messages.ftl b/compiler/rustc_infer/messages.ftl index c8998ea91bfe1..fdc4ff0896f5b 100644 --- a/compiler/rustc_infer/messages.ftl +++ b/compiler/rustc_infer/messages.ftl @@ -80,7 +80,7 @@ infer_subtype = ...so that the {$requirement -> [no_else] `if` missing an `else` returns `()` [fn_main_correct_type] `main` function has the correct type [fn_start_correct_type] `#[start]` function has the correct type - [intristic_correct_type] intrinsic has the correct type + [intrinsic_correct_type] intrinsic has the correct type [method_correct_type] method receiver has the correct type *[other] types are compatible } @@ -93,7 +93,7 @@ infer_subtype_2 = ...so that {$requirement -> [no_else] `if` missing an `else` returns `()` [fn_main_correct_type] `main` function has the correct type [fn_start_correct_type] `#[start]` function has the correct type - [intristic_correct_type] intrinsic has the correct type + [intrinsic_correct_type] intrinsic has the correct type [method_correct_type] method receiver has the correct type *[other] types are compatible } @@ -341,8 +341,8 @@ infer_await_note = calling an async function returns a future infer_prlf_defined_with_sub = the lifetime `{$sub_symbol}` defined here... infer_prlf_defined_without_sub = the lifetime defined here... -infer_prlf_must_oultive_with_sup = ...must outlive the lifetime `{$sup_symbol}` defined here -infer_prlf_must_oultive_without_sup = ...must outlive the lifetime defined here +infer_prlf_must_outlive_with_sup = ...must outlive the lifetime `{$sup_symbol}` defined here +infer_prlf_must_outlive_without_sup = ...must outlive the lifetime defined here infer_prlf_known_limitation = this is a known limitation that will be removed in the future (see issue #100013 for more information) infer_opaque_captures_lifetime = hidden type for `{$opaque_ty}` captures lifetime that does not appear in bounds @@ -380,7 +380,7 @@ infer_oc_no_else = `if` may be missing an `else` clause infer_oc_no_diverge = `else` clause of `let...else` does not diverge infer_oc_fn_main_correct_type = `main` function has wrong type infer_oc_fn_start_correct_type = `#[start]` function has wrong type -infer_oc_intristic_correct_type = intrinsic has wrong type +infer_oc_intrinsic_correct_type = intrinsic has wrong type infer_oc_method_correct_type = mismatched `self` parameter type infer_oc_closure_selfref = closure/generator type that references itself infer_oc_cant_coerce = cannot coerce intrinsics to function pointers diff --git a/compiler/rustc_infer/src/errors/mod.rs b/compiler/rustc_infer/src/errors/mod.rs index 65b3dd1a892b8..b1e819e83f19b 100644 --- a/compiler/rustc_infer/src/errors/mod.rs +++ b/compiler/rustc_infer/src/errors/mod.rs @@ -71,7 +71,7 @@ pub struct AmbiguousImpl<'a> { // Copy of `AnnotationRequired` for E0284 #[derive(Diagnostic)] #[diag(infer_type_annotations_needed, code = "E0284")] -pub struct AmbigousReturn<'a> { +pub struct AmbiguousReturn<'a> { #[primary_span] pub span: Span, pub source_kind: &'static str, @@ -1085,7 +1085,7 @@ pub enum PlaceholderRelationLfNotSatisfied { span: Span, #[note(infer_prlf_defined_with_sub)] sub_span: Span, - #[note(infer_prlf_must_oultive_with_sup)] + #[note(infer_prlf_must_outlive_with_sup)] sup_span: Span, sub_symbol: Symbol, sup_symbol: Symbol, @@ -1098,7 +1098,7 @@ pub enum PlaceholderRelationLfNotSatisfied { span: Span, #[note(infer_prlf_defined_with_sub)] sub_span: Span, - #[note(infer_prlf_must_oultive_without_sup)] + #[note(infer_prlf_must_outlive_without_sup)] sup_span: Span, sub_symbol: Symbol, #[note(infer_prlf_known_limitation)] @@ -1110,7 +1110,7 @@ pub enum PlaceholderRelationLfNotSatisfied { span: Span, #[note(infer_prlf_defined_without_sub)] sub_span: Span, - #[note(infer_prlf_must_oultive_with_sup)] + #[note(infer_prlf_must_outlive_with_sup)] sup_span: Span, sup_symbol: Symbol, #[note(infer_prlf_known_limitation)] @@ -1122,7 +1122,7 @@ pub enum PlaceholderRelationLfNotSatisfied { span: Span, #[note(infer_prlf_defined_without_sub)] sub_span: Span, - #[note(infer_prlf_must_oultive_without_sup)] + #[note(infer_prlf_must_outlive_without_sup)] sup_span: Span, #[note(infer_prlf_known_limitation)] note: (), @@ -1488,8 +1488,8 @@ pub enum ObligationCauseFailureCode { #[subdiagnostic] subdiags: Vec, }, - #[diag(infer_oc_intristic_correct_type, code = "E0308")] - IntristicCorrectType { + #[diag(infer_oc_intrinsic_correct_type, code = "E0308")] + IntrinsicCorrectType { #[primary_span] span: Span, #[subdiagnostic] diff --git a/compiler/rustc_infer/src/infer/canonical/query_response.rs b/compiler/rustc_infer/src/infer/canonical/query_response.rs index e98f68ae5a851..257d36259291e 100644 --- a/compiler/rustc_infer/src/infer/canonical/query_response.rs +++ b/compiler/rustc_infer/src/infer/canonical/query_response.rs @@ -467,11 +467,11 @@ impl<'tcx> InferCtxt<'tcx> { } } GenericArgKind::Const(result_value) => { - if let ty::ConstKind::Bound(debrujin, b) = result_value.kind() { + if let ty::ConstKind::Bound(debruijn, b) = result_value.kind() { // ...in which case we would set `canonical_vars[0]` to `Some(const X)`. // We only allow a `ty::INNERMOST` index in substitutions. - assert_eq!(debrujin, ty::INNERMOST); + assert_eq!(debruijn, ty::INNERMOST); opt_values[b] = Some(*original_value); } } diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index fe45b5ebe61b1..9b670c76a1822 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -832,7 +832,7 @@ pub trait ObligationEmittingRelation<'tcx>: TypeRelation<'tcx> { /// Register predicates that must hold in order for this relation to hold. Uses /// a default obligation cause, [`ObligationEmittingRelation::register_obligations`] should - /// be used if control over the obligaton causes is required. + /// be used if control over the obligation causes is required. fn register_predicates(&mut self, obligations: impl IntoIterator>); /// Register an obligation that both constants must be equal to each other. diff --git a/compiler/rustc_infer/src/infer/equate.rs b/compiler/rustc_infer/src/infer/equate.rs index fe4a2dd380073..f90f7674b55b1 100644 --- a/compiler/rustc_infer/src/infer/equate.rs +++ b/compiler/rustc_infer/src/infer/equate.rs @@ -178,7 +178,7 @@ impl<'tcx> TypeRelation<'tcx> for Equate<'_, '_, 'tcx> { where T: Relate<'tcx>, { - // A binder is equal to itself if it's structually equal to itself + // A binder is equal to itself if it's structurally equal to itself if a == b { return Ok(a); } diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 9e5f6d107d132..69545ba2ba47c 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -2885,7 +2885,7 @@ impl<'tcx> ObligationCauseExt<'tcx> for ObligationCause<'tcx> { LetElse => ObligationCauseFailureCode::NoDiverge { span, subdiags }, MainFunctionType => ObligationCauseFailureCode::FnMainCorrectType { span }, StartFunctionType => ObligationCauseFailureCode::FnStartCorrectType { span, subdiags }, - IntrinsicType => ObligationCauseFailureCode::IntristicCorrectType { span, subdiags }, + IntrinsicType => ObligationCauseFailureCode::IntrinsicCorrectType { span, subdiags }, MethodReceiver => ObligationCauseFailureCode::MethodCorrectType { span, subdiags }, // In the case where we have no more specific thing to @@ -2942,7 +2942,7 @@ impl IntoDiagnosticArg for ObligationCauseAsDiagArg<'_> { IfExpressionWithNoElse => "no_else", MainFunctionType => "fn_main_correct_type", StartFunctionType => "fn_start_correct_type", - IntrinsicType => "intristic_correct_type", + IntrinsicType => "intrinsic_correct_type", MethodReceiver => "method_correct_type", _ => "other", } diff --git a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs index 75cc4e257bd83..436678485f428 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs @@ -1,5 +1,5 @@ use crate::errors::{ - AmbigousReturn, AmbiguousImpl, AnnotationRequired, InferenceBadError, NeedTypeInfoInGenerator, + AmbiguousReturn, AmbiguousImpl, AnnotationRequired, InferenceBadError, NeedTypeInfoInGenerator, SourceKindMultiSuggestion, SourceKindSubdiag, }; use crate::infer::error_reporting::TypeErrCtxt; @@ -368,7 +368,7 @@ impl<'tcx> InferCtxt<'tcx> { bad_label, } .into_diagnostic(&self.tcx.sess.parse_sess.span_diagnostic), - TypeAnnotationNeeded::E0284 => AmbigousReturn { + TypeAnnotationNeeded::E0284 => AmbiguousReturn { span, source_kind, source_name, @@ -573,7 +573,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { bad_label: None, } .into_diagnostic(&self.tcx.sess.parse_sess.span_diagnostic), - TypeAnnotationNeeded::E0284 => AmbigousReturn { + TypeAnnotationNeeded::E0284 => AmbiguousReturn { span, source_kind, source_name: &name, diff --git a/compiler/rustc_infer/src/infer/higher_ranked/mod.rs b/compiler/rustc_infer/src/infer/higher_ranked/mod.rs index a63cfbc919c65..c304cd25c9c41 100644 --- a/compiler/rustc_infer/src/infer/higher_ranked/mod.rs +++ b/compiler/rustc_infer/src/infer/higher_ranked/mod.rs @@ -42,7 +42,7 @@ impl<'a, 'tcx> CombineFields<'a, 'tcx> { // Next, we instantiate each bound region in the subtype // with a fresh region variable. These region variables -- - // but no other pre-existing region variables -- can name + // but no other preexisting region variables -- can name // the placeholders. let sub_prime = self.infcx.instantiate_binder_with_fresh_vars(span, HigherRankedType, sub); diff --git a/compiler/rustc_infer/src/infer/sub.rs b/compiler/rustc_infer/src/infer/sub.rs index 0dd73a6e999ee..3766c250a9c70 100644 --- a/compiler/rustc_infer/src/infer/sub.rs +++ b/compiler/rustc_infer/src/infer/sub.rs @@ -210,7 +210,7 @@ impl<'tcx> TypeRelation<'tcx> for Sub<'_, '_, 'tcx> { where T: Relate<'tcx>, { - // A binder is always a subtype of itself if it's structually equal to itself + // A binder is always a subtype of itself if it's structurally equal to itself if a == b { return Ok(a); } diff --git a/compiler/rustc_infer/src/traits/project.rs b/compiler/rustc_infer/src/traits/project.rs index ac455055b4303..8d0af738dd115 100644 --- a/compiler/rustc_infer/src/traits/project.rs +++ b/compiler/rustc_infer/src/traits/project.rs @@ -103,7 +103,7 @@ pub enum ProjectionCacheEntry<'tcx> { /// if this field is set. Evaluation only /// cares about the final result, so we don't /// care about any region constraint side-effects - /// produced by evaluating the sub-boligations. + /// produced by evaluating the sub-obligations. /// /// Additionally, we will clear out the sub-obligations /// entirely if we ever evaluate the cache entry (along diff --git a/compiler/rustc_infer/src/traits/util.rs b/compiler/rustc_infer/src/traits/util.rs index ef01d5d513bbc..6022b62983beb 100644 --- a/compiler/rustc_infer/src/traits/util.rs +++ b/compiler/rustc_infer/src/traits/util.rs @@ -246,7 +246,7 @@ impl<'tcx, O: Elaboratable<'tcx>> Elaborator<'tcx, O> { // Nothing to elaborate when waiting for a closure's kind to be inferred. } ty::PredicateKind::ConstEvaluatable(..) => { - // Currently, we do not elaborate const-evaluatable + // Currently, we do not elaborate const-evaluable // predicates. } ty::PredicateKind::ConstEquate(..) => { diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 6b387df785e7d..b986dde5a02b2 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -22,7 +22,7 @@ use crate::fluent_generated as fluent; use crate::{ - errors::BuiltinEllpisisInclusiveRangePatterns, + errors::BuiltinEllipsisInclusiveRangePatterns, lints::{ BuiltinAnonymousParams, BuiltinBoxPointers, BuiltinClashingExtern, BuiltinClashingExternSub, BuiltinConstNoMangle, BuiltinDeprecatedAttrLink, @@ -1711,13 +1711,13 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns { } } - let (parenthesise, endpoints) = match &pat.kind { + let (parentheses, endpoints) = match &pat.kind { PatKind::Ref(subpat, _) => (true, matches_ellipsis_pat(&subpat)), _ => (false, matches_ellipsis_pat(pat)), }; if let Some((start, end, join)) = endpoints { - if parenthesise { + if parentheses { self.node_id = Some(pat.id); let end = expr_to_string(&end); let replace = match start { @@ -1725,7 +1725,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns { None => format!("&(..={})", end), }; if join.edition() >= Edition::Edition2021 { - cx.sess().emit_err(BuiltinEllpisisInclusiveRangePatterns { + cx.sess().emit_err(BuiltinEllipsisInclusiveRangePatterns { span: pat.span, suggestion: pat.span, replace, @@ -1743,7 +1743,7 @@ impl EarlyLintPass for EllipsisInclusiveRangePatterns { } else { let replace = "..="; if join.edition() >= Edition::Edition2021 { - cx.sess().emit_err(BuiltinEllpisisInclusiveRangePatterns { + cx.sess().emit_err(BuiltinEllipsisInclusiveRangePatterns { span: pat.span, suggestion: join, replace: replace.to_string(), @@ -2560,7 +2560,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue { .subst(cx.tcx, substs) .apply_any_module(cx.tcx, cx.param_env) { - // Entirely skip uninhbaited variants. + // Entirely skip uninhabited variants. Some(false) => return None, // Forward the others, but remember which ones are definitely inhabited. Some(true) => true, diff --git a/compiler/rustc_lint/src/errors.rs b/compiler/rustc_lint/src/errors.rs index 9af5284df1e29..bbae3d368f43c 100644 --- a/compiler/rustc_lint/src/errors.rs +++ b/compiler/rustc_lint/src/errors.rs @@ -81,7 +81,7 @@ pub struct UnknownToolInScopedLint { #[derive(Diagnostic)] #[diag(lint_builtin_ellipsis_inclusive_range_patterns, code = "E0783")] -pub struct BuiltinEllpisisInclusiveRangePatterns { +pub struct BuiltinEllipsisInclusiveRangePatterns { #[primary_span] pub span: Span, #[suggestion(style = "short", code = "{replace}", applicability = "machine-applicable")] diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 9d6ab0b75df17..7b711e9840ab6 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -1021,7 +1021,7 @@ declare_lint! { declare_lint! { /// The `invalid_alignment` lint detects dereferences of misaligned pointers during - /// constant evluation. + /// constant evaluation. /// /// ### Example /// @@ -1854,7 +1854,7 @@ declare_lint! { /// When new methods are added to traits in the standard library, they are /// usually added in an "unstable" form which is only available on the /// [nightly channel] with a [`feature` attribute]. If there is any - /// pre-existing code which extends a trait to have a method with the same + /// preexisting code which extends a trait to have a method with the same /// name, then the names will collide. In the future, when the method is /// stabilized, this will cause an error due to the ambiguity. This lint /// is an early-warning to let you know that there may be a collision in @@ -2747,7 +2747,7 @@ declare_lint! { } declare_lint! { - /// The `const_evaluatable_unchecked` lint detects a generic constant used + /// The `const_evaluable_unchecked` lint detects a generic constant used /// in a type. /// /// ### Example diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 08e38b0c9d59e..c9acbab253e10 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -811,7 +811,7 @@ LLVMRustOptimize( ModulePassManager MPM; bool NeedThinLTOBufferPasses = UseThinLTOBuffers; if (!NoPrepopulatePasses) { - // The pre-link pipelines don't support O0 and require using budilO0DefaultPipeline() instead. + // The pre-link pipelines don't support O0 and require using buildO0DefaultPipeline() instead. // At the same time, the LTO pipelines do support O0 and using them is required. bool IsLTO = OptStage == LLVMRustOptStage::ThinLTO || OptStage == LLVMRustOptStage::FatLTO; if (OptLevel == OptimizationLevel::O0 && !IsLTO) { diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 2930ce75028b7..e7154167ddb7f 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -117,7 +117,7 @@ pub(crate) struct CrateMetadata { /// Additional data used for decoding `HygieneData` (e.g. `SyntaxContext` /// and `ExpnId`). - /// Note that we store a `HygieneDecodeContext` for each `CrateMetadat`. This is + /// Note that we store a `HygieneDecodeContext` for each `CrateMetadata`. This is /// because `SyntaxContext` ids are not globally unique, so we need /// to track which ids we've decoded on a per-crate basis. hygiene_context: HygieneDecodeContext, @@ -627,7 +627,7 @@ impl<'a, 'tcx> Decodable> for Symbol { let pos = d.read_usize(); let old_pos = d.opaque.position(); - // move to str ofset and read + // move to str offset and read d.opaque.set_position(pos); let s = d.read_str(); let sym = Symbol::intern(s); diff --git a/compiler/rustc_middle/src/mir/interpret/pointer.rs b/compiler/rustc_middle/src/mir/interpret/pointer.rs index 60927eed85d3b..65d04919357f3 100644 --- a/compiler/rustc_middle/src/mir/interpret/pointer.rs +++ b/compiler/rustc_middle/src/mir/interpret/pointer.rs @@ -102,7 +102,7 @@ impl PointerArithmetic for T {} /// This trait abstracts over the kind of provenance that is associated with a `Pointer`. It is /// mostly opaque; the `Machine` trait extends it with some more operations that also have access to /// some global state. -/// The `Debug` rendering is used to distplay bare provenance, and for the default impl of `fmt`. +/// The `Debug` rendering is used to display bare provenance, and for the default impl of `fmt`. pub trait Provenance: Copy + fmt::Debug { /// Says whether the `offset` field of `Pointer`s with this provenance is the actual physical address. /// - If `false`, the offset *must* be relative. This means the bytes representing a pointer are diff --git a/compiler/rustc_middle/src/mir/interpret/queries.rs b/compiler/rustc_middle/src/mir/interpret/queries.rs index 856d821a5cf14..167bcf5c2b757 100644 --- a/compiler/rustc_middle/src/mir/interpret/queries.rs +++ b/compiler/rustc_middle/src/mir/interpret/queries.rs @@ -86,7 +86,7 @@ impl<'tcx> TyCtxt<'tcx> { Ok(Some(instance)) => { let cid = GlobalId { instance, promoted: None }; self.const_eval_global_id_for_typeck(param_env, cid, span).inspect(|_| { - // We are emitting the lint here instead of in `is_const_evaluatable` + // We are emitting the lint here instead of in `is_const_evaluable` // as we normalize obligations before checking them, and normalization // uses this function to evaluate this constant. // diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index 135889d0da810..c38a347809f4f 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -251,7 +251,7 @@ pub enum StatementKind<'tcx> { /// **Needs clarification**: The implication of the above idea would be that assignment implies /// that the resulting value is initialized. I believe we could commit to this separately from /// committing to whatever part of the memory model we would need to decide on to make the above - /// paragragh precise. Do we want to? + /// paragraph precise. Do we want to? /// /// Assignments in which the types of the place and rvalue differ are not well-formed. /// @@ -997,7 +997,7 @@ pub type PlaceElem<'tcx> = ProjectionElem>; /// This is what is implemented in miri today. Are these the semantics we want for MIR? Is this /// something we can even decide without knowing more about Rust's memory model? /// -/// **Needs clarifiation:** Is loading a place that has its variant index set well-formed? Miri +/// **Needs clarification:** Is loading a place that has its variant index set well-formed? Miri /// currently implements it, but it seems like this may be something to check against in the /// validator. #[derive(Clone, PartialEq, TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable, TypeVisitable)] diff --git a/compiler/rustc_middle/src/ty/abstract_const.rs b/compiler/rustc_middle/src/ty/abstract_const.rs index f889ce82706b3..223b763e34bfa 100644 --- a/compiler/rustc_middle/src/ty/abstract_const.rs +++ b/compiler/rustc_middle/src/ty/abstract_const.rs @@ -1,4 +1,4 @@ -//! A subset of a mir body used for const evaluatability checking. +//! A subset of a mir body used for const evaluability checking. use crate::ty::{ self, Const, EarlyBinder, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitableExt, diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs index bcedae233d93d..3ab90494c343a 100644 --- a/compiler/rustc_middle/src/ty/consts.rs +++ b/compiler/rustc_middle/src/ty/consts.rs @@ -241,7 +241,7 @@ impl<'tcx> Const<'tcx> { Err(guar) => tcx.const_error_with_guaranteed(self.ty(), guar), } } else { - // Either the constant isn't evaluatable or ValTree creation failed. + // Either the constant isn't evaluable or ValTree creation failed. self } } diff --git a/compiler/rustc_middle/src/ty/fast_reject.rs b/compiler/rustc_middle/src/ty/fast_reject.rs index 31d00b65e9843..76f61d9ac9c2d 100644 --- a/compiler/rustc_middle/src/ty/fast_reject.rs +++ b/compiler/rustc_middle/src/ty/fast_reject.rs @@ -68,7 +68,7 @@ pub enum TreatParams { } /// During fast-rejection, we have the choice of treating projection types -/// as either simplifyable or not, depending on whether we expect the projection +/// as either simplifiable or not, depending on whether we expect the projection /// to be normalized/rigid. #[derive(PartialEq, Eq, Debug, Clone, Copy)] pub enum TreatProjections { diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 195d951f9f366..1e2fd86e13dc8 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -235,7 +235,7 @@ impl IntoDiagnostic<'_, !> for LayoutError<'_> { } } -// FIXME: Once the other errors that embed this error have been converted to translateable +// FIXME: Once the other errors that embed this error have been converted to translatable // diagnostics, this Display impl should be removed. impl<'tcx> fmt::Display for LayoutError<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -458,10 +458,10 @@ impl<'tcx> SizeSkeleton<'tcx> { } } -/// When creating the layout for types with abstract conts in their size (i.e. [usize; 4 * N]), +/// When creating the layout for types with abstract consts in their size (i.e. [usize; 4 * N]), /// to ensure that they have a canonical order and can be compared directly we combine all /// constants, and sort the other terms. This allows comparison of expressions of sizes, -/// allowing for things like transmutating between types that depend on generic consts. +/// allowing for things like transmuting between types that depend on generic consts. /// This returns `None` if multiplication of constants overflows. fn mul_sorted_consts<'tcx>( tcx: TyCtxt<'tcx>, diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index 5c604bb6db274..405f28a84e7fb 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -197,7 +197,7 @@ impl<'tcx> fmt::Debug for AliasTy<'tcx> { // Atomic structs // // For things that don't carry any arena-allocated data (and are -// copy...), just add them to one of these lists as appropriat. +// copy...), just add them to one of these lists as appropriate. // For things for which the type library provides traversal implementations // for all Interners, we only need to provide a Lift implementation: diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index c8a78ec03d947..b58bd24ec5286 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -642,7 +642,7 @@ impl<'tcx> TyCtxt<'tcx> { } } - /// Return the set of types that should be taken into accound when checking + /// Return the set of types that should be taken into account when checking /// trait bounds on a generator's internal state. pub fn generator_hidden_types( self, @@ -1402,7 +1402,7 @@ pub fn is_trivially_const_drop(ty: Ty<'_>) -> bool { } /// Does the equivalent of -/// ```ignore (ilustrative) +/// ```ignore (illustrative) /// let v = self.iter().map(|p| p.fold_with(folder)).collect::>(); /// folder.tcx().intern_*(&v) /// ``` diff --git a/compiler/rustc_mir_build/src/build/expr/into.rs b/compiler/rustc_mir_build/src/build/expr/into.rs index 05a723a6b6750..9b38ac1cc4ce7 100644 --- a/compiler/rustc_mir_build/src/build/expr/into.rs +++ b/compiler/rustc_mir_build/src/build/expr/into.rs @@ -163,13 +163,13 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { // // [block: If(lhs)] -true-> [else_block: dest = (rhs)] // | (false) - // [shortcurcuit_block: dest = false] + // [shortcircuit_block: dest = false] // // Or: // // [block: If(lhs)] -false-> [else_block: dest = (rhs)] // | (true) - // [shortcurcuit_block: dest = true] + // [shortcircuit_block: dest = true] let (shortcircuit_block, mut else_block, join_block) = ( this.cfg.start_new_block(), diff --git a/compiler/rustc_mir_build/src/build/matches/test.rs b/compiler/rustc_mir_build/src/build/matches/test.rs index 8a03ea7e2cc7f..c842195934061 100644 --- a/compiler/rustc_mir_build/src/build/matches/test.rs +++ b/compiler/rustc_mir_build/src/build/matches/test.rs @@ -77,7 +77,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { | PatKind::Wild | PatKind::Binding { .. } | PatKind::Leaf { .. } - | PatKind::Deref { .. } => self.error_simplifyable(match_pair), + | PatKind::Deref { .. } => self.error_simplifiable(match_pair), } } @@ -173,7 +173,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { debug_assert_ne!( target_blocks[idx.index()], otherwise_block, - "no canididates for tested discriminant: {:?}", + "no candidates for tested discriminant: {:?}", discr, ); Some((discr.val, target_blocks[idx.index()])) @@ -181,7 +181,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { debug_assert_eq!( target_blocks[idx.index()], otherwise_block, - "found canididates for untested discriminant: {:?}", + "found candidates for untested discriminant: {:?}", discr, ); None @@ -499,7 +499,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { /// However, in some cases, the test may just not be relevant to candidate. /// For example, suppose we are testing whether `foo.x == 22`, but in one /// match arm we have `Foo { x: _, ... }`... in that case, the test for - /// what value `x` has has no particular relevance to this candidate. In + /// what value `x` has no particular relevance to this candidate. In /// such cases, this function just returns None without doing anything. /// This is used by the overall `match_candidates` algorithm to structure /// the match as a whole. See `match_candidates` for more details. @@ -763,8 +763,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { candidate.match_pairs.extend(consequent_match_pairs); } - fn error_simplifyable<'pat>(&mut self, match_pair: &MatchPair<'pat, 'tcx>) -> ! { - span_bug!(match_pair.pattern.span, "simplifyable pattern found: {:?}", match_pair.pattern) + fn error_simplifiable<'pat>(&mut self, match_pair: &MatchPair<'pat, 'tcx>) -> ! { + span_bug!(match_pair.pattern.span, "simplifiable pattern found: {:?}", match_pair.pattern) } fn const_range_contains( diff --git a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs index 32d0404bd0739..c99fc73fe8a34 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs @@ -156,7 +156,7 @@ impl<'tcx> ConstToPat<'tcx> { if let Some(non_sm_ty) = structural { if !self.type_may_have_partial_eq_impl(cv.ty()) { - // fatal avoids ICE from resolution of non-existent method (rare case). + // fatal avoids ICE from resolution of nonexistent method (rare case). self.tcx() .sess .emit_fatal(TypeNotStructural { span: self.span, non_sm_ty: non_sm_ty }); diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 98bebc9b13bc5..d8fd06eab86d1 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -366,7 +366,7 @@ where rustc_index::newtype_index!( /// This index uniquely identifies a place. /// - /// Not every place has a `PlaceIndex`, and not every `PlaceIndex` correspondends to a tracked + /// Not every place has a `PlaceIndex`, and not every `PlaceIndex` corresponds to a tracked /// place. However, every tracked place and all places along its projection have a `PlaceIndex`. pub struct PlaceIndex {} ); diff --git a/compiler/rustc_mir_transform/src/add_moves_for_packed_drops.rs b/compiler/rustc_mir_transform/src/add_moves_for_packed_drops.rs index 896fcd9cdd608..b29ffcc70f93f 100644 --- a/compiler/rustc_mir_transform/src/add_moves_for_packed_drops.rs +++ b/compiler/rustc_mir_transform/src/add_moves_for_packed_drops.rs @@ -10,7 +10,7 @@ use rustc_middle::mir::patch::MirPatch; /// they are dropped from an aligned address. /// /// For example, if we have something like -/// ```ignore (ilustrative) +/// ```ignore (illustrative) /// #[repr(packed)] /// struct Foo { /// dealign: u8, @@ -25,7 +25,7 @@ use rustc_middle::mir::patch::MirPatch; /// its address is not aligned. /// /// Instead, we move `foo.data` to a local and drop that: -/// ```ignore (ilustrative) +/// ```ignore (illustrative) /// storage.live(drop_temp) /// drop_temp = foo.data; /// drop(drop_temp) -> next diff --git a/compiler/rustc_mir_transform/src/add_retag.rs b/compiler/rustc_mir_transform/src/add_retag.rs index 916f2904dda80..187d38b385be3 100644 --- a/compiler/rustc_mir_transform/src/add_retag.rs +++ b/compiler/rustc_mir_transform/src/add_retag.rs @@ -59,7 +59,7 @@ impl<'tcx> MirPass<'tcx> for AddRetag { let basic_blocks = body.basic_blocks.as_mut(); let local_decls = &body.local_decls; let needs_retag = |place: &Place<'tcx>| { - !place.has_deref() // we're not eally interested in stores to "outside" locations, they are hard to keep track of anyway + !place.has_deref() // we're not really interested in stores to "outside" locations, they are hard to keep track of anyway && may_contain_reference(place.ty(&*local_decls, tcx).ty, /*depth*/ 3, tcx) && !local_decls[place.local].is_deref_temp() }; diff --git a/compiler/rustc_mir_transform/src/const_debuginfo.rs b/compiler/rustc_mir_transform/src/const_debuginfo.rs index 6f0ae4f07ab79..692b3182f7d23 100644 --- a/compiler/rustc_mir_transform/src/const_debuginfo.rs +++ b/compiler/rustc_mir_transform/src/const_debuginfo.rs @@ -22,7 +22,7 @@ impl<'tcx> MirPass<'tcx> for ConstDebugInfo { fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { trace!("running ConstDebugInfo on {:?}", body.source); - for (local, constant) in find_optimization_oportunities(body) { + for (local, constant) in find_optimization_opportunities(body) { for debuginfo in &mut body.var_debug_info { if let VarDebugInfoContents::Place(p) = debuginfo.value { if p.local == local && p.projection.is_empty() { @@ -45,7 +45,7 @@ struct LocalUseVisitor { local_assignment_locations: IndexVec>, } -fn find_optimization_oportunities<'tcx>(body: &Body<'tcx>) -> Vec<(Local, Constant<'tcx>)> { +fn find_optimization_opportunities<'tcx>(body: &Body<'tcx>) -> Vec<(Local, Constant<'tcx>)> { let mut visitor = LocalUseVisitor { local_mutating_uses: IndexVec::from_elem(0, &body.local_decls), local_assignment_locations: IndexVec::from_elem(None, &body.local_decls), diff --git a/compiler/rustc_mir_transform/src/const_prop.rs b/compiler/rustc_mir_transform/src/const_prop.rs index c0146e3efb02e..c9537f9a61c09 100644 --- a/compiler/rustc_mir_transform/src/const_prop.rs +++ b/compiler/rustc_mir_transform/src/const_prop.rs @@ -826,7 +826,7 @@ impl Visitor<'_> for CanConstProp { | NonMutatingUse(NonMutatingUseContext::AddressOf) | MutatingUse(MutatingUseContext::Borrow) | MutatingUse(MutatingUseContext::AddressOf) => { - trace!("local {:?} can't be propagaged because it's used: {:?}", local, context); + trace!("local {:?} can't be propagated because it's used: {:?}", local, context); self.can_const_prop[local] = ConstPropMode::NoPropagation; } } diff --git a/compiler/rustc_mir_transform/src/coverage/graph.rs b/compiler/rustc_mir_transform/src/coverage/graph.rs index 7391a77b0a66b..8ff67b5f8d3ff 100644 --- a/compiler/rustc_mir_transform/src/coverage/graph.rs +++ b/compiler/rustc_mir_transform/src/coverage/graph.rs @@ -111,7 +111,7 @@ impl CoverageGraph { if predecessors.len() > 1 { "predecessors.len() > 1".to_owned() } else { - format!("bb {} is not in precessors: {:?}", bb.index(), predecessors) + format!("bb {} is not in predecessors: {:?}", bb.index(), predecessors) } ); } diff --git a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs index d4db7e2de4039..a56c5cc5c12f9 100644 --- a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs +++ b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs @@ -351,7 +351,7 @@ impl<'a, 'tcx> ConstAnalysis<'a, 'tcx> { } (FlatSet::Bottom, _) | (_, FlatSet::Bottom) => (FlatSet::Bottom, FlatSet::Bottom), (_, _) => { - // Could attempt some algebraic simplifcations here. + // Could attempt some algebraic simplifications here. (FlatSet::Top, FlatSet::Top) } } diff --git a/compiler/rustc_mir_transform/src/dest_prop.rs b/compiler/rustc_mir_transform/src/dest_prop.rs index 3916491777088..5a842714e5dad 100644 --- a/compiler/rustc_mir_transform/src/dest_prop.rs +++ b/compiler/rustc_mir_transform/src/dest_prop.rs @@ -69,7 +69,7 @@ //! of this is that such liveness analysis can report more accurate results about whole locals at //! a time. For example, consider: //! -//! ```ignore (syntax-highliting-only) +//! ```ignore (syntax-highlighting-only) //! _1 = u; //! // unrelated code //! _1.f1 = v; @@ -360,7 +360,7 @@ struct FilterInformation<'a, 'body, 'alloc, 'tcx> { } // We first implement some utility functions which we will expose removing candidates according to -// different needs. Throughout the livenss filtering, the `candidates` are only ever accessed +// different needs. Throughout the liveness filtering, the `candidates` are only ever accessed // through these methods, and not directly. impl<'alloc> Candidates<'alloc> { /// Just `Vec::retain`, but the condition is inverted and we add debugging output diff --git a/compiler/rustc_mir_transform/src/elaborate_drops.rs b/compiler/rustc_mir_transform/src/elaborate_drops.rs index a702113bd9998..1e115be2c2ab9 100644 --- a/compiler/rustc_mir_transform/src/elaborate_drops.rs +++ b/compiler/rustc_mir_transform/src/elaborate_drops.rs @@ -24,7 +24,7 @@ use std::fmt; /// In general, the compiler cannot determine at compile time whether a destructor will run or not. /// /// At a high level, this pass refines Drop to only run the destructor if the -/// target is initialized. The way this is achievied is by inserting drop flags for every variable +/// target is initialized. The way this is achieved is by inserting drop flags for every variable /// that may be dropped, and then using those flags to determine whether a destructor should run. /// Once this is complete, Drop terminators in the MIR correspond to a call to the "drop glue" or /// "drop shim" for the type of the dropped place. diff --git a/compiler/rustc_mir_transform/src/generator.rs b/compiler/rustc_mir_transform/src/generator.rs index 4c4423721fb8c..507e12d723894 100644 --- a/compiler/rustc_mir_transform/src/generator.rs +++ b/compiler/rustc_mir_transform/src/generator.rs @@ -1869,7 +1869,7 @@ fn check_must_not_suspend_ty<'tcx>( }, ) } - // If drop tracking is enabled, we want to look through references, since the referrent + // If drop tracking is enabled, we want to look through references, since the referent // may not be considered live across the await point. ty::Ref(_region, ty, _mutability) => { let descr_pre = &format!("{}reference{} to ", data.descr_pre, plural_suffix); diff --git a/compiler/rustc_mir_transform/src/ssa.rs b/compiler/rustc_mir_transform/src/ssa.rs index be026402dd578..9d9c5d540381a 100644 --- a/compiler/rustc_mir_transform/src/ssa.rs +++ b/compiler/rustc_mir_transform/src/ssa.rs @@ -21,7 +21,7 @@ pub struct SsaLocals { /// We often encounter MIR bodies with 1 or 2 basic blocks. In those cases, it's unnecessary to /// actually compute dominators, we can just compare block indices because bb0 is always the first -/// block, and in any body all other blocks are always always dominated by bb0. +/// block, and in any body all other blocks are always dominated by bb0. struct SmallDominators { inner: Option>, } diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 7bcff7e07fb34..2ed628871d2d7 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -402,7 +402,7 @@ fn collect_roots(tcx: TyCtxt<'_>, mode: MonoItemCollectionMode) -> Vec( tcx: TyCtxt<'tcx>, diff --git a/compiler/rustc_monomorphize/src/partitioning/default.rs b/compiler/rustc_monomorphize/src/partitioning/default.rs index 769e12f77bf2d..49126045d0cfe 100644 --- a/compiler/rustc_monomorphize/src/partitioning/default.rs +++ b/compiler/rustc_monomorphize/src/partitioning/default.rs @@ -424,7 +424,7 @@ fn mono_item_visibility<'tcx>( InstanceDef::Item(def) => def.did, InstanceDef::DropGlue(def_id, Some(_)) => def_id, - // We match the visiblity of statics here + // We match the visibility of statics here InstanceDef::ThreadLocalShim(def_id) => { return static_visibility(tcx, can_be_internalized, def_id); } diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs index 9e856c9f2120c..ad9b20f9c767a 100644 --- a/compiler/rustc_parse/src/lexer/mod.rs +++ b/compiler/rustc_parse/src/lexer/mod.rs @@ -67,7 +67,7 @@ pub(crate) fn parse_token_trees<'a>( match token_trees { Ok(stream) if unmatched_delims.is_empty() => Ok(stream), _ => { - // Return error if there are unmatched delimiters or unclosng delimiters. + // Return error if there are unmatched delimiters or unclosed delimiters. // We emit delimiter mismatch errors first, then emit the unclosing delimiter mismatch // because the delimiter mismatch is more likely to be the root cause of error diff --git a/compiler/rustc_parse/src/validate_attr.rs b/compiler/rustc_parse/src/validate_attr.rs index 72402a200907a..2f397e303e508 100644 --- a/compiler/rustc_parse/src/validate_attr.rs +++ b/compiler/rustc_parse/src/validate_attr.rs @@ -68,7 +68,7 @@ pub fn parse_meta<'a>(sess: &'a ParseSess, attr: &Attribute) -> PResult<'a, Meta } } else { // The non-error case can happen with e.g. `#[foo = 1+1]`. The error case can - // happen with e.g. `#[foo = include_str!("non-existent-file.rs")]`; in that + // happen with e.g. `#[foo = include_str!("nonexistent-file.rs")]`; in that // case we delay the error because an earlier error will have already been // reported. let msg = format!("unexpected expression: `{}`", pprust::expr_to_string(expr)); diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs index 30477c7bd4422..dc3cb64b3c279 100644 --- a/compiler/rustc_query_impl/src/on_disk_cache.rs +++ b/compiler/rustc_query_impl/src/on_disk_cache.rs @@ -744,7 +744,7 @@ impl<'a, 'tcx> Decodable> for Symbol { let pos = d.read_usize(); let old_pos = d.opaque.position(); - // move to str ofset and read + // move to str offset and read d.opaque.set_position(pos); let s = d.read_str(); let sym = Symbol::intern(s); diff --git a/compiler/rustc_query_system/messages.ftl b/compiler/rustc_query_system/messages.ftl index 870e824039cb6..0d01123ad88ba 100644 --- a/compiler/rustc_query_system/messages.ftl +++ b/compiler/rustc_query_system/messages.ftl @@ -1,4 +1,4 @@ -query_system_reentrant = internal compiler error: re-entrant incremental verify failure, suppressing message +query_system_reentrant = internal compiler error: reentrant incremental verify failure, suppressing message query_system_increment_compilation = internal compiler error: encountered incremental compilation error with {$dep_node} .help = This is a known issue with the compiler. Run {$run_cmd} to allow your project to compile diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index a9a2e6dd04c2d..fd9e685ab8085 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -249,7 +249,7 @@ impl DepGraph { /// get an ICE. Normally, we would have tried (and failed) to mark /// some other query green (e.g. `item_children`) which was used /// to obtain `C`, which would prevent us from ever trying to force - /// a non-existent `D`. + /// a nonexistent `D`. /// /// It might be possible to enforce that all `DepNode`s read during /// deserialization already exist in the previous `DepGraph`. In diff --git a/compiler/rustc_query_system/src/query/config.rs b/compiler/rustc_query_system/src/query/config.rs index c8d779385108f..bb9ea50a1ea56 100644 --- a/compiler/rustc_query_system/src/query/config.rs +++ b/compiler/rustc_query_system/src/query/config.rs @@ -63,7 +63,7 @@ pub trait QueryConfig: Copy { fn handle_cycle_error(self) -> HandleCycleError; fn hash_result(self) -> HashResult; - // Just here for convernience and checking that the key matches the kind, don't override this. + // Just here for convenience and checking that the key matches the kind, don't override this. fn construct_dep_node(self, tcx: Qcx::DepContext, key: &Self::Key) -> DepNode { DepNode::construct(tcx, self.dep_kind(), key) } diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index 20310483d7e86..132f3512ff2a6 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -691,7 +691,7 @@ fn incremental_verify_ich_failed( // which may result in another fingerprint mismatch while we're in the middle // of processing this one. To avoid a double-panic (which kills the process // before we can print out the query static), we print out a terse - // but 'safe' message if we detect a re-entrant call to this method. + // but 'safe' message if we detect a reentrant call to this method. thread_local! { static INSIDE_VERIFY_PANIC: Cell = const { Cell::new(false) }; }; diff --git a/compiler/rustc_resolve/src/effective_visibilities.rs b/compiler/rustc_resolve/src/effective_visibilities.rs index bed579f6b9258..87067189a7758 100644 --- a/compiler/rustc_resolve/src/effective_visibilities.rs +++ b/compiler/rustc_resolve/src/effective_visibilities.rs @@ -175,7 +175,7 @@ impl<'r, 'a, 'tcx> EffectiveVisibilitiesVisitor<'r, 'a, 'tcx> { /// to not update anything and we can skip it. /// /// We are checking this condition only if the correct value of private visibility is - /// cheaply available, otherwise it does't make sense performance-wise. + /// cheaply available, otherwise it doesn't make sense performance-wise. /// /// `None` is returned if the update can be skipped, /// and cheap private visibility is returned otherwise. diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index afa796cb6453b..af0ec236df063 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -22,7 +22,7 @@ pub(crate) struct UnderscoreLifetimeNameCannotBeUsedHere(#[primary_span] pub(cra #[derive(Diagnostic)] #[diag(resolve_crate_may_not_be_imported)] -pub(crate) struct CrateMayNotBeImprted(#[primary_span] pub(crate) Span); +pub(crate) struct CrateMayNotBeImported(#[primary_span] pub(crate) Span); #[derive(Diagnostic)] #[diag(resolve_crate_root_imports_must_be_named_explicitly)] diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 90a2fa89cd2ab..4514543b452bd 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -1079,7 +1079,7 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast, for rib in self.lifetime_ribs.iter().rev() { match rib.kind { // We are inside a `PolyTraitRef`. The lifetimes are - // to be intoduced in that (maybe implicit) `for<>` binder. + // to be introduced in that (maybe implicit) `for<>` binder. LifetimeRibKind::Generics { binder, kind: LifetimeBinderKind::PolyTrait, @@ -2565,7 +2565,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { self.with_rib(ValueNS, kind, |this| this.with_rib(TypeNS, kind, f)) } - // HACK(min_const_generics,const_evaluatable_unchecked): We + // HACK(min_const_generics,const_evaluable_unchecked): We // want to keep allowing `[0; std::mem::size_of::<*mut T>()]` // with a future compat lint for now. We do this by adding an // additional special case for repeat expressions. @@ -2636,7 +2636,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { // actual constant expression in a provided default. if let Some(expr) = expr { // We allow arbitrary const expressions inside of associated consts, - // even if they are potentially not const evaluatable. + // even if they are potentially not const evaluable. // // Type parameters can already be used and as associated consts are // not used as part of the type system, this is far less surprising. @@ -2823,7 +2823,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { self.visit_ty(ty); if let Some(expr) = expr { // We allow arbitrary const expressions inside of associated consts, - // even if they are potentially not const evaluatable. + // even if they are potentially not const evaluable. // // Type parameters can already be used and as associated consts are // not used as part of the type system, this is far less surprising. @@ -3803,7 +3803,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { // use std::u8; // bring module u8 in scope // fn f() -> u8 { // OK, resolves to primitive u8, not to std::u8 // u8::max_value() // OK, resolves to associated function ::max_value, - // // not to non-existent std::u8::max_value + // // not to nonexistent std::u8::max_value // } // // Such behavior is required for backward compatibility. diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 37fbfad2de631..e824a6ddc072f 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -91,7 +91,7 @@ fn import_candidate_to_enum_paths(suggestion: &ImportSuggestion) -> (String, Str /// Description of an elided lifetime. #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)] pub(super) struct MissingLifetime { - /// Used to overwrite the resolution with the suggestion, to avoid cascasing errors. + /// Used to overwrite the resolution with the suggestion, to avoid cascading errors. pub id: NodeId, /// Where to suggest adding the lifetime. pub span: Span, @@ -408,7 +408,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { } let Some(path_last_segment) = path.last() else { return }; let item_str = path_last_segment.ident; - // Emit help message for fake-self from other languages (e.g., `this` in Javascript). + // Emit help message for fake-self from other languages (e.g., `this` in JavaScript). if ["this", "my"].contains(&item_str.as_str()) { err.span_suggestion_short( span, diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs index 88e3674f89943..b5a69f7dd05a4 100644 --- a/compiler/rustc_span/src/source_map.rs +++ b/compiler/rustc_span/src/source_map.rs @@ -483,7 +483,7 @@ impl SourceMap { self.span_to_string(sp, FileNameDisplayPreference::Remapped) } - /// Format the span location suitable for pretty printing anotations with relative line numbers + /// Format the span location suitable for pretty printing annotations with relative line numbers pub fn span_to_relative_line_string(&self, sp: Span, relative_to: Span) -> String { if self.files.borrow().source_files.is_empty() || sp.is_dummy() || relative_to.is_dummy() { return "no-location".to_string(); @@ -777,7 +777,7 @@ impl SourceMap { /// Given a 'Span', tries to tell if it's wrapped by "<>" or "()" /// the algorithm searches if the next character is '>' or ')' after skipping white space - /// then searches the previous charactoer to match '<' or '(' after skipping white space + /// then searches the previous character to match '<' or '(' after skipping white space /// return true if wrapped by '<>' or '()' pub fn span_wrapped_by_angle_or_parentheses(&self, span: Span) -> bool { self.span_to_source(span, |src, start_index, end_index| { diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 6bfae3771521b..206791bdc2c10 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -508,7 +508,7 @@ symbols! { const_deallocate, const_eval_limit, const_eval_select, - const_evaluatable_checked, + const_evaluable_checked, const_extern_fn, const_fn, const_fn_floating_point_arithmetic, diff --git a/compiler/rustc_target/src/abi/call/avr.rs b/compiler/rustc_target/src/abi/call/avr.rs index e20f01355a4a6..b01dac8c70d7e 100644 --- a/compiler/rustc_target/src/abi/call/avr.rs +++ b/compiler/rustc_target/src/abi/call/avr.rs @@ -10,7 +10,7 @@ //! > self-consistent and sensible LLVM IR generation, but does not //! > conform to any particular ABI. //! > -//! > - Doxygen Doxumentation of `clang::DefaultABIInfo` +//! > - Doxygen Documentation of `clang::DefaultABIInfo` //! //! This calling convention may not match AVR-GCC in all cases. //! diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 4e5a821f0f6ab..3ee3a8ea227ec 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -2285,13 +2285,13 @@ impl Target { } } } ); - ($key_name:ident, falliable_list) => ( { + ($key_name:ident, fallible_list) => ( { let name = (stringify!($key_name)).replace("_", "-"); obj.remove(&name).and_then(|j| { if let Some(v) = j.as_array() { match v.iter().map(|a| FromStr::from_str(a.as_str().unwrap())).collect() { Ok(l) => { base.$key_name = l }, - // FIXME: `falliable_list` can't re-use the `key!` macro for list + // FIXME: `fallible_list` can't re-use the `key!` macro for list // elements and the error messages from that macro, so it has a bad // generic message instead Err(_) => return Some(Err( @@ -2610,7 +2610,7 @@ impl Target { key!(has_thumb_interworking, bool); key!(debuginfo_kind, DebuginfoKind)?; key!(split_debuginfo, SplitDebuginfo)?; - key!(supported_split_debuginfo, falliable_list)?; + key!(supported_split_debuginfo, fallible_list)?; key!(supported_sanitizers, SanitizerSet)?; key!(default_adjusted_cabi, Option)?; key!(generate_arange_section, bool); diff --git a/compiler/rustc_target/src/spec/thumb_base.rs b/compiler/rustc_target/src/spec/thumb_base.rs index 4dcf47fe465c3..2220b9326c977 100644 --- a/compiler/rustc_target/src/spec/thumb_base.rs +++ b/compiler/rustc_target/src/spec/thumb_base.rs @@ -12,7 +12,7 @@ // // We have opted for these instead of one target per processor (e.g., `cortex-m0`, `cortex-m3`, // etc) because the differences between some processors like the cortex-m0 and cortex-m1 are almost -// non-existent from the POV of codegen so it doesn't make sense to have separate targets for them. +// nonexistent from the POV of codegen so it doesn't make sense to have separate targets for them. // And if differences exist between two processors under the same target, rustc flags can be used to // optimize for one processor or the other. // diff --git a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs index 10d817f75ac77..bacb0e32efc1a 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs @@ -51,7 +51,7 @@ pub(super) enum CandidateSource { BuiltinImpl, /// An assumption from the environment. /// - /// More precicely we've used the `n-th` assumption in the `param_env`. + /// More precisely we've used the `n-th` assumption in the `param_env`. /// /// ## Examples /// @@ -241,7 +241,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { // HACK: `_: Trait` is ambiguous, because it may be satisfied via a builtin rule, // object bound, alias bound, etc. We are unable to determine this until we can at - // least structually resolve the type one layer. + // least structurally resolve the type one layer. if goal.predicate.self_ty().is_ty_var() { return vec![Candidate { source: CandidateSource::BuiltinImpl, diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs index ada868705c7c3..e954f44829d25 100644 --- a/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs +++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs @@ -155,8 +155,8 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { } } GenericArgKind::Const(c) => { - if let ty::ConstKind::Bound(debrujin, b) = c.kind() { - assert_eq!(debrujin, ty::INNERMOST); + if let ty::ConstKind::Bound(debruijn, b) = c.kind() { + assert_eq!(debruijn, ty::INNERMOST); opt_values[b.index()] = Some(*original_value); } } @@ -176,7 +176,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { // As an optimization we sometimes avoid creating a new inference variable here. // // All new inference variables we create start out in the current universe of the caller. - // This is conceptionally wrong as these inference variables would be able to name + // This is conceptually wrong as these inference variables would be able to name // more placeholders then they should be able to. However the inference variables have // to "come from somewhere", so by equating them with the original values of the caller // later on, we pull them down into their correct universe again. diff --git a/compiler/rustc_trait_selection/src/solve/trait_goals.rs b/compiler/rustc_trait_selection/src/solve/trait_goals.rs index abd11a15ac23a..1abcc80d01a32 100644 --- a/compiler/rustc_trait_selection/src/solve/trait_goals.rs +++ b/compiler/rustc_trait_selection/src/solve/trait_goals.rs @@ -591,7 +591,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { Some(self.evaluate_added_goals_and_make_canonical_response(Certainty::AMBIGUOUS)) } - // These types cannot be structurally decomposed into constitutent + // These types cannot be structurally decomposed into constituent // types, and therefore have no built-in auto impl. ty::Dynamic(..) | ty::Param(..) diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs index 345e84990ed03..a3ac3d20828ab 100644 --- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs +++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs @@ -23,7 +23,7 @@ use crate::traits::ObligationCtxt; /// Check if a given constant can be evaluated. #[instrument(skip(infcx), level = "debug")] -pub fn is_const_evaluatable<'tcx>( +pub fn is_const_evaluable<'tcx>( infcx: &InferCtxt<'tcx>, unexpanded_ct: ty::Const<'tcx>, param_env: ty::ParamEnv<'tcx>, @@ -64,7 +64,7 @@ pub fn is_const_evaluatable<'tcx>( ty::ConstKind::Expr(_) => { // FIXME(generic_const_exprs): we have a `ConstKind::Expr` which is fully concrete, but // currently it is not possible to evaluate `ConstKind::Expr` so we are unable to tell if it - // is evaluatable or not. For now we just ICE until this is implemented. + // is evaluable or not. For now we just ICE until this is implemented. Err(NotConstEvaluatable::Error(tcx.sess.delay_span_bug( span, "evaluating `ConstKind::Expr` is not currently supported", @@ -161,7 +161,7 @@ fn satisfied_from_param_env<'tcx>( param_env: ty::ParamEnv<'tcx>, ) -> bool { // Try to unify with each subtree in the AbstractConst to allow for - // `N + 1` being const evaluatable even if theres only a `ConstEvaluatable` + // `N + 1` being const evaluable even if theres only a `ConstEvaluatable` // predicate for `(N + 1) * 2` struct Visitor<'a, 'tcx> { ct: ty::Const<'tcx>, @@ -174,7 +174,7 @@ fn satisfied_from_param_env<'tcx>( impl<'a, 'tcx> TypeVisitor> for Visitor<'a, 'tcx> { type BreakTy = (); fn visit_const(&mut self, c: ty::Const<'tcx>) -> ControlFlow { - debug!("is_const_evaluatable: candidate={:?}", c); + debug!("is_const_evaluable: candidate={:?}", c); if self.infcx.probe(|_| { let ocx = ObligationCtxt::new_in_snapshot(self.infcx); ocx.eq(&ObligationCause::dummy(), self.param_env, c.ty(), self.ct.ty()).is_ok() @@ -226,6 +226,6 @@ fn satisfied_from_param_env<'tcx>( return true; } - debug!("is_const_evaluatable: no"); + debug!("is_const_evaluable: no"); false } diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index cef982fcb41ef..2e3061dec763c 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -467,7 +467,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { } } - self.tcx.sess.delay_span_bug(DUMMY_SP, "expected fullfillment errors") + self.tcx.sess.delay_span_bug(DUMMY_SP, "expected fulfillment errors") } /// Reports that an overflow has occurred and halts compilation. We @@ -2058,7 +2058,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { if candidates.iter().any(|c| matches!(c.similarity, CandidateSimilarity::Exact { .. })) { // If any of the candidates is a perfect match, we don't want to show all of them. // This is particularly relevant for the case of numeric types (as they all have the - // same cathegory). + // same category). candidates.retain(|c| matches!(c.similarity, CandidateSimilarity::Exact { .. })); } candidates diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index fb75ec7672920..73207f183a1d8 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -1381,7 +1381,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { } } - // Issue #104961, we need to add parentheses properly for compond expressions + // Issue #104961, we need to add parentheses properly for compound expressions // for example, `x.starts_with("hi".to_string() + "you")` // should be `x.starts_with(&("hi".to_string() + "you"))` let Some(body_id) = self.tcx.hir().maybe_body_owned_by(obligation.cause.body_id) else { return false; }; diff --git a/compiler/rustc_trait_selection/src/traits/misc.rs b/compiler/rustc_trait_selection/src/traits/misc.rs index af567c074384e..63949843aedcd 100644 --- a/compiler/rustc_trait_selection/src/traits/misc.rs +++ b/compiler/rustc_trait_selection/src/traits/misc.rs @@ -14,7 +14,7 @@ use rustc_span::DUMMY_SP; use super::outlives_bounds::InferCtxtExt; pub enum CopyImplementationError<'tcx> { - InfrigingFields(Vec<(&'tcx ty::FieldDef, Ty<'tcx>, InfringingFieldsReason<'tcx>)>), + InfringingFields(Vec<(&'tcx ty::FieldDef, Ty<'tcx>, InfringingFieldsReason<'tcx>)>), NotAnAdt, HasDestructor, } @@ -125,7 +125,7 @@ pub fn type_allowed_to_implement_copy<'tcx>( } if !infringing.is_empty() { - return Err(CopyImplementationError::InfrigingFields(infringing)); + return Err(CopyImplementationError::InfringingFields(infringing)); } if adt.has_dtor(tcx) { diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 8a203dec86bab..4889cd544a29d 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -203,7 +203,7 @@ fn do_normalize_predicates<'tcx>( } }; - debug!("do_normalize_predictes: normalized predicates = {:?}", predicates); + debug!("do_normalize_predicates: normalized predicates = {:?}", predicates); // We can use the `elaborated_env` here; the region code only // cares about declarations like `'a: 'b`. diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 6bb53418beabb..0fdba524e2569 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -888,7 +888,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { let c1 = tcx.expand_abstract_consts(c1); let c2 = tcx.expand_abstract_consts(c2); debug!( - "evalaute_predicate_recursively: equating consts:\nc1= {:?}\nc2= {:?}", + "evaluate_predicate_recursively: equating consts:\nc1= {:?}\nc2= {:?}", c1, c2 ); diff --git a/compiler/rustc_ty_utils/src/layout_sanity_check.rs b/compiler/rustc_ty_utils/src/layout_sanity_check.rs index a5311dbd1b770..ed513cb3c7fc8 100644 --- a/compiler/rustc_ty_utils/src/layout_sanity_check.rs +++ b/compiler/rustc_ty_utils/src/layout_sanity_check.rs @@ -285,7 +285,7 @@ pub(super) fn sanity_check_layout<'tcx>( { // These are never actually accessed anyway, so we can skip the coherence check // for them. They also fail that check, since they have - // `Aggregate`/`Uninhbaited` ABI even when the main type is + // `Aggregate`/`Uninhabited` ABI even when the main type is // `Scalar`/`ScalarPair`. (Note that sometimes, variants with fields have size // 0, and sometimes, variants without fields have non-0 size.) continue; diff --git a/compiler/rustc_ty_utils/src/needs_drop.rs b/compiler/rustc_ty_utils/src/needs_drop.rs index de7fd003176bb..5f436f7c9fdf9 100644 --- a/compiler/rustc_ty_utils/src/needs_drop.rs +++ b/compiler/rustc_ty_utils/src/needs_drop.rs @@ -243,7 +243,7 @@ fn drop_tys_helper<'tcx>( } else { let field_tys = adt_def.all_fields().map(|field| { let r = tcx.type_of(field.did).subst(tcx, substs); - debug!("drop_tys_helper: Subst into {:?} with {:?} gettng {:?}", field, substs, r); + debug!("drop_tys_helper: Subst into {:?} with {:?} getting {:?}", field, substs, r); r }); if only_significant { diff --git a/library/alloc/src/collections/vec_deque/spec_from_iter.rs b/library/alloc/src/collections/vec_deque/spec_from_iter.rs index 7650492ebdad1..2708c7fe10259 100644 --- a/library/alloc/src/collections/vec_deque/spec_from_iter.rs +++ b/library/alloc/src/collections/vec_deque/spec_from_iter.rs @@ -12,7 +12,7 @@ where default fn spec_from_iter(iterator: I) -> Self { // Since converting is O(1) now, just re-use the `Vec` logic for // anything where we can't do something extra-special for `VecDeque`, - // especially as that could save us some monomorphiziation work + // especially as that could save us some monomorphization work // if one uses the same iterators (like slice ones) with both. crate::vec::Vec::from_iter(iterator).into() } diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs index b87ef59f64a3b..8497740990443 100644 --- a/library/alloc/src/str.rs +++ b/library/alloc/src/str.rs @@ -404,12 +404,12 @@ impl str { // See https://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G33992 // for the definition of `Final_Sigma`. debug_assert!('Σ'.len_utf8() == 2); - let is_word_final = case_ignoreable_then_cased(from[..i].chars().rev()) - && !case_ignoreable_then_cased(from[i + 2..].chars()); + let is_word_final = case_ignorable_then_cased(from[..i].chars().rev()) + && !case_ignorable_then_cased(from[i + 2..].chars()); to.push_str(if is_word_final { "ς" } else { "σ" }); } - fn case_ignoreable_then_cased>(iter: I) -> bool { + fn case_ignorable_then_cased>(iter: I) -> bool { use core::unicode::{Case_Ignorable, Cased}; match iter.skip_while(|&c| Case_Ignorable(c)).next() { Some(c) => Cased(c), diff --git a/library/alloc/src/vec/in_place_collect.rs b/library/alloc/src/vec/in_place_collect.rs index 87d61deb1eb2f..2f1ee8b03533d 100644 --- a/library/alloc/src/vec/in_place_collect.rs +++ b/library/alloc/src/vec/in_place_collect.rs @@ -201,7 +201,7 @@ where // // Note: This access to the source wouldn't be allowed by the TrustedRandomIteratorNoCoerce // contract (used by SpecInPlaceCollect below). But see the "O(1) collect" section in the - // module documenttation why this is ok anyway. + // module documentation why this is ok anyway. let dst_guard = InPlaceDstBufDrop { ptr: dst_buf, len, cap }; src.forget_allocation_drop_remaining(); mem::forget(dst_guard); diff --git a/library/alloc/tests/slice.rs b/library/alloc/tests/slice.rs index 0693beb48c402..a2587b919a44a 100644 --- a/library/alloc/tests/slice.rs +++ b/library/alloc/tests/slice.rs @@ -978,7 +978,7 @@ fn test_chunksator_0() { } #[test] -fn test_chunks_exactator() { +fn test_chunks_extractor() { let v = &[1, 2, 3, 4, 5]; assert_eq!(v.chunks_exact(2).len(), 2); @@ -996,7 +996,7 @@ fn test_chunks_exactator() { #[test] #[should_panic] -fn test_chunks_exactator_0() { +fn test_chunks_extractor_0() { let v = &[1, 2, 3, 4]; let _it = v.chunks_exact(0); } @@ -1026,7 +1026,7 @@ fn test_rchunksator_0() { } #[test] -fn test_rchunks_exactator() { +fn test_rchunks_extractor() { let v = &[1, 2, 3, 4, 5]; assert_eq!(v.rchunks_exact(2).len(), 2); @@ -1044,7 +1044,7 @@ fn test_rchunks_exactator() { #[test] #[should_panic] -fn test_rchunks_exactator_0() { +fn test_rchunks_extractor_0() { let v = &[1, 2, 3, 4]; let _it = v.rchunks_exact(0); } diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 3ee16f04e92f5..cc4c1f1272865 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -2470,7 +2470,7 @@ fn test_vec_dedup_panicking() { // Regression test for issue #82533 #[test] -fn test_extend_from_within_panicing_clone() { +fn test_extend_from_within_panicking_clone() { struct Panic<'dc> { drop_count: &'dc AtomicU32, aaaaa: bool, diff --git a/library/core/src/fmt/builders.rs b/library/core/src/fmt/builders.rs index 7da49b04aaae9..d1c6b67b27881 100644 --- a/library/core/src/fmt/builders.rs +++ b/library/core/src/fmt/builders.rs @@ -109,14 +109,14 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> { /// .field("bar", &self.bar) // We add `bar` field. /// .field("another", &self.another) // We add `another` field. /// // We even add a field which doesn't exist (because why not?). - /// .field("not_existing_field", &1) + /// .field("nonexistent_field", &1) /// .finish() // We're good to go! /// } /// } /// /// assert_eq!( /// format!("{:?}", Bar { bar: 10, another: "Hello World".to_string() }), - /// "Bar { bar: 10, another: \"Hello World\", not_existing_field: 1 }", + /// "Bar { bar: 10, another: \"Hello World\", nonexistent_field: 1 }", /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index a7c100e1b23ed..70c637e14f1d0 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2460,7 +2460,7 @@ extern "rust-intrinsic" { /// This macro should be called as `assert_unsafe_precondition!([Generics](name: Type) => Expression)` /// where the names specified will be moved into the macro as captured variables, and defines an item /// to call `const_eval_select` on. The tokens inside the square brackets are used to denote generics -/// for the function declaractions and can be omitted if there is no generics. +/// for the function declarations and can be omitted if there is no generics. /// /// # Safety /// @@ -2717,7 +2717,7 @@ pub const unsafe fn copy(src: *const T, dst: *mut T, count: usize) { // SAFETY: the safety contract for `copy` must be upheld by the caller. unsafe { assert_unsafe_precondition!( - "ptr::copy requires that both pointer arguments are aligned aligned and non-null", + "ptr::copy requires that both pointer arguments are aligned and non-null", [T](src: *const T, dst: *mut T) => is_aligned_and_not_null(src) && is_aligned_and_not_null(dst) ); diff --git a/library/core/src/macros/panic.md b/library/core/src/macros/panic.md index 98fb7e9e41d7a..8b549e187ba81 100644 --- a/library/core/src/macros/panic.md +++ b/library/core/src/macros/panic.md @@ -42,7 +42,7 @@ the successful result of some computation, `Ok(T)`, or error types that represent an anticipated runtime failure mode of that computation, `Err(E)`. `Result` is used alongside user defined types which represent the various anticipated runtime failure modes that the associated computation could -encounter. `Result` must be propagated manually, often with the the help of the +encounter. `Result` must be propagated manually, often with the help of the `?` operator and `Try` trait, and they must be reported manually, often with the help of the `Error` trait. diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 839afc57f85d2..ae366f0464531 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -264,7 +264,7 @@ impl *const T { let dest_addr = addr as isize; let offset = dest_addr.wrapping_sub(self_addr); - // This is the canonical desugarring of this operation + // This is the canonical desugaring of this operation self.wrapping_byte_offset(offset) } diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 818f1a919d0d5..5e5151c7395a1 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -2121,7 +2121,7 @@ mod new_fn_ptr_impl { /// assert_eq!(unsafe { raw_f2.read_unaligned() }, 2); /// ``` /// -/// See [`addr_of_mut`] for how to create a pointer to unininitialized data. +/// See [`addr_of_mut`] for how to create a pointer to uninitialized data. /// Doing that with `addr_of` would not make much sense since one could only /// read the data, and that would be Undefined Behavior. #[stable(feature = "raw_ref_macros", since = "1.51.0")] diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index ece5244e9a99c..9a53b3c01c37a 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -270,7 +270,7 @@ impl *mut T { let dest_addr = addr as isize; let offset = dest_addr.wrapping_sub(self_addr); - // This is the canonical desugarring of this operation + // This is the canonical desugaring of this operation self.wrapping_byte_offset(offset) } diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index f541808a61836..238889762826c 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -4458,7 +4458,7 @@ impl SlicePattern for [T; N] { /// This will do `binomial(N + 1, 2) = N * (N + 1) / 2 = 0, 1, 3, 6, 10, ..` /// comparison operations. fn get_many_check_valid(indices: &[usize; N], len: usize) -> bool { - // NB: The optimzer should inline the loops into a sequence + // NB: The optimizer should inline the loops into a sequence // of instructions without additional branching. let mut valid = true; for (i, &idx) in indices.iter().enumerate() { diff --git a/library/core/tests/asserting.rs b/library/core/tests/asserting.rs index 4b626ba6f2d5d..1d9670886eb3d 100644 --- a/library/core/tests/asserting.rs +++ b/library/core/tests/asserting.rs @@ -24,7 +24,7 @@ struct NoCopyNoDebug; struct NoDebug; test!( - capture_with_non_copyable_and_non_debugabble_elem_has_correct_params, + capture_with_non_copyable_and_non_debuggable_elem_has_correct_params, NoCopyNoDebug, None, "N/A" @@ -32,6 +32,6 @@ test!( test!(capture_with_non_copyable_elem_has_correct_params, NoCopy, None, "N/A"); -test!(capture_with_non_debugabble_elem_has_correct_params, NoDebug, None, "N/A"); +test!(capture_with_non_debuggable_elem_has_correct_params, NoDebug, None, "N/A"); -test!(capture_with_copyable_and_debugabble_elem_has_correct_params, 1i32, Some(1i32), "1"); +test!(capture_with_copyable_and_debuggable_elem_has_correct_params, 1i32, Some(1i32), "1"); diff --git a/library/core/tests/lazy.rs b/library/core/tests/lazy.rs index c7c3c479b71db..ea8fac0353843 100644 --- a/library/core/tests/lazy.rs +++ b/library/core/tests/lazy.rs @@ -10,7 +10,7 @@ fn once_cell() { c.get_or_init(|| 92); assert_eq!(c.get(), Some(&92)); - c.get_or_init(|| panic!("Kabom!")); + c.get_or_init(|| panic!("Kaboom!")); assert_eq!(c.get(), Some(&92)); } diff --git a/library/core/tests/num/mod.rs b/library/core/tests/num/mod.rs index c79e909e41db8..3e1f848ccfec2 100644 --- a/library/core/tests/num/mod.rs +++ b/library/core/tests/num/mod.rs @@ -170,7 +170,7 @@ fn test_can_not_overflow() { for base in 2..=36 { let num = (<$t>::MAX as u128) + 1; - // Calcutate the string length for the smallest overflowing number: + // Calculate the string length for the smallest overflowing number: let max_len_string = format_radix(num, base as u128); // Ensure that string length is deemed to potentially overflow: assert!(can_overflow::<$t>(base, &max_len_string)); diff --git a/library/std/src/io/buffered/tests.rs b/library/std/src/io/buffered/tests.rs index 4c1b7d57684dd..dda93998fef7f 100644 --- a/library/std/src/io/buffered/tests.rs +++ b/library/std/src/io/buffered/tests.rs @@ -832,7 +832,7 @@ fn partial_line_buffered_after_line_write() { } /// Test that, given a partial line that exceeds the length of -/// LineBuffer's buffer (that is, without a trailing newline), that that +/// LineBuffer's buffer (that is, without a trailing newline), that /// line is written to the inner writer #[test] fn long_line_flushed() { @@ -844,7 +844,7 @@ fn long_line_flushed() { } /// Test that, given a very long partial line *after* successfully -/// flushing a complete line, that that line is buffered unconditionally, +/// flushing a complete line, that line is buffered unconditionally, /// and no additional writes take place. This assures the property that /// `write` should make at-most-one attempt to write new data. #[test] diff --git a/library/std/src/io/readbuf/tests.rs b/library/std/src/io/readbuf/tests.rs index cc1b423f2dd0d..89a2f6b2271bd 100644 --- a/library/std/src/io/readbuf/tests.rs +++ b/library/std/src/io/readbuf/tests.rs @@ -36,7 +36,7 @@ fn initialize_unfilled() { } #[test] -fn addvance_filled() { +fn advance_filled() { let buf: &mut [_] = &mut [0; 16]; let mut rbuf: BorrowedBuf<'_> = buf.into(); diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs index 43842bee992a7..be6dc7768af94 100644 --- a/library/std/src/keyword_docs.rs +++ b/library/std/src/keyword_docs.rs @@ -1925,7 +1925,7 @@ mod type_keyword {} /// `unsafe_op_in_unsafe_fn` lint can be enabled to warn against that and require explicit unsafe /// blocks even inside `unsafe fn`. /// -/// See the [Rustnomicon] and the [Reference] for more information. +/// See the [Rustonomicon] and the [Reference] for more information. /// /// # Examples /// @@ -2129,7 +2129,7 @@ mod type_keyword {} /// [`impl`]: keyword.impl.html /// [raw pointers]: ../reference/types/pointer.html /// [memory safety]: ../book/ch19-01-unsafe-rust.html -/// [Rustnomicon]: ../nomicon/index.html +/// [Rustonomicon]: ../nomicon/index.html /// [nomicon-soundness]: ../nomicon/safe-unsafe-meaning.html /// [soundness]: https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library /// [Reference]: ../reference/unsafety.html diff --git a/library/std/src/os/windows/io/handle.rs b/library/std/src/os/windows/io/handle.rs index f6622874625fc..11948cecad853 100644 --- a/library/std/src/os/windows/io/handle.rs +++ b/library/std/src/os/windows/io/handle.rs @@ -450,7 +450,7 @@ impl AsHandle for OwnedHandle { #[inline] fn as_handle(&self) -> BorrowedHandle<'_> { // Safety: `OwnedHandle` and `BorrowedHandle` have the same validity - // invariants, and the `BorrowdHandle` is bounded by the lifetime + // invariants, and the `BorrowedHandle` is bounded by the lifetime // of `&self`. unsafe { BorrowedHandle::borrow_raw(self.as_raw_handle()) } } diff --git a/library/std/src/os/windows/io/socket.rs b/library/std/src/os/windows/io/socket.rs index 5c1634084a055..b6bd0f9e12bd4 100644 --- a/library/std/src/os/windows/io/socket.rs +++ b/library/std/src/os/windows/io/socket.rs @@ -260,7 +260,7 @@ impl AsSocket for OwnedSocket { #[inline] fn as_socket(&self) -> BorrowedSocket<'_> { // Safety: `OwnedSocket` and `BorrowedSocket` have the same validity - // invariants, and the `BorrowdSocket` is bounded by the lifetime + // invariants, and the `BorrowedSocket` is bounded by the lifetime // of `&self`. unsafe { BorrowedSocket::borrow_raw(self.as_raw_socket()) } } diff --git a/library/std/src/sync/once_lock/tests.rs b/library/std/src/sync/once_lock/tests.rs index 46695225b9f5a..d5d32e73d8880 100644 --- a/library/std/src/sync/once_lock/tests.rs +++ b/library/std/src/sync/once_lock/tests.rs @@ -24,7 +24,7 @@ fn sync_once_cell() { assert_eq!(ONCE_CELL.get(), Some(&92)); }); - ONCE_CELL.get_or_init(|| panic!("Kabom!")); + ONCE_CELL.get_or_init(|| panic!("Kaboom!")); assert_eq!(ONCE_CELL.get(), Some(&92)); } diff --git a/library/std/src/sync/remutex.rs b/library/std/src/sync/remutex.rs index 519ec2c32bd5d..0ced48d10b7c6 100644 --- a/library/std/src/sync/remutex.rs +++ b/library/std/src/sync/remutex.rs @@ -7,7 +7,7 @@ use crate::panic::{RefUnwindSafe, UnwindSafe}; use crate::sync::atomic::{AtomicUsize, Ordering::Relaxed}; use crate::sys::locks as sys; -/// A re-entrant mutual exclusion +/// A reentrant mutual exclusion /// /// This mutex will block *other* threads waiting for the lock to become /// available. The thread which has already locked the mutex can lock it diff --git a/library/std/src/sys/itron/error.rs b/library/std/src/sys/itron/error.rs index 830c60d329e4e..a0b69a394b53a 100644 --- a/library/std/src/sys/itron/error.rs +++ b/library/std/src/sys/itron/error.rs @@ -61,7 +61,7 @@ pub fn error_name(er: abi::ER) -> Option<&'static str> { abi::E_NOMEM => Some("insufficient memory"), abi::E_NOID => Some("no ID number available"), abi::E_OBJ => Some("object state error"), - abi::E_NOEXS => Some("non-existent object"), + abi::E_NOEXS => Some("nonexistent object"), abi::E_QOVR => Some("queue overflow"), abi::E_RLWAI => Some("forced release from waiting"), abi::E_TMOUT => Some("polling failure or timeout"), @@ -98,7 +98,7 @@ pub fn decode_error_kind(er: abi::ER) -> ErrorKind { abi::E_NOMEM => ErrorKind::OutOfMemory, // Some("insufficient memory"), abi::E_NOID => ErrorKind::OutOfMemory, // Some("no ID number available"), // abi::E_OBJ - abi::E_NOEXS => ErrorKind::NotFound, // Some("non-existent object"), + abi::E_NOEXS => ErrorKind::NotFound, // Some("nonexistent object"), // abi::E_QOVR abi::E_RLWAI => ErrorKind::Interrupted, // Some("forced release from waiting"), abi::E_TMOUT => ErrorKind::TimedOut, // Some("polling failure or timeout"), diff --git a/library/std/src/sys/sgx/abi/entry.S b/library/std/src/sys/sgx/abi/entry.S index f61bcf06f0815..ca79d1d796e9a 100644 --- a/library/std/src/sys/sgx/abi/entry.S +++ b/library/std/src/sys/sgx/abi/entry.S @@ -58,7 +58,7 @@ IMAGE_BASE: globvar DEBUG 1 /* The base address (relative to enclave start) of the enclave text section */ globvar TEXT_BASE 8 - /* The size in bytes of enclacve text section */ + /* The size in bytes of enclave text section */ globvar TEXT_SIZE 8 /* The base address (relative to enclave start) of the enclave .eh_frame_hdr section */ globvar EH_FRM_HDR_OFFSET 8 @@ -66,7 +66,7 @@ IMAGE_BASE: globvar EH_FRM_HDR_LEN 8 /* The base address (relative to enclave start) of the enclave .eh_frame section */ globvar EH_FRM_OFFSET 8 - /* The size in bytes of enclacve .eh_frame section */ + /* The size in bytes of enclave .eh_frame section */ globvar EH_FRM_LEN 8 .org .Lxsave_clear+512 diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index ceaff59668460..612d43fe20414 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -735,7 +735,7 @@ impl ExitStatus { // true on all actual versions of Unix, is widely assumed, and is specified in SuS // https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not // true for a platform pretending to be Unix, the tests (our doctests, and also - // procsss_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too. + // process_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too. match NonZero_c_int::try_from(self.0) { /* was nonzero */ Ok(failure) => Err(ExitStatusError(failure)), /* was zero, couldn't convert */ Err(_) => Ok(()), diff --git a/library/std/src/sys/unix/process/process_vxworks.rs b/library/std/src/sys/unix/process/process_vxworks.rs index 569a4b149125d..c40e7ada03cbd 100644 --- a/library/std/src/sys/unix/process/process_vxworks.rs +++ b/library/std/src/sys/unix/process/process_vxworks.rs @@ -199,7 +199,7 @@ impl ExitStatus { // true on all actual versions of Unix, is widely assumed, and is specified in SuS // https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not // true for a platform pretending to be Unix, the tests (our doctests, and also - // procsss_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too. + // process_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too. match NonZero_c_int::try_from(self.0) { Ok(failure) => Err(ExitStatusError(failure)), Err(_) => Ok(()), diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 13b845b25c92d..40e8e5a629e19 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -494,7 +494,7 @@ impl Builder { MaybeDangling(mem::MaybeUninit::new(x)) } fn into_inner(self) -> T { - // SAFETY: we are always initiailized. + // SAFETY: we are always initialized. let ret = unsafe { self.0.assume_init_read() }; // Make sure we don't drop. mem::forget(self); @@ -503,7 +503,7 @@ impl Builder { } impl Drop for MaybeDangling { fn drop(&mut self) { - // SAFETY: we are always initiailized. + // SAFETY: we are always initialized. unsafe { self.0.assume_init_drop() }; } } diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 025145244c491..a0b492ac3423a 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -575,7 +575,7 @@ def fix_bin_or_dylib(self, fname): ] patchelf_args = ["--set-rpath", ":".join(rpath_entries)] if not fname.endswith(".so"): - # Finally, set the corret .interp for binaries + # Finally, set the correct .interp for binaries with open("{}/nix-support/dynamic-linker".format(nix_deps_dir)) as dynamic_linker: patchelf_args += ["--set-interpreter", dynamic_linker.read().rstrip()] diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index e959ea06f8b69..6fd9eb7a74f16 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1384,7 +1384,7 @@ impl<'a> Builder<'a> { // Add extra cfg not defined in/by rustc // - // Note: Altrough it would seems that "-Zunstable-options" to `rustflags` is useless as + // Note: Although it would seems that "-Zunstable-options" to `rustflags` is useless as // cargo would implicitly add it, it was discover that sometimes bootstrap only use // `rustflags` without `cargo` making it required. rustflags.arg("-Zunstable-options"); diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index c3e3fa009a677..87018574048a0 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -22,7 +22,7 @@ pub enum GitInfo { /// If the info should be used (`omit_git_hash` is false), this will be /// `Some`, otherwise it will be `None`. Present(Option), - /// This is not a git repostory, but the info can be fetched from the + /// This is not a git repository, but the info can be fetched from the /// `git-commit-info` file. RecordedForTarball(Info), } diff --git a/src/bootstrap/llvm.rs b/src/bootstrap/llvm.rs index a893c3a47c9fd..cfc7418631368 100644 --- a/src/bootstrap/llvm.rs +++ b/src/bootstrap/llvm.rs @@ -1153,7 +1153,7 @@ impl Step for Libunwind { run.builder.ensure(Libunwind { target: run.target }); } - /// Build linunwind.a + /// Build libunwind.a fn run(self, builder: &Builder<'_>) -> Self::Output { builder.update_submodule(&Path::new("src/llvm-project")); diff --git a/src/bootstrap/render_tests.rs b/src/bootstrap/render_tests.rs index 19019ad2c089d..59fdfda71fff8 100644 --- a/src/bootstrap/render_tests.rs +++ b/src/bootstrap/render_tests.rs @@ -1,7 +1,7 @@ //! This module renders the JSON output of libtest into a human-readable form, trying to be as //! similar to libtest's native output as possible. //! -//! This is needed because we need to use libtest in JSON mode to extract granluar information +//! This is needed because we need to use libtest in JSON mode to extract granular information //! about the executed tests. Doing so suppresses the human-readable output, and (compared to Cargo //! and rustc) libtest doesn't include the rendered human-readable output as a JSON field. We had //! to reimplement all the rendering logic in this module because of that. diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 8a40b0f64f4b6..140259b02135f 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -100,7 +100,7 @@ pub fn check(build: &mut Build) { Couldn't find required command: cmake You should install cmake, or set `download-ci-llvm = true` in the -`[llvm]` section section of `config.toml` to download LLVM rather +`[llvm]` section of `config.toml` to download LLVM rather than building it. " ); diff --git a/src/ci/docker/README.md b/src/ci/docker/README.md index ea236bee56302..9f7259f883a59 100644 --- a/src/ci/docker/README.md +++ b/src/ci/docker/README.md @@ -211,7 +211,7 @@ For targets: `armv7-unknown-linux-gnueabihf` (\*) These options have been selected to match the configuration of the arm toolchains shipped with Ubuntu 15.10 (+) These options have been selected to match the gcc flags we use to compile C - libraries like jemalloc. See the mk/cfg/arm(v7)-uknown-linux-gnueabi{,hf}.mk + libraries like jemalloc. See the mk/cfg/arm(v7)-unknown-linux-gnueabi{,hf}.mk file in Rust's source code. ### `aarch64-linux-gnu.config` diff --git a/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch b/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch index 08d0c5b2cac1e..4437a870b207e 100644 --- a/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch +++ b/src/ci/docker/host-x86_64/disabled/riscv64gc-linux/0001-Remove-stime-function-calls.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove stime() function calls stime() has been deprecated in glibc 2.31 and replaced with clock_settime(). Let's replace the stime() function calls with -clock_settime() in preperation. +clock_settime() in preparation. function old new delta rdate_main 197 224 +27 diff --git a/src/ci/docker/host-x86_64/dist-mips-linux/mips-linux-gnu.config b/src/ci/docker/host-x86_64/dist-mips-linux/mips-linux-gnu.config index 575584ef0cf66..5bfbbae206b41 100644 --- a/src/ci/docker/host-x86_64/dist-mips-linux/mips-linux-gnu.config +++ b/src/ci/docker/host-x86_64/dist-mips-linux/mips-linux-gnu.config @@ -528,7 +528,7 @@ CT_CC_GCC_DEC_FLOAT_AUTO=y CT_CC_GCC_HAS_ARCH_OPTIONS=y # -# archictecture-specific options +# architecture-specific options # CT_CC_GCC_mips_llsc=m CT_CC_GCC_mips_synci=m diff --git a/src/ci/docker/host-x86_64/dist-mips64-linux/mips64-linux-gnu.config b/src/ci/docker/host-x86_64/dist-mips64-linux/mips64-linux-gnu.config index 4b1efe24aed8a..c28d655427e3c 100644 --- a/src/ci/docker/host-x86_64/dist-mips64-linux/mips64-linux-gnu.config +++ b/src/ci/docker/host-x86_64/dist-mips64-linux/mips64-linux-gnu.config @@ -529,7 +529,7 @@ CT_CC_GCC_DEC_FLOAT_AUTO=y CT_CC_GCC_HAS_ARCH_OPTIONS=y # -# archictecture-specific options +# architecture-specific options # CT_CC_GCC_mips_llsc=m CT_CC_GCC_mips_synci=m diff --git a/src/ci/docker/host-x86_64/dist-mips64el-linux/mips64el-linux-gnu.config b/src/ci/docker/host-x86_64/dist-mips64el-linux/mips64el-linux-gnu.config index baff944cf972a..50dfe7b2dd1a6 100644 --- a/src/ci/docker/host-x86_64/dist-mips64el-linux/mips64el-linux-gnu.config +++ b/src/ci/docker/host-x86_64/dist-mips64el-linux/mips64el-linux-gnu.config @@ -529,7 +529,7 @@ CT_CC_GCC_DEC_FLOAT_AUTO=y CT_CC_GCC_HAS_ARCH_OPTIONS=y # -# archictecture-specific options +# architecture-specific options # CT_CC_GCC_mips_llsc=m CT_CC_GCC_mips_synci=m diff --git a/src/ci/docker/host-x86_64/dist-mipsel-linux/mipsel-linux-gnu.config b/src/ci/docker/host-x86_64/dist-mipsel-linux/mipsel-linux-gnu.config index adb2da7ddeedd..3566c7c8593e2 100644 --- a/src/ci/docker/host-x86_64/dist-mipsel-linux/mipsel-linux-gnu.config +++ b/src/ci/docker/host-x86_64/dist-mipsel-linux/mipsel-linux-gnu.config @@ -528,7 +528,7 @@ CT_CC_GCC_DEC_FLOAT_AUTO=y CT_CC_GCC_HAS_ARCH_OPTIONS=y # -# archictecture-specific options +# architecture-specific options # CT_CC_GCC_mips_llsc=m CT_CC_GCC_mips_synci=m diff --git a/src/ci/docker/host-x86_64/mingw-check/validate-toolstate.sh b/src/ci/docker/host-x86_64/mingw-check/validate-toolstate.sh index 0b06f5e3623e3..a5691da8cda2d 100755 --- a/src/ci/docker/host-x86_64/mingw-check/validate-toolstate.sh +++ b/src/ci/docker/host-x86_64/mingw-check/validate-toolstate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# A quick smoke test to make sure publish_tooolstate.py works. +# A quick smoke test to make sure publish_toolstate.py works. set -euo pipefail IFS=$'\n\t' diff --git a/src/ci/docker/scripts/qemu-bare-bones-rcS b/src/ci/docker/scripts/qemu-bare-bones-rcS index 3c29bedc13c99..c5d807b2d7d90 100644 --- a/src/ci/docker/scripts/qemu-bare-bones-rcS +++ b/src/ci/docker/scripts/qemu-bare-bones-rcS @@ -9,7 +9,7 @@ mount -t sysfs none /sys /addentropy < /addentropy cat /dev/urandom | head -n 2048 | /addentropy -# Set up IP that qemu expects. This confgures eth0 with the public IP that QEMU +# Set up IP that qemu expects. This configures eth0 with the public IP that QEMU # will communicate to as well as the loopback 127.0.0.1 address. ifconfig eth0 10.0.2.15 ifconfig lo up diff --git a/src/doc/rustc/src/instrument-coverage.md b/src/doc/rustc/src/instrument-coverage.md index b0b2f4196422b..2535cd4f12cec 100644 --- a/src/doc/rustc/src/instrument-coverage.md +++ b/src/doc/rustc/src/instrument-coverage.md @@ -117,7 +117,7 @@ $ ls formatjson5.profraw formatjson5.profraw ``` -If `LLVM_PROFILE_FILE` contains a path to a non-existent directory, the missing directory structure will be created. Additionally, the following special pattern strings are rewritten: +If `LLVM_PROFILE_FILE` contains a path to a nonexistent directory, the missing directory structure will be created. Additionally, the following special pattern strings are rewritten: - `%p` - The process ID. - `%h` - The hostname of the machine running the program. diff --git a/src/doc/rustc/src/json.md b/src/doc/rustc/src/json.md index d8843280b844f..11d7b5b59381b 100644 --- a/src/doc/rustc/src/json.md +++ b/src/doc/rustc/src/json.md @@ -61,7 +61,7 @@ Diagnostics have the following format: /* The file where the span is located. Note that this path may not exist. For example, if the path points to the standard library, and the rust src is not - available in the sysroot, then it may point to a non-existent + available in the sysroot, then it may point to a nonexistent file. Beware that this may also point to the source of an external crate. */ diff --git a/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md b/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md index 09e03e4dc6f98..e351ea0013003 100644 --- a/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md +++ b/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md @@ -66,7 +66,7 @@ After completing these steps you can use rust normally in a native environment. To cross compile, you'll need to: -* Build the rust cross toochain using [rust-bootstrap-armv7-unknown-linux-uclibceabi](https://github.com/lancethepants/rust-bootstrap-armv7-unknown-linux-uclibceabi) or your own built toolchain. +* Build the rust cross toolchain using [rust-bootstrap-armv7-unknown-linux-uclibceabi](https://github.com/lancethepants/rust-bootstrap-armv7-unknown-linux-uclibceabi) or your own built toolchain. * Link your built toolchain with ```text diff --git a/src/doc/rustc/src/platform-support/unknown-uefi.md b/src/doc/rustc/src/platform-support/unknown-uefi.md index e2bdf73a92990..03fa284620e4c 100644 --- a/src/doc/rustc/src/platform-support/unknown-uefi.md +++ b/src/doc/rustc/src/platform-support/unknown-uefi.md @@ -123,7 +123,7 @@ There are 3 common ways to compile native C code for UEFI targets: targets. Be wary of any includes that are not specifically suitable for UEFI targets (especially the C standard library includes are not always compatible). Freestanding compilations are recommended to avoid - incompatibilites. + incompatibilities. ## Ecosystem diff --git a/src/doc/rustdoc/src/how-to-read-rustdoc.md b/src/doc/rustdoc/src/how-to-read-rustdoc.md index 56342f65d9998..393192af01e98 100644 --- a/src/doc/rustdoc/src/how-to-read-rustdoc.md +++ b/src/doc/rustdoc/src/how-to-read-rustdoc.md @@ -43,7 +43,7 @@ including automatic and blanket implementations that `rustdoc` knows about. Subheadings, variants, fields, and many other things in this documentation are anchors and can be clicked on and deep-linked to, which is a great way to communicate exactly what you're talking about. -The typograpical character "§" appears next to lines with anchors on them +The typographical character "§" appears next to lines with anchors on them when hovered or given keyboard focus. ## The Navigation Bar diff --git a/src/doc/rustdoc/src/references.md b/src/doc/rustdoc/src/references.md index 45cf4e88eef6b..2e0cb1c0af4cd 100644 --- a/src/doc/rustdoc/src/references.md +++ b/src/doc/rustdoc/src/references.md @@ -13,15 +13,15 @@ If you know of other great resources, please submit a pull request! ## Community - [API Guidelines] -- [Github tagged RFCs] -- [Github tagged issues] +- [GitHub tagged RFCs] +- [GitHub tagged issues] - [RFC (stalled) front page styleguide] - [Guide on how to write documentation for a Rust crate] [API Guidelines]: https://rust-lang.github.io/api-guidelines/documentation.html -[Github tagged RFCs]: https://github.com/rust-lang/rfcs/issues?q=label%3AT-rustdoc -[Github tagged issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AT-rustdoc +[GitHub tagged RFCs]: https://github.com/rust-lang/rfcs/issues?q=label%3AT-rustdoc +[GitHub tagged issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AT-rustdoc [Guide on how to write documentation for a Rust crate]: https://blog.guillaume-gomez.fr/articles/2020-03-12+Guide+on+how+to+write+documentation+for+a+Rust+crate [Learn Rust]: https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments [RFC 1574: More API Documentation Conventions]: https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html diff --git a/src/doc/style-guide/src/principles.md b/src/doc/style-guide/src/principles.md index 21668973194ed..2d203f264e623 100644 --- a/src/doc/style-guide/src/principles.md +++ b/src/doc/style-guide/src/principles.md @@ -6,7 +6,7 @@ following principles (in rough priority order): * readability - scan-ability - avoiding misleading formatting - - accessibility - readable and editable by users using the the widest + - accessibility - readable and editable by users using the widest variety of hardware, including non-visual accessibility interfaces - readability of code in contexts without syntax highlighting or IDE assistance, such as rustc error messages, diffs, grep, and other diff --git a/src/doc/style-guide/src/types.md b/src/doc/style-guide/src/types.md index 25861ddabb8d0..ae456ef21c8d4 100644 --- a/src/doc/style-guide/src/types.md +++ b/src/doc/style-guide/src/types.md @@ -6,7 +6,7 @@ * `[T; expr]`, e.g., `[u32; 42]`, `[Vec; 10 * 2 + foo()]` (space after colon, no spaces around square brackets) * `*const T`, `*mut T` (no space after `*`, space before type) * `&'a T`, `&T`, `&'a mut T`, `&mut T` (no space after `&`, single spaces separating other words) -* `unsafe extern "C" fn<'a, 'b, 'c>(T, U, V) -> W` or `fn()` (single spaces around keyowrds and sigils, and after commas, no trailing commas, no spaces around brackets) +* `unsafe extern "C" fn<'a, 'b, 'c>(T, U, V) -> W` or `fn()` (single spaces around keywords and sigils, and after commas, no trailing commas, no spaces around brackets) * `!` should be treated like any other type name, `Name` * `(A, B, C, D)` (spaces after commas, no spaces around parens, no trailing comma unless it is a one-tuple) * ` as SomeTrait>::Foo::Bar` or `Foo::Bar` or `::Foo::Bar` (no spaces around `::` or angle brackets, single spaces around `as`) diff --git a/src/doc/unstable-book/src/compiler-flags/check-cfg.md b/src/doc/unstable-book/src/compiler-flags/check-cfg.md index 321992f7b0d75..10f0fbc506261 100644 --- a/src/doc/unstable-book/src/compiler-flags/check-cfg.md +++ b/src/doc/unstable-book/src/compiler-flags/check-cfg.md @@ -202,5 +202,5 @@ fn shoot_lasers() {} #[cfg(feature = "monkeys")] // This is UNEXPECTED, because "monkeys" is not in // the values(feature) list -fn write_shakespear() {} +fn write_shakespeare() {} ``` diff --git a/src/doc/unstable-book/src/compiler-flags/move-size-limit.md b/src/doc/unstable-book/src/compiler-flags/move-size-limit.md index 88f022af2ecf2..aea054ba911fe 100644 --- a/src/doc/unstable-book/src/compiler-flags/move-size-limit.md +++ b/src/doc/unstable-book/src/compiler-flags/move-size-limit.md @@ -6,5 +6,5 @@ The `-Zmove-size-limit=N` compiler flag enables `large_assignments` lints which will warn when moving objects whose size exceeds `N` bytes. Lint warns only about moves in functions that participate in code generation. -Consequently it will be ineffective for compiler invocatation that emit +Consequently it will be ineffective for compiler invocation that emit metadata only, i.e., `cargo check` like workflows. diff --git a/src/doc/unstable-book/src/language-features/transparent-unions.md b/src/doc/unstable-book/src/language-features/transparent-unions.md index 9b39b8971644f..bab88b148b266 100644 --- a/src/doc/unstable-book/src/language-features/transparent-unions.md +++ b/src/doc/unstable-book/src/language-features/transparent-unions.md @@ -65,7 +65,7 @@ pub union GenericUnion { // Unions with non-`Copy` fields are unstable. pub const THIS_IS_OKAY: GenericUnion<()> = GenericUnion { field: () }; ``` -Like transarent `struct`s, a transparent `union` of type `U` has the same +Like transparent `struct`s, a transparent `union` of type `U` has the same layout, size, and ABI as its single non-ZST field. If it is generic over a type `T`, and all its fields are ZSTs except for exactly one field of type `T`, then it has the same layout and ABI as `T` (even if `T` is a ZST when monomorphized). diff --git a/src/etc/installer/pkg/Distribution.xml b/src/etc/installer/pkg/Distribution.xml index 1643fc8364b64..395814e7488bf 100644 --- a/src/etc/installer/pkg/Distribution.xml +++ b/src/etc/installer/pkg/Distribution.xml @@ -23,7 +23,7 @@ DefaultSynthteticProvider + # type: (SBValue, dict) -> DefaultSyntheticProvider # logger = Logger.Logger() # logger >> "Default synthetic provider for " + str(valobj.GetName()) self.valobj = valobj diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index cc5d13808b2f5..3f6a5d6d9017a 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -528,7 +528,7 @@ pub(crate) fn build_impl( items: trait_items, polarity, kind: if utils::has_doc_flag(tcx, did, sym::fake_variadic) { - ImplKind::FakeVaradic + ImplKind::FakeVariadic } else { ImplKind::Normal }, diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 5fa0c120fba10..04379c2bca97d 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2356,7 +2356,7 @@ fn clean_impl<'tcx>( items, polarity: tcx.impl_polarity(def_id), kind: if utils::has_doc_flag(tcx, def_id.to_def_id(), sym::fake_variadic) { - ImplKind::FakeVaradic + ImplKind::FakeVariadic } else { ImplKind::Normal }, diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 6d2ce9e2833f4..03129b972f2ec 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -156,7 +156,7 @@ impl ExternalCrate { } /// Attempts to find where an external crate is located, given that we're - /// rendering in to the specified source destination. + /// rendering into the specified source destination. pub(crate) fn location( &self, extern_url: Option<&str>, @@ -751,7 +751,7 @@ pub(crate) enum ItemKind { PrimitiveItem(PrimitiveType), /// A required associated constant in a trait declaration. TyAssocConstItem(Type), - /// An associated associated constant in a trait impl or a provided one in a trait declaration. + /// An associated constant in a trait impl or a provided one in a trait declaration. AssocConstItem(Type, ConstantKind), /// A required associated type in a trait declaration. /// @@ -2305,7 +2305,7 @@ impl Impl { pub(crate) enum ImplKind { Normal, Auto, - FakeVaradic, + FakeVariadic, Blanket(Box), } @@ -2319,7 +2319,7 @@ impl ImplKind { } pub(crate) fn is_fake_variadic(&self) -> bool { - matches!(self, ImplKind::FakeVaradic) + matches!(self, ImplKind::FakeVariadic) } pub(crate) fn as_blanket_ty(&self) -> Option<&Type> { diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 1be4f364eadeb..b579e7f5ae9ca 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -491,7 +491,7 @@ impl Options { // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset // // The original key values we have are the same as the DOM storage API keys and the - // command line options, so contain `-`. Our Javascript needs to be able to look + // command line options, so contain `-`. Our JavaScript needs to be able to look // these values up both in `dataset` and in the storage API, so it needs to be able // to convert the names back and forth. Despite doing this kebab-case to // StudlyCaps transformation automatically, the JS DOM API does not provide a diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index b61dd57145802..946c85a205f5a 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -514,7 +514,7 @@ struct Classifier<'src> { impl<'src> Classifier<'src> { /// Takes as argument the source code to HTML-ify, the rust edition to use and the source code - /// file span which will be used later on by the `span_correspondance_map`. + /// file span which will be used later on by the `span_correspondence_map`. fn new(src: &str, file_span: Span, decoration_info: Option) -> Classifier<'_> { let tokens = PeekIter::new(TokenIter { src, cursor: Cursor::new(src) }); let decorations = decoration_info.map(Decorations::new); @@ -649,7 +649,7 @@ impl<'src> Classifier<'src> { /// /// `before` is the position of the given token in the `source` string and is used as "lo" byte /// in case we want to try to generate a link for this token using the - /// `span_correspondance_map`. + /// `span_correspondence_map`. fn advance( &mut self, token: TokenKind, @@ -895,7 +895,7 @@ fn exit_span(out: &mut impl Write, closing_tag: &str) { /// flexible. /// /// Note that if `context` is not `None` and that the given `klass` contains a `Span`, the function -/// will then try to find this `span` in the `span_correspondance_map`. If found, it'll then +/// will then try to find this `span` in the `span_correspondence_map`. If found, it'll then /// generate a link for this element (which corresponds to where its definition is located). fn string( out: &mut impl Write, @@ -916,7 +916,7 @@ fn string( /// * If `klass` is `Some` but `klass.get_span()` is `None`, it writes the text wrapped in a /// `` with the provided `klass`. /// * If `klass` is `Some` and has a [`rustc_span::Span`], it then tries to generate a link (`` -/// element) by retrieving the link information from the `span_correspondance_map` that was filled +/// element) by retrieving the link information from the `span_correspondence_map` that was filled /// in `span_map.rs::collect_spans_and_sources`. If it cannot retrieve the information, then it's /// the same as the second point (`klass` is `Some` but doesn't have a [`rustc_span::Span`]). fn string_without_closing_tag( @@ -963,7 +963,7 @@ fn string_without_closing_tag( if let Some(href_context) = href_context { if let Some(href) = - href_context.context.shared.span_correspondance_map.get(&def_span).and_then(|href| { + href_context.context.shared.span_correspondence_map.get(&def_span).and_then(|href| { let context = href_context.context; // FIXME: later on, it'd be nice to provide two links (if possible) for all items: // one to the documentation page and one to the source definition. diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 00aadb8e82aeb..4b0aee9c3add9 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -1392,7 +1392,7 @@ static DEFAULT_ID_MAP: Lazy, usize>> = Lazy::new(|| fn init_id_map() -> FxHashMap, usize> { let mut map = FxHashMap::default(); - // This is the list of IDs used in Javascript. + // This is the list of IDs used in JavaScript. map.insert("help".into(), 1); map.insert("settings".into(), 1); map.insert("not-displayed".into(), 1); diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index ac5054ce1b6b5..a063c8c9f02dd 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -122,9 +122,9 @@ pub(crate) struct SharedContext<'tcx> { /// the crate. redirections: Option>>, - /// Correspondance map used to link types used in the source code pages to allow to click on + /// Correspondence map used to link types used in the source code pages to allow to click on /// links to jump to the type's definition. - pub(crate) span_correspondance_map: FxHashMap, + pub(crate) span_correspondence_map: FxHashMap, /// The [`Cache`] used during rendering. pub(crate) cache: Cache, @@ -531,7 +531,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { errors: receiver, redirections: if generate_redirect_map { Some(Default::default()) } else { None }, show_type_layout, - span_correspondance_map: matches, + span_correspondence_map: matches, cache, call_locations, }; @@ -647,7 +647,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { \ \ FormatRenderer<'tcx> for Context<'tcx> { \ ", diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index cd6509607d561..edd046ab77233 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -665,7 +665,7 @@ impl FromWithTcx for Impl { let clean::Impl { unsafety, generics, trait_, for_, items, polarity, kind } = impl_; // FIXME: use something like ImplKind in JSON? let (synthetic, blanket_impl) = match kind { - clean::ImplKind::Normal | clean::ImplKind::FakeVaradic => (false, None), + clean::ImplKind::Normal | clean::ImplKind::FakeVariadic => (false, None), clean::ImplKind::Auto => (true, None), clean::ImplKind::Blanket(ty) => (false, Some(*ty)), }; @@ -740,7 +740,7 @@ impl FromWithTcx for Variant { impl FromWithTcx for Discriminant { fn from_tcx(disr: clean::Discriminant, tcx: TyCtxt<'_>) -> Self { Discriminant { - // expr is only none if going through the inlineing path, which gets + // expr is only none if going through the inlining path, which gets // `rustc_middle` types, not `rustc_hir`, but because JSON never inlines // the expr is always some. expr: disr.expr(tcx).unwrap(), diff --git a/src/librustdoc/scrape_examples.rs b/src/librustdoc/scrape_examples.rs index f28c164d61dad..dfa99ffcb7c7d 100644 --- a/src/librustdoc/scrape_examples.rs +++ b/src/librustdoc/scrape_examples.rs @@ -286,7 +286,7 @@ pub(crate) fn run( let (cx, _) = Context::init(krate, renderopts, cache, tcx).map_err(|e| e.to_string())?; // Collect CrateIds corresponding to provided target crates - // If two different versions of the crate in the dependency tree, then examples will be collcted from both. + // If two different versions of the crate in the dependency tree, then examples will be collected from both. let all_crates = tcx .crates(()) .iter() diff --git a/src/librustdoc/theme/tests.rs b/src/librustdoc/theme/tests.rs index 08a174d27d357..2a28c19c3fe75 100644 --- a/src/librustdoc/theme/tests.rs +++ b/src/librustdoc/theme/tests.rs @@ -13,11 +13,11 @@ rule d // another line comment e {} -rule f/* a multine +rule f/* a multiline comment*/{} -rule g/* another multine +rule g/* another multiline comment*/h diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index d2f494942cf9b..331c0c4bbd362 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -325,7 +325,7 @@ pub struct Config { /// Whether to rerun tests even if the inputs are unchanged. pub force_rerun: bool, - /// Only rerun the tests that result has been modified accoring to Git status + /// Only rerun the tests that result has been modified according to Git status pub only_modified: bool, pub target_cfgs: AtomicLazyCell, diff --git a/src/tools/compiletest/src/header/cfg.rs b/src/tools/compiletest/src/header/cfg.rs index a9694d4d52c88..3eac8ca99ebd8 100644 --- a/src/tools/compiletest/src/header/cfg.rs +++ b/src/tools/compiletest/src/header/cfg.rs @@ -212,7 +212,7 @@ pub(super) fn parse_cfg_name_directive<'a>( } if prefix == "ignore" && outcome == MatchOutcome::Invalid { - // Don't error out for ignore-tidy-* diretives, as those are not handled by compiletest. + // Don't error out for ignore-tidy-* directives, as those are not handled by compiletest. if name.starts_with("tidy-") { outcome = MatchOutcome::External; } diff --git a/src/tools/compiletest/src/header/needs.rs b/src/tools/compiletest/src/header/needs.rs index 35d6179abaa6b..932437c585f02 100644 --- a/src/tools/compiletest/src/header/needs.rs +++ b/src/tools/compiletest/src/header/needs.rs @@ -7,7 +7,7 @@ pub(super) fn handle_needs( config: &Config, ln: &str, ) -> IgnoreDecision { - // Note thet we intentionally still put the needs- prefix here to make the file show up when + // Note that we intentionally still put the needs- prefix here to make the file show up when // grepping for a directive name, even though we could technically strip that. let needs = &[ Need { diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 4a2b9de8aee6b..21ca542ce726e 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -926,7 +926,7 @@ fn is_android_gdb_target(target: &str) -> bool { ) } -/// Returns `true` if the given target is a MSVC target for the purpouses of CDB testing. +/// Returns `true` if the given target is a MSVC target for the purposes of CDB testing. fn is_pc_windows_msvc_target(target: &str) -> bool { target.ends_with("-pc-windows-msvc") } diff --git a/src/tools/compiletest/src/read2.rs b/src/tools/compiletest/src/read2.rs index 725f7a1515c62..3f99f6b4c9b80 100644 --- a/src/tools/compiletest/src/read2.rs +++ b/src/tools/compiletest/src/read2.rs @@ -76,7 +76,7 @@ impl ProcOutput { .count(); *filtered_len -= matches * path_bytes.len(); - // We can't just remove the length of the filtered path from the output lenght, + // We can't just remove the length of the filtered path from the output length, // otherwise a compiler emitting only filtered paths would OOM compiletest. Add // a fixed placeholder length for each path to prevent that. *filtered_len += matches * FILTERED_PATHS_PLACEHOLDER_LEN; diff --git a/src/tools/jsondoclint/src/validator.rs b/src/tools/jsondoclint/src/validator.rs index a1f675a3b40f6..d0c311cb82e7b 100644 --- a/src/tools/jsondoclint/src/validator.rs +++ b/src/tools/jsondoclint/src/validator.rs @@ -21,7 +21,7 @@ const LOCAL_CRATE_ID: u32 = 0; /// it is well formed. This involves calling `check_*` functions on /// fields of that item, and `add_*` functions on [`Id`]s. /// - `add_*`: These add an [`Id`] to the worklist, after validating it to check if -/// the `Id` is a kind expected in this suituation. +/// the `Id` is a kind expected in this situation. #[derive(Debug)] pub struct Validator<'a> { pub(crate) errs: Vec, diff --git a/src/tools/jsondoclint/src/validator/tests.rs b/src/tools/jsondoclint/src/validator/tests.rs index 95a56a9dfac45..067b90de3a69e 100644 --- a/src/tools/jsondoclint/src/validator/tests.rs +++ b/src/tools/jsondoclint/src/validator/tests.rs @@ -141,7 +141,7 @@ fn checks_local_crate_id_is_correct() { Item { id: id("root"), crate_id: LOCAL_CRATE_ID.wrapping_add(1), - name: Some("irrelavent".to_owned()), + name: Some("irrelevant".to_owned()), span: None, visibility: Visibility::Public, docs: None, diff --git a/src/tools/rust-installer/README.md b/src/tools/rust-installer/README.md index 99d8e5ca4cf1c..505ffe4093fcd 100644 --- a/src/tools/rust-installer/README.md +++ b/src/tools/rust-installer/README.md @@ -51,7 +51,7 @@ To combine installers. * Make install.sh not have to be customized, pull it's data from a config file. -* Be more resiliant to installation failures, particularly if the disk +* Be more resilient to installation failures, particularly if the disk is full. * Pre-install and post-uninstall scripts. * Allow components to depend on or contradict other components. diff --git a/src/tools/rustbook/src/main.rs b/src/tools/rustbook/src/main.rs index 1368ec653de11..ac460ca97e54e 100644 --- a/src/tools/rustbook/src/main.rs +++ b/src/tools/rustbook/src/main.rs @@ -39,7 +39,7 @@ fn main() { ) .get_matches(); - // Check which subcomamnd the user ran... + // Check which subcommand the user ran... match matches.subcommand() { Some(("build", sub_matches)) => { if let Err(e) = build(sub_matches) { diff --git a/src/tools/rustdoc-gui/tester.js b/src/tools/rustdoc-gui/tester.js index 72baad606f01e..692d5e3fcef90 100644 --- a/src/tools/rustdoc-gui/tester.js +++ b/src/tools/rustdoc-gui/tester.js @@ -42,7 +42,7 @@ function parseOptions(args) { "executable_path": null, "no_sandbox": false, }; - const correspondances = { + const correspondences = { "--doc-folder": "doc_folder", "--tests-folder": "tests_folder", "--debug": "debug", @@ -73,7 +73,7 @@ function parseOptions(args) { } opts["jobs"] = parseInt(arg_value); } else if (arg !== "--file") { - opts[correspondances[arg]] = arg_value; + opts[correspondences[arg]] = arg_value; } else { opts["files"].push(arg_value); } @@ -82,9 +82,9 @@ function parseOptions(args) { process.exit(0); } else if (arg === "--no-sandbox") { console.log("`--no-sandbox` is being used. Be very careful!"); - opts[correspondances[arg]] = true; - } else if (correspondances[arg]) { - opts[correspondances[arg]] = true; + opts[correspondences[arg]] = true; + } else if (correspondences[arg]) { + opts[correspondences[arg]] = true; } else { console.log("Unknown option `" + arg + "`."); console.log("Use `--help` to see the list of options"); diff --git a/src/tools/rustfmt/tests/source/no_arg_with_comment.rs b/src/tools/rustfmt/tests/source/no_arg_with_comment.rs new file mode 100644 index 0000000000000..41c3c6bea48d0 --- /dev/null +++ b/src/tools/rustfmt/tests/source/no_arg_with_comment.rs @@ -0,0 +1,2 @@ +fn foo( /* comment */ +) {} diff --git a/src/tools/rustfmt/tests/target/no_arg_with_comment.rs b/src/tools/rustfmt/tests/target/no_arg_with_comment.rs new file mode 100644 index 0000000000000..21802d87f47d4 --- /dev/null +++ b/src/tools/rustfmt/tests/target/no_arg_with_comment.rs @@ -0,0 +1 @@ +fn foo(/* comment */) {} diff --git a/src/tools/suggest-tests/src/static_suggestions.rs b/src/tools/suggest-tests/src/static_suggestions.rs index d8166ead8c49d..cb244ad1839bf 100644 --- a/src/tools/suggest-tests/src/static_suggestions.rs +++ b/src/tools/suggest-tests/src/static_suggestions.rs @@ -1,6 +1,6 @@ use crate::{sug, Suggestion}; -// FIXME: perhaps this could use `std::lazy` when it is stablizied +// FIXME: perhaps this could use `std::lazy` when it is stabilized macro_rules! static_suggestions { ($( $glob:expr => [ $( $suggestion:expr ),* ] ),*) => { pub(crate) const STATIC_SUGGESTIONS: ::once_cell::unsync::Lazy)>> diff --git a/src/tools/tidy/src/pal.rs b/src/tools/tidy/src/pal.rs index 6fd41e833624f..f44e43bf284bd 100644 --- a/src/tools/tidy/src/pal.rs +++ b/src/tools/tidy/src/pal.rs @@ -175,14 +175,14 @@ fn parse_cfgs(contents: &str) -> Vec<(usize, &str)> { let contents_after = &contents[*i..]; let first_paren = contents_after.find('('); let paren_idx = first_paren.map(|ip| i + ip); - let preceeds_whitespace_and_paren = paren_idx + let precedes_whitespace_and_paren = paren_idx .map(|ip| { let maybe_space = &contents[*i + "cfg".len()..ip]; maybe_space.chars().all(|c| char::is_whitespace(c) || c == '!') }) .unwrap_or(false); - succeeds_non_ident && preceeds_whitespace_and_paren + succeeds_non_ident && precedes_whitespace_and_paren }); cfgs.flat_map(|i| { diff --git a/tests/assembly/nvptx-safe-naming.rs b/tests/assembly/nvptx-safe-naming.rs index 80bb04fc0f2fb..1b9186257eca5 100644 --- a/tests/assembly/nvptx-safe-naming.rs +++ b/tests/assembly/nvptx-safe-naming.rs @@ -9,7 +9,7 @@ // aux-build: breakpoint-panic-handler.rs extern crate breakpoint_panic_handler; -// Verify function name doesn't contain unacceaptable characters. +// Verify function name doesn't contain unacceptable characters. // CHECK: .func (.param .b32 func_retval0) [[IMPL_FN:[a-zA-Z0-9$_]+square[a-zA-Z0-9$_]+]]( // CHECK-LABEL: .visible .entry top_kernel( diff --git a/tests/codegen/debug-column.rs b/tests/codegen/debug-column.rs index e61642b8e1be2..488b0581a65a3 100644 --- a/tests/codegen/debug-column.rs +++ b/tests/codegen/debug-column.rs @@ -9,7 +9,7 @@ fn main() { // CHECK: call void @giraffe(), !dbg [[A:!.*]] giraffe(); - // Column numbers use byte offests. Regression test for #67360 + // Column numbers use byte offsets. Regression test for #67360 // CHECK: call void @turtle(), !dbg [[B:!.*]] /* ż */ turtle(); diff --git a/tests/codegen/issues/issue-73338-effecient-cmp.rs b/tests/codegen/issues/issue-73338-efficient-cmp.rs similarity index 100% rename from tests/codegen/issues/issue-73338-effecient-cmp.rs rename to tests/codegen/issues/issue-73338-efficient-cmp.rs diff --git a/tests/codegen/repr-transparent.rs b/tests/codegen/repr-transparent.rs index 311cbfbaa0937..e2e6cb4d37e5a 100644 --- a/tests/codegen/repr-transparent.rs +++ b/tests/codegen/repr-transparent.rs @@ -68,7 +68,7 @@ pub struct LifetimePhantom<'a, T: 'a>(*const T, PhantomData<&'a T>); #[no_mangle] pub extern "C" fn test_LifetimePhantom(_: LifetimePhantom) -> LifetimePhantom { loop {} } -// This works despite current alignment resrictions because PhantomData is always align(1) +// This works despite current alignment restrictions because PhantomData is always align(1) #[repr(transparent)] pub struct UnitPhantom { val: T, unit: PhantomData } diff --git a/tests/codegen/sanitizer-memory-track-orgins.rs b/tests/codegen/sanitizer-memory-track-origins.rs similarity index 100% rename from tests/codegen/sanitizer-memory-track-orgins.rs rename to tests/codegen/sanitizer-memory-track-origins.rs diff --git a/tests/debuginfo/thread.rs b/tests/debuginfo/thread.rs index 388d50c5cdc43..e7e83c7aacd47 100644 --- a/tests/debuginfo/thread.rs +++ b/tests/debuginfo/thread.rs @@ -1,4 +1,4 @@ -// Testing the the display of JoinHandle and Thread in cdb. +// Testing the display of JoinHandle and Thread in cdb. // cdb-only // min-cdb-version: 10.0.18317.1001 diff --git a/tests/debuginfo/var-captured-in-sendable-closure.rs b/tests/debuginfo/var-captured-in-sendable-closure.rs index 39930e04e4c5f..582f68a287c6d 100644 --- a/tests/debuginfo/var-captured-in-sendable-closure.rs +++ b/tests/debuginfo/var-captured-in-sendable-closure.rs @@ -66,12 +66,12 @@ fn main() { // The `self` argument of the following closure should be passed by value // to FnOnce::call_once(self, args), which gets codegened a bit differently // than the regular case. Let's make sure this is supported too. - let immedate_env = move || { + let immediate_env = move || { zzz(); // #break return constant2; }; - immedate_env(); + immediate_env(); } fn do_something(_: &isize, _:&isize, _:&isize) { diff --git a/tests/incremental/hashes/trait_defs.rs b/tests/incremental/hashes/trait_defs.rs index b583bee2f2449..f596909dc3c21 100644 --- a/tests/incremental/hashes/trait_defs.rs +++ b/tests/incremental/hashes/trait_defs.rs @@ -926,14 +926,14 @@ trait TraitAddSuperTrait : ReferencedTrait0 { } // Add builtin bound (Send or Copy) #[cfg(any(cfail1,cfail4))] -trait TraitAddBuiltiBound { } +trait TraitAddBuiltinBound { } #[cfg(not(any(cfail1,cfail4)))] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")] #[rustc_clean(cfg="cfail3")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail5")] #[rustc_clean(cfg="cfail6")] -trait TraitAddBuiltiBound : Send { } +trait TraitAddBuiltinBound : Send { } diff --git a/tests/incremental/issue-92987-provisional-dep-node.rs b/tests/incremental/issue-92987-provisional-dep-node.rs index a48a8373c2b59..786301bd0b2e1 100644 --- a/tests/incremental/issue-92987-provisional-dep-node.rs +++ b/tests/incremental/issue-92987-provisional-dep-node.rs @@ -2,7 +2,7 @@ // Regression test for issue #92987 // Tests that we properly manage `DepNode`s during trait evaluation -// involing an auto-trait cycle. +// involving an auto-trait cycle. #[cfg(rpass1)] struct CycleOne(Box); diff --git a/tests/incremental/static_refering_to_other_static/issue-49081.rs b/tests/incremental/static_referring_to_other_static/issue-49081.rs similarity index 100% rename from tests/incremental/static_refering_to_other_static/issue-49081.rs rename to tests/incremental/static_referring_to_other_static/issue-49081.rs diff --git a/tests/incremental/static_refering_to_other_static2/issue.rs b/tests/incremental/static_referring_to_other_static2/issue.rs similarity index 100% rename from tests/incremental/static_refering_to_other_static2/issue.rs rename to tests/incremental/static_referring_to_other_static2/issue.rs diff --git a/tests/incremental/static_refering_to_other_static3/issue.rs b/tests/incremental/static_referring_to_other_static3/issue.rs similarity index 100% rename from tests/incremental/static_refering_to_other_static3/issue.rs rename to tests/incremental/static_referring_to_other_static3/issue.rs diff --git a/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs b/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs index 9c17c8745f8ca..1202fc46aec84 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_import_added.rs @@ -11,7 +11,7 @@ // functions and the modules are enclosed in `[]`), and add a new call `D <- C`, // yielding the new call-graph: `[A] -> [B -> D] <- [C]` // -// The effect of this is that the compiler previously classfied `D` as internal +// The effect of this is that the compiler previously classified `D` as internal // and the import-set of `[A]` to be just `B`. But after adding the `D <- C` call, // `D` is no longer classified as internal, and the import-set of `[A]` becomes // both `B` and `D`. diff --git a/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs b/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs index fc53acf75cb86..bc3cfbf972b05 100644 --- a/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs +++ b/tests/incremental/thinlto/cgu_invalidated_when_import_removed.rs @@ -41,7 +41,7 @@ mod foo { // In cfail2, ThinLTO decides that foo() does not get inlined into main, and // instead bar() gets inlined into foo(). But faulty logic in our incr. // ThinLTO implementation thought that `main()` is unchanged and thus reused - // the object file still containing a call to the now non-existent bar(). + // the object file still containing a call to the now nonexistent bar(). pub fn foo(){ bar() } diff --git a/tests/mir-opt/inline/inline_async.rs b/tests/mir-opt/inline/inline_async.rs index 5c838159b986c..32db1eebfa6d4 100644 --- a/tests/mir-opt/inline/inline_async.rs +++ b/tests/mir-opt/inline/inline_async.rs @@ -1,5 +1,5 @@ // Checks that inliner doesn't introduce cycles when optimizing generators. -// The outcome of optimization is not verfied, just the absence of the cycle. +// The outcome of optimization is not verified, just the absence of the cycle. // Regression test for #76181. // // edition:2018 diff --git a/tests/run-make/coverage-reports/expected_show_coverage.assert.txt b/tests/run-make/coverage-reports/expected_show_coverage.assert.txt index 405688806eaae..bc329d2244ef4 100644 --- a/tests/run-make/coverage-reports/expected_show_coverage.assert.txt +++ b/tests/run-make/coverage-reports/expected_show_coverage.assert.txt @@ -28,7 +28,7 @@ 27| |// 3. Notably, the `assert` macros *do not* generate `TerminatorKind::Assert`. The macros produce 28| |// conditional expressions, `TerminatorKind::SwitchInt` branches, and a possible call to 29| |// `begin_panic_fmt()` (that begins a panic unwind, if the assertion test fails). - 30| |// 4. `TerminatoKind::Assert` is, however, also present in the MIR generated for this test + 30| |// 4. `TerminatorKind::Assert` is, however, also present in the MIR generated for this test 31| |// (and in many other coverage tests). The `Assert` terminator is typically generated by the 32| |// Rust compiler to check for runtime failures, such as numeric overflows. diff --git a/tests/run-make/coverage/assert.rs b/tests/run-make/coverage/assert.rs index c85f2748eb9d8..fb98536122061 100644 --- a/tests/run-make/coverage/assert.rs +++ b/tests/run-make/coverage/assert.rs @@ -27,6 +27,6 @@ fn main() -> Result<(),u8> { // 3. Notably, the `assert` macros *do not* generate `TerminatorKind::Assert`. The macros produce // conditional expressions, `TerminatorKind::SwitchInt` branches, and a possible call to // `begin_panic_fmt()` (that begins a panic unwind, if the assertion test fails). -// 4. `TerminatoKind::Assert` is, however, also present in the MIR generated for this test +// 4. `TerminatorKind::Assert` is, however, also present in the MIR generated for this test // (and in many other coverage tests). The `Assert` terminator is typically generated by the // Rust compiler to check for runtime failures, such as numeric overflows. diff --git a/tests/run-make/issue-14500/Makefile b/tests/run-make/issue-14500/Makefile index eeab48de3b950..ca142434dd4cf 100644 --- a/tests/run-make/issue-14500/Makefile +++ b/tests/run-make/issue-14500/Makefile @@ -3,8 +3,8 @@ include ../tools.mk # ignore-cross-compile # Test to make sure that reachable extern fns are always available in final -# productcs, including when LTO is used. In this test, the `foo` crate has a -# reahable symbol, and is a dependency of the `bar` crate. When the `bar` crate +# products, including when LTO is used. In this test, the `foo` crate has a +# reachable symbol, and is a dependency of the `bar` crate. When the `bar` crate # is compiled with LTO, it shouldn't strip the symbol from `foo`, and that's the # only way that `foo.c` will successfully compile. diff --git a/tests/run-make/issue-83112-incr-test-moved-file/Makefile b/tests/run-make/issue-83112-incr-test-moved-file/Makefile index a00088cd9d61b..c12ef808fe6a2 100644 --- a/tests/run-make/issue-83112-incr-test-moved-file/Makefile +++ b/tests/run-make/issue-83112-incr-test-moved-file/Makefile @@ -9,8 +9,8 @@ include ../tools.mk # these spans as a full span (with a source file index), instead of skipping # the encoding of the location information. If the file gest moved, the hash # of the span will be unchanged (since it has a dummy location), so the incr -# cache would end up try to load a non-existent file using the previously -# enccoded source file id. +# cache would end up try to load a nonexistent file using the previously +# encoded source file id. SRC=$(TMPDIR)/src INCR=$(TMPDIR)/incr diff --git a/tests/run-make/many-crates-but-no-match/Makefile b/tests/run-make/many-crates-but-no-match/Makefile index ca0ab8e9e5f41..3953f43e70419 100644 --- a/tests/run-make/many-crates-but-no-match/Makefile +++ b/tests/run-make/many-crates-but-no-match/Makefile @@ -4,7 +4,7 @@ include ../tools.mk # more than one (mismatching) candidate crate into the search path, # which did not appear directly expressible in UI testing infrastructure. # -# Note that we move the built libraries into target direcrtories rather than +# Note that we move the built libraries into target directories rather than # use the `--out-dir` option because the `../tools.mk` file already bakes a # use of `--out-dir` into the definition of $(RUSTC). diff --git a/tests/run-make/sanitizer-staticlib-link/Makefile b/tests/run-make/sanitizer-staticlib-link/Makefile index 7b1a286ed121d..1cb06a8e56b63 100644 --- a/tests/run-make/sanitizer-staticlib-link/Makefile +++ b/tests/run-make/sanitizer-staticlib-link/Makefile @@ -9,7 +9,7 @@ include ../tools.mk # the fault in the staticlib is detected correctly. # Note that checking for the link failure actually checks two things at once: -# 1) That the library has the sanitizer intrumentation +# 1) That the library has the sanitizer instrumentation # 2) and that library does not have the sanitizer runtime all: diff --git a/tests/rustdoc-gui/search-reexport.goml b/tests/rustdoc-gui/search-reexport.goml index fd817b58990c5..da9cf81c726d7 100644 --- a/tests/rustdoc-gui/search-reexport.goml +++ b/tests/rustdoc-gui/search-reexport.goml @@ -1,5 +1,5 @@ // Checks that the reexports are present in the search index, can have -// doc aliases and are highligted when their ID is the hash of the page. +// doc aliases and are highlighted when their ID is the hash of the page. go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" set-local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"} reload: diff --git a/tests/rustdoc-gui/type-declation-overflow.goml b/tests/rustdoc-gui/type-declaration-overflow.goml similarity index 100% rename from tests/rustdoc-gui/type-declation-overflow.goml rename to tests/rustdoc-gui/type-declaration-overflow.goml diff --git a/tests/rustdoc-json/fns/generic_args.rs b/tests/rustdoc-json/fns/generic_args.rs index eec295efec0f0..a328a8787e478 100644 --- a/tests/rustdoc-json/fns/generic_args.rs +++ b/tests/rustdoc-json/fns/generic_args.rs @@ -32,37 +32,37 @@ pub fn generics(f: F) {} // @is "$.index[*][?(@.name=='impl_trait')].inner.decl.inputs[0][1].inner[0].trait_bound.trait.id" $foo pub fn impl_trait(f: impl Foo) {} -// @count "$.index[*][?(@.name=='where_clase')].inner.generics.params[*]" 3 -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.params[0].name" '"F"' -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.params[0].kind" '{"type": {"bounds": [], "default": null, "synthetic": false}}' -// @count "$.index[*][?(@.name=='where_clase')].inner.decl.inputs[*]" 3 -// @is "$.index[*][?(@.name=='where_clase')].inner.decl.inputs[0][0]" '"f"' -// @is "$.index[*][?(@.name=='where_clase')].inner.decl.inputs[0][1].kind" '"generic"' -// @is "$.index[*][?(@.name=='where_clase')].inner.decl.inputs[0][1].inner" '"F"' -// @count "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[*]" 3 +// @count "$.index[*][?(@.name=='where_clause')].inner.generics.params[*]" 3 +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.params[0].name" '"F"' +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.params[0].kind" '{"type": {"bounds": [], "default": null, "synthetic": false}}' +// @count "$.index[*][?(@.name=='where_clause')].inner.decl.inputs[*]" 3 +// @is "$.index[*][?(@.name=='where_clause')].inner.decl.inputs[0][0]" '"f"' +// @is "$.index[*][?(@.name=='where_clause')].inner.decl.inputs[0][1].kind" '"generic"' +// @is "$.index[*][?(@.name=='where_clause')].inner.decl.inputs[0][1].inner" '"F"' +// @count "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[*]" 3 -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[0].bound_predicate.type" '{"inner": "F", "kind": "generic"}' -// @count "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[0].bound_predicate.bounds[*]" 1 -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[0].bound_predicate.bounds[0].trait_bound.trait.id" $foo +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[0].bound_predicate.type" '{"inner": "F", "kind": "generic"}' +// @count "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[0].bound_predicate.bounds[*]" 1 +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[0].bound_predicate.bounds[0].trait_bound.trait.id" $foo -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[1].bound_predicate.type" '{"inner": "G", "kind": "generic"}' -// @count "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[1].bound_predicate.bounds[*]" 1 -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.trait.id" $generic_foo -// @count "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[*]" 1 -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].name" \"\'a\" -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }' -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[1].bound_predicate.generic_params" "[]" +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[1].bound_predicate.type" '{"inner": "G", "kind": "generic"}' +// @count "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[1].bound_predicate.bounds[*]" 1 +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.trait.id" $generic_foo +// @count "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[*]" 1 +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].name" \"\'a\" +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[1].bound_predicate.bounds[0].trait_bound.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }' +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[1].bound_predicate.generic_params" "[]" -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.type.kind" '"borrowed_ref"' -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.type.inner.lifetime" \"\'b\" -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.type.inner.type" '{"inner": "H", "kind": "generic"}' -// @count "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.bounds[*]" 1 -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.trait.id" $foo -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.generic_params" "[]" -// @count "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.generic_params[*]" 1 -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.generic_params[0].name" \"\'b\" -// @is "$.index[*][?(@.name=='where_clase')].inner.generics.where_predicates[2].bound_predicate.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }' -pub fn where_clase(f: F, g: G, h: H) +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.type.kind" '"borrowed_ref"' +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.type.inner.lifetime" \"\'b\" +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.type.inner.type" '{"inner": "H", "kind": "generic"}' +// @count "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.bounds[*]" 1 +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.trait.id" $foo +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.bounds[0].trait_bound.generic_params" "[]" +// @count "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.generic_params[*]" 1 +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.generic_params[0].name" \"\'b\" +// @is "$.index[*][?(@.name=='where_clause')].inner.generics.where_predicates[2].bound_predicate.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }' +pub fn where_clause(f: F, g: G, h: H) where F: Foo, G: for<'a> GenericFoo<'a>, diff --git a/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs b/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs index 94ea0e93bf637..8e95988d1ce37 100644 --- a/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs +++ b/tests/rustdoc-ui/ambiguous-inherent-assoc-ty.rs @@ -1,5 +1,5 @@ // check-pass -// This test ensures that rustdoc does not panic on inherented associated types +// This test ensures that rustdoc does not panic on inherited associated types // that are referred to without fully-qualified syntax. #![feature(inherent_associated_types)] diff --git a/tests/rustdoc-ui/const-evalutation-ice.rs b/tests/rustdoc-ui/const-evaluation-ice.rs similarity index 100% rename from tests/rustdoc-ui/const-evalutation-ice.rs rename to tests/rustdoc-ui/const-evaluation-ice.rs diff --git a/tests/rustdoc-ui/const-evalutation-ice.stderr b/tests/rustdoc-ui/const-evaluation-ice.stderr similarity index 89% rename from tests/rustdoc-ui/const-evalutation-ice.stderr rename to tests/rustdoc-ui/const-evaluation-ice.stderr index 5d9c16c076529..19dafd3c29863 100644 --- a/tests/rustdoc-ui/const-evalutation-ice.stderr +++ b/tests/rustdoc-ui/const-evaluation-ice.stderr @@ -1,5 +1,5 @@ error[E0080]: evaluation of constant value failed - --> $DIR/const-evalutation-ice.rs:10:22 + --> $DIR/const-evaluation-ice.rs:10:22 | LL | pub const N: usize = 0 - (mem::size_of::() != 400) as usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow diff --git a/tests/rustdoc-ui/error-in-impl-trait/README.md b/tests/rustdoc-ui/error-in-impl-trait/README.md index 1176a4a8c4cf8..de2a6da8f08c9 100644 --- a/tests/rustdoc-ui/error-in-impl-trait/README.md +++ b/tests/rustdoc-ui/error-in-impl-trait/README.md @@ -1,5 +1,5 @@ Each of these needs to be in a separate file, -because the `delay_span_bug` ICE in rustdoc won't be triggerred +because the `delay_span_bug` ICE in rustdoc won't be triggered if even a single other error was emitted. However, conceptually they are all testing basically the same thing. diff --git a/tests/rustdoc-ui/invalid_infered_static_and_const.rs b/tests/rustdoc-ui/invalid_inferred_static_and_const.rs similarity index 100% rename from tests/rustdoc-ui/invalid_infered_static_and_const.rs rename to tests/rustdoc-ui/invalid_inferred_static_and_const.rs diff --git a/tests/rustdoc-ui/invalid_infered_static_and_const.stderr b/tests/rustdoc-ui/invalid_inferred_static_and_const.stderr similarity index 82% rename from tests/rustdoc-ui/invalid_infered_static_and_const.stderr rename to tests/rustdoc-ui/invalid_inferred_static_and_const.stderr index 401020224d6a5..0a51b6f00aad5 100644 --- a/tests/rustdoc-ui/invalid_infered_static_and_const.stderr +++ b/tests/rustdoc-ui/invalid_inferred_static_and_const.stderr @@ -1,11 +1,11 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures for constant items - --> $DIR/invalid_infered_static_and_const.rs:1:24 + --> $DIR/invalid_inferred_static_and_const.rs:1:24 | LL | const FOO: dyn Fn() -> _ = ""; | ^ not allowed in type signatures error[E0121]: the placeholder `_` is not allowed within types on item signatures for static items - --> $DIR/invalid_infered_static_and_const.rs:2:25 + --> $DIR/invalid_inferred_static_and_const.rs:2:25 | LL | static BOO: dyn Fn() -> _ = ""; | ^ not allowed in type signatures diff --git a/tests/rustdoc/issue-54478-demo-allocator.rs b/tests/rustdoc/issue-54478-demo-allocator.rs index 4811f363bc97a..889a2352bb9d6 100644 --- a/tests/rustdoc/issue-54478-demo-allocator.rs +++ b/tests/rustdoc/issue-54478-demo-allocator.rs @@ -8,7 +8,7 @@ // `-C prefer-dynamic` (and had done so for years, for reasons we did // not document at that time). // -// Rather than try to revise the visbility semanics, we instead +// Rather than try to revise the visibility semantics, we instead // decided to change `rustdoc` to behave more like the compiler's // default setting, by leaving off `-C prefer-dynamic`. diff --git a/tests/ui/associated-type-bounds/auxiliary/fn-aux.rs b/tests/ui/associated-type-bounds/auxiliary/fn-aux.rs index 0ea23ad1dbffa..c5c01a7e81d52 100644 --- a/tests/ui/associated-type-bounds/auxiliary/fn-aux.rs +++ b/tests/ui/associated-type-bounds/auxiliary/fn-aux.rs @@ -143,7 +143,7 @@ where assert_forall_epsilon_zeta_satisfies_eta::(gamma) } -pub fn desugared_contraint_region_forall(beta: B) -> usize +pub fn desugared_constraint_region_forall(beta: B) -> usize where for<'a> &'a B: Beta, for<'a> <&'a B as Beta>::Gamma: Alpha, diff --git a/tests/ui/associated-type-bounds/auxiliary/fn-dyn-aux.rs b/tests/ui/associated-type-bounds/auxiliary/fn-dyn-aux.rs index 85d6c5aaf3c6f..5eaf1c039d3ae 100644 --- a/tests/ui/associated-type-bounds/auxiliary/fn-dyn-aux.rs +++ b/tests/ui/associated-type-bounds/auxiliary/fn-dyn-aux.rs @@ -148,7 +148,7 @@ where assert_forall_epsilon_zeta_satisfies_eta::(gamma) } -pub fn desugared_contraint_region_forall(beta: &B) -> usize +pub fn desugared_constraint_region_forall(beta: &B) -> usize where for<'a> &'a B: Beta, for<'a> <&'a B as Beta>::Gamma: Alpha, diff --git a/tests/ui/associated-type-bounds/fn-where.rs b/tests/ui/associated-type-bounds/fn-where.rs index 9c4f82ac991c8..09a0af152aa5a 100644 --- a/tests/ui/associated-type-bounds/fn-where.rs +++ b/tests/ui/associated-type-bounds/fn-where.rs @@ -52,11 +52,11 @@ where desugared_bound_region_forall2(beta) } -fn where_contraint_region_forall(beta: B) -> usize +fn where_constraint_region_forall(beta: B) -> usize where for<'a> &'a B: Beta, { - desugared_contraint_region_forall(beta) + desugared_constraint_region_forall(beta) } fn where_bound_nested(beta: B) -> usize diff --git a/tests/ui/associated-types/associated-types-bound.rs b/tests/ui/associated-types/associated-types-bound.rs index 0e9a229a5e592..e50f93687d60a 100644 --- a/tests/ui/associated-types/associated-types-bound.rs +++ b/tests/ui/associated-types/associated-types-bound.rs @@ -1,5 +1,5 @@ // run-pass -// Test equality constrai32s on associated types in a where clause. +// Test equality constraints on associated types in a where clause. pub trait ToI32 { diff --git a/tests/ui/associated-types/normalization-generality-2.rs b/tests/ui/associated-types/normalization-generality-2.rs index d8790bb2d12fc..b54313fe5ca1b 100644 --- a/tests/ui/associated-types/normalization-generality-2.rs +++ b/tests/ui/associated-types/normalization-generality-2.rs @@ -1,7 +1,7 @@ // build-pass // Ensures that we don't regress on "implementation is not general enough" when -// normalizating under binders. Unlike `normalization-generality.rs`, this also produces +// normalizing under binders. Unlike `normalization-generality.rs`, this also produces // type outlives predicates that we must ignore. pub unsafe trait Yokeable<'a> { diff --git a/tests/ui/associated-types/normalization-generality.rs b/tests/ui/associated-types/normalization-generality.rs index f8e3f5b58d1b3..224c5cb0b734f 100644 --- a/tests/ui/associated-types/normalization-generality.rs +++ b/tests/ui/associated-types/normalization-generality.rs @@ -1,7 +1,7 @@ // build-pass // Ensures that we don't regress on "implementation is not general enough" when -// normalizating under binders. +// normalizing under binders. #![feature(no_core)] diff --git a/tests/ui/async-await/auxiliary/arc_wake.rs b/tests/ui/async-await/auxiliary/arc_wake.rs index c21886f26f467..ccf9a86a38083 100644 --- a/tests/ui/async-await/auxiliary/arc_wake.rs +++ b/tests/ui/async-await/auxiliary/arc_wake.rs @@ -37,7 +37,7 @@ unsafe fn increase_refcount(data: *const ()) { // Retain Arc by creating a copy let arc: Arc = Arc::from_raw(data as *const T); let arc_clone = arc.clone(); - // Forget the Arcs again, so that the refcount isn't decrased + // Forget the Arcs again, so that the refcount isn't decreased let _ = Arc::into_raw(arc); let _ = Arc::into_raw(arc_clone); } diff --git a/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs b/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs index c21886f26f467..ccf9a86a38083 100644 --- a/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs +++ b/tests/ui/async-await/drop-order/auxiliary/arc_wake.rs @@ -37,7 +37,7 @@ unsafe fn increase_refcount(data: *const ()) { // Retain Arc by creating a copy let arc: Arc = Arc::from_raw(data as *const T); let arc_clone = arc.clone(); - // Forget the Arcs again, so that the refcount isn't decrased + // Forget the Arcs again, so that the refcount isn't decreased let _ = Arc::into_raw(arc); let _ = Arc::into_raw(arc_clone); } diff --git a/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs b/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs index 15cc9fbc81fb7..1c6bb01ede14e 100644 --- a/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs +++ b/tests/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs @@ -62,7 +62,7 @@ fn simple_variable_declaration_sync(l: DropOrderListPtr) { let y = D("y", l.clone()); } -async fn varable_completely_contained_within_block_async(l: DropOrderListPtr) { +async fn variable_completely_contained_within_block_async(l: DropOrderListPtr) { l.borrow_mut().push(DropOrder::Function); async { let x = D("x", l.clone()); @@ -72,7 +72,7 @@ async fn varable_completely_contained_within_block_async(l: DropOrderListPtr) { NeverReady.await; } -fn varable_completely_contained_within_block_sync(l: DropOrderListPtr) { +fn variable_completely_contained_within_block_sync(l: DropOrderListPtr) { l.borrow_mut().push(DropOrder::Function); { let x = D("x", l.clone()); @@ -158,8 +158,8 @@ fn main() { simple_variable_declaration_sync, ); assert_drop_order_after_cancel( - varable_completely_contained_within_block_async, - varable_completely_contained_within_block_sync, + variable_completely_contained_within_block_async, + variable_completely_contained_within_block_sync, ); assert_drop_order_after_cancel( variables_moved_into_separate_blocks_async, diff --git a/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs b/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs index 1fa8d69143a22..f2ad307859a4a 100644 --- a/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs +++ b/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs @@ -5,7 +5,7 @@ // // Regression test for issue #73741 // Ensures that we don't emit spurious errors when -// a type error ocurrs in an `async fn` +// a type error occurs in an `async fn` async fn weird() { 1 = 2; //~ ERROR invalid left-hand side diff --git a/tests/ui/async-await/issue-73741-type-err.rs b/tests/ui/async-await/issue-73741-type-err.rs index c5b9e34edf703..77077181605d1 100644 --- a/tests/ui/async-await/issue-73741-type-err.rs +++ b/tests/ui/async-await/issue-73741-type-err.rs @@ -2,7 +2,7 @@ // // Regression test for issue #73741 // Ensures that we don't emit spurious errors when -// a type error ocurrs in an `async fn` +// a type error occurs in an `async fn` async fn weird() { 1 = 2; //~ ERROR invalid left-hand side diff --git a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs b/tests/ui/async-await/issues/issue-66958-non-copy-inferred-type-arg.rs similarity index 100% rename from tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.rs rename to tests/ui/async-await/issues/issue-66958-non-copy-inferred-type-arg.rs diff --git a/tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr b/tests/ui/async-await/issues/issue-66958-non-copy-inferred-type-arg.stderr similarity index 100% rename from tests/ui/async-await/issues/issue-66958-non-copy-infered-type-arg.stderr rename to tests/ui/async-await/issues/issue-66958-non-copy-inferred-type-arg.stderr diff --git a/tests/ui/attributes/extented-attribute-macro-error.rs b/tests/ui/attributes/extended-attribute-macro-error.rs similarity index 72% rename from tests/ui/attributes/extented-attribute-macro-error.rs rename to tests/ui/attributes/extended-attribute-macro-error.rs index 492f84f56c3a0..5759d0fcded2d 100644 --- a/tests/ui/attributes/extented-attribute-macro-error.rs +++ b/tests/ui/attributes/extended-attribute-macro-error.rs @@ -1,6 +1,6 @@ // normalize-stderr-test: "couldn't read.*" -> "couldn't read the file" -#![doc = include_str!("../not_existing_file.md")] +#![doc = include_str!("../nonexistent_file.md")] struct Documented {} //~^^ ERROR couldn't read diff --git a/tests/ui/attributes/extented-attribute-macro-error.stderr b/tests/ui/attributes/extended-attribute-macro-error.stderr similarity index 56% rename from tests/ui/attributes/extented-attribute-macro-error.stderr rename to tests/ui/attributes/extended-attribute-macro-error.stderr index 0fcde9b7cc69f..9087052a38067 100644 --- a/tests/ui/attributes/extented-attribute-macro-error.stderr +++ b/tests/ui/attributes/extended-attribute-macro-error.stderr @@ -1,8 +1,8 @@ error: couldn't read the file - --> $DIR/extented-attribute-macro-error.rs:3:10 + --> $DIR/extended-attribute-macro-error.rs:3:10 | -LL | #![doc = include_str!("../not_existing_file.md")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | #![doc = include_str!("../nonexistent_file.md")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/binding/expr-match.rs b/tests/ui/binding/expr-match.rs index 575b38fbc951e..6b7538e16b307 100644 --- a/tests/ui/binding/expr-match.rs +++ b/tests/ui/binding/expr-match.rs @@ -12,7 +12,7 @@ fn test_basic() { assert!((rs)); } -fn test_inferrence() { +fn test_inference() { let rs = match true { true => { true } false => { false } }; assert!((rs)); } @@ -39,7 +39,7 @@ fn test_alt_as_block_result() { pub fn main() { test_basic(); - test_inferrence(); + test_inference(); test_alt_as_alt_head(); test_alt_as_block_result(); } diff --git a/tests/ui/binding/nested-matchs.rs b/tests/ui/binding/nested-matches.rs similarity index 100% rename from tests/ui/binding/nested-matchs.rs rename to tests/ui/binding/nested-matches.rs diff --git a/tests/ui/binop/shift-various-bad-types.rs b/tests/ui/binop/shift-various-bad-types.rs index 31224bbca1efc..782a7d3b8c7f4 100644 --- a/tests/ui/binop/shift-various-bad-types.rs +++ b/tests/ui/binop/shift-various-bad-types.rs @@ -1,11 +1,11 @@ // Test that we can do shifts by any integral type. -struct Panolpy { +struct Panoply { char: char, str: &'static str, } -fn foo(p: &Panolpy) { +fn foo(p: &Panoply) { 22 >> p.char; //~^ ERROR E0277 diff --git a/tests/ui/binop/shift-various-bad-types.stderr b/tests/ui/binop/shift-various-bad-types.stderr index 38db66f86b461..a381003f35327 100644 --- a/tests/ui/binop/shift-various-bad-types.stderr +++ b/tests/ui/binop/shift-various-bad-types.stderr @@ -34,13 +34,13 @@ LL | 22 >> p.str; <&'a i128 as Shr> and 568 others -error[E0277]: no implementation for `{integer} >> &Panolpy` +error[E0277]: no implementation for `{integer} >> &Panoply` --> $DIR/shift-various-bad-types.rs:15:8 | LL | 22 >> p; - | ^^ no implementation for `{integer} >> &Panolpy` + | ^^ no implementation for `{integer} >> &Panoply` | - = help: the trait `Shr<&Panolpy>` is not implemented for `{integer}` + = help: the trait `Shr<&Panoply>` is not implemented for `{integer}` = help: the following other types implement trait `Shr`: <&'a i128 as Shr> <&'a i128 as Shr> diff --git a/tests/ui/borrowck/borrowck-box-sensitivity.rs b/tests/ui/borrowck/borrowck-box-sensitivity.rs index e880f876f91a9..3355cae9debec 100644 --- a/tests/ui/borrowck/borrowck-box-sensitivity.rs +++ b/tests/ui/borrowck/borrowck-box-sensitivity.rs @@ -1,5 +1,5 @@ // Test that `Box` is treated specially by borrow checking. This is the case -// because NLL reverted the deicision in rust-lang/rfcs#130. +// because NLL reverted the decision in rust-lang/rfcs#130. // run-pass diff --git a/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs b/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs index b87ef3baa4aa7..940db52b4c404 100644 --- a/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs +++ b/tests/ui/borrowck/issue-55552-ascribe-wildcard-to-structured-pattern.rs @@ -2,7 +2,7 @@ // rust-lang/rust#55552: The strategy pnkfelix landed in PR #55274 // (for ensuring that NLL respects user-provided lifetime annotations) -// did not handle the case where the ascribed type has some expliit +// did not handle the case where the ascribed type has some explicit // wildcards (`_`) mixed in, and it caused an internal compiler error // (ICE). // diff --git a/tests/ui/borrowck/two-phase-surprise-no-conflict.rs b/tests/ui/borrowck/two-phase-surprise-no-conflict.rs index 6d37d1ded6400..5e5f8c91f5de5 100644 --- a/tests/ui/borrowck/two-phase-surprise-no-conflict.rs +++ b/tests/ui/borrowck/two-phase-surprise-no-conflict.rs @@ -97,7 +97,7 @@ impl<'a> Registry<'a> { fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) { // Not okay without two-phase borrows: The implicit `&mut reg` of - // the receiver is evaluaated first, and that conflicts with the + // the receiver is evaluated first, and that conflicts with the // `reg.sess_mut` access during argument evaluation. // // Okay if we have two-phase borrows: inner borrows do not survive diff --git a/tests/ui/cfg/cfg_attr.rs b/tests/ui/cfg/cfg_attr.rs index c959e68acf966..fa10ce76478da 100644 --- a/tests/ui/cfg/cfg_attr.rs +++ b/tests/ui/cfg/cfg_attr.rs @@ -3,37 +3,37 @@ #![allow(dead_code)] use std::fmt::Debug; -struct NotDebugable; +struct NotDebuggable; #[cfg_attr(set1, derive(Debug))] struct Set1; #[cfg_attr(notset, derive(Debug))] -struct Notset(NotDebugable); +struct Notset(NotDebuggable); #[cfg_attr(not(notset), derive(Debug))] struct NotNotset; #[cfg_attr(not(set1), derive(Debug))] -struct NotSet1(NotDebugable); +struct NotSet1(NotDebuggable); #[cfg_attr(all(set1, set2), derive(Debug))] struct AllSet1Set2; #[cfg_attr(all(set1, notset), derive(Debug))] -struct AllSet1Notset(NotDebugable); +struct AllSet1Notset(NotDebuggable); #[cfg_attr(any(set1, notset), derive(Debug))] struct AnySet1Notset; #[cfg_attr(any(notset, notset2), derive(Debug))] -struct AnyNotsetNotset2(NotDebugable); +struct AnyNotsetNotset2(NotDebuggable); #[cfg_attr(all(not(notset), any(set1, notset)), derive(Debug))] struct Complex; #[cfg_attr(any(notset, not(any(set1, notset))), derive(Debug))] -struct ComplexNot(NotDebugable); +struct ComplexNot(NotDebuggable); #[cfg_attr(any(target_endian = "little", target_endian = "big"), derive(Debug))] struct KeyValue; diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs index 269cf76e67351..5337c13db58b1 100644 --- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs +++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs @@ -11,7 +11,7 @@ fn main() { || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: - println!("This uses new capture analyysis to capture s={}", s); + println!("This uses new capture analysis to capture s={}", s); //~^ NOTE: Capturing s[] -> ImmBorrow //~| NOTE: Min Capture s[] -> ImmBorrow }; diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr index b936c5ee35a4d..66bca5ca6d19e 100644 --- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr +++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr @@ -13,7 +13,7 @@ error: First Pass analysis includes: LL | / || { LL | | LL | | -LL | | println!("This uses new capture analyysis to capture s={}", s); +LL | | println!("This uses new capture analysis to capture s={}", s); LL | | LL | | LL | | }; @@ -22,7 +22,7 @@ LL | | }; note: Capturing s[] -> ImmBorrow --> $DIR/feature-gate-capture_disjoint_fields.rs:14:69 | -LL | println!("This uses new capture analyysis to capture s={}", s); +LL | println!("This uses new capture analysis to capture s={}", s); | ^ error: Min Capture analysis includes: @@ -31,7 +31,7 @@ error: Min Capture analysis includes: LL | / || { LL | | LL | | -LL | | println!("This uses new capture analyysis to capture s={}", s); +LL | | println!("This uses new capture analysis to capture s={}", s); LL | | LL | | LL | | }; @@ -40,7 +40,7 @@ LL | | }; note: Min Capture s[] -> ImmBorrow --> $DIR/feature-gate-capture_disjoint_fields.rs:14:69 | -LL | println!("This uses new capture analyysis to capture s={}", s); +LL | println!("This uses new capture analysis to capture s={}", s); | ^ error: aborting due to 3 previous errors diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed index d985e3bb9ec74..8b0b265fd6b6b 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.fixed @@ -51,7 +51,7 @@ fn significant_drop_needs_migration() { // Even if a type implements an insignificant drop, if it's // elements have a significant drop then the overall type is -// consdered to have an significant drop. Since the elements +// considered to have an significant drop. Since the elements // of `GenericStruct` implement drop, migration is required. fn generic_struct_with_significant_drop_needs_migration() { let t = Wrapper(GenericStruct(SigDrop {}, SigDrop {}), 5); diff --git a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs index f95d34eeb299a..ea0690f71a987 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/insignificant_drop_attr_migrations.rs @@ -50,7 +50,7 @@ fn significant_drop_needs_migration() { // Even if a type implements an insignificant drop, if it's // elements have a significant drop then the overall type is -// consdered to have an significant drop. Since the elements +// considered to have an significant drop. Since the elements // of `GenericStruct` implement drop, migration is required. fn generic_struct_with_significant_drop_needs_migration() { let t = Wrapper(GenericStruct(SigDrop {}, SigDrop {}), 5); diff --git a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed index ce8b607259576..536913ad3eae9 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.fixed @@ -2,7 +2,7 @@ #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here -// Test the two possible cases for automated migartion using rustfix +// Test the two possible cases for automated migration using rustfix // - Closure contains a block i.e. `|| { .. };` // - Closure contains just an expr `|| ..;` diff --git a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs index 2237bebd788e7..d98f2cdeb95ce 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/migrations_rustfix.rs @@ -2,7 +2,7 @@ #![deny(rust_2021_incompatible_closure_captures)] //~^ NOTE: the lint level is defined here -// Test the two possible cases for automated migartion using rustfix +// Test the two possible cases for automated migration using rustfix // - Closure contains a block i.e. `|| { .. };` // - Closure contains just an expr `|| ..;` diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed b/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed index 7892a72c76523..4def9e3c88b86 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise.fixed @@ -11,11 +11,11 @@ impl Drop for Foo { } } -struct ConstainsDropField(Foo, Foo); +struct ContainsDropField(Foo, Foo); // Test that lint is triggered if a path that implements Drop is not captured by move fn test_precise_analysis_drop_paths_not_captured_by_move() { - let t = ConstainsDropField(Foo(10), Foo(20)); + let t = ContainsDropField(Foo(10), Foo(20)); let c = || { let _ = &t; diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise.rs b/tests/ui/closures/2229_closure_analysis/migrations/precise.rs index f5e99002bd08a..3ca1215789377 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise.rs @@ -11,11 +11,11 @@ impl Drop for Foo { } } -struct ConstainsDropField(Foo, Foo); +struct ContainsDropField(Foo, Foo); // Test that lint is triggered if a path that implements Drop is not captured by move fn test_precise_analysis_drop_paths_not_captured_by_move() { - let t = ConstainsDropField(Foo(10), Foo(20)); + let t = ContainsDropField(Foo(10), Foo(20)); let c = || { //~^ ERROR: drop order diff --git a/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs b/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs index 587d71c40fc69..0e28433507081 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs @@ -10,7 +10,7 @@ impl Drop for Foo { } } -struct ConstainsDropField(Foo, Foo); +struct ContainsDropField(Foo, Foo); // Test that if all paths starting at root variable that implement Drop are captured // then it doesn't trigger the lint. @@ -29,7 +29,7 @@ fn test_precise_analysis_simple_1() { // Test that if all paths starting at root variable that implement Drop are captured // then it doesn't trigger the lint. fn test_precise_analysis_simple_2() { - let t = ConstainsDropField(Foo(10), Foo(20)); + let t = ContainsDropField(Foo(10), Foo(20)); let c = || { let _t = t.0; @@ -50,7 +50,7 @@ impl Drop for ContainsAndImplsDrop { // If a path isn't directly captured but requires Drop, then this tests that migrations aren't // needed if the a parent to that path is captured. fn test_precise_analysis_parent_captured_1() { - let t = ConstainsDropField(Foo(10), Foo(20)); + let t = ContainsDropField(Foo(10), Foo(20)); let c = || { let _t = t; diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed index e99dbb5ab3a4a..b3ec1b3fb8d8a 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed +++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.fixed @@ -13,7 +13,7 @@ impl Drop for Foo { } #[derive(Debug)] -struct ConstainsDropField(Foo, #[allow(unused_tuple_struct_fields)] Foo); +struct ContainsDropField(Foo, #[allow(unused_tuple_struct_fields)] Foo); // `t` needs Drop because one of its elements needs drop, // therefore precise capture might affect drop ordering @@ -89,7 +89,7 @@ fn test3_only_by_value_need_migration() { // // If this path isn't captured we need to migrate for the root variable. fn test4_type_contains_drop_need_migration() { - let t = ConstainsDropField(Foo(0), Foo(0)); + let t = ContainsDropField(Foo(0), Foo(0)); let c = || { let _ = &t; diff --git a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs index 62a984c9eebdd..3cc8a6eb2a2e7 100644 --- a/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs +++ b/tests/ui/closures/2229_closure_analysis/migrations/significant_drop.rs @@ -13,7 +13,7 @@ impl Drop for Foo { } #[derive(Debug)] -struct ConstainsDropField(Foo, #[allow(unused_tuple_struct_fields)] Foo); +struct ContainsDropField(Foo, #[allow(unused_tuple_struct_fields)] Foo); // `t` needs Drop because one of its elements needs drop, // therefore precise capture might affect drop ordering @@ -86,7 +86,7 @@ fn test3_only_by_value_need_migration() { // // If this path isn't captured we need to migrate for the root variable. fn test4_type_contains_drop_need_migration() { - let t = ConstainsDropField(Foo(0), Foo(0)); + let t = ContainsDropField(Foo(0), Foo(0)); let c = || { //~^ ERROR: drop order diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs index 1cae776dd68bc..342ce240d86b2 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.rs @@ -5,9 +5,9 @@ // [twenty_twentyone]compile-flags: --edition 2021 #[derive(Debug)] -struct Dropable(&'static str); +struct Droppable(&'static str); -impl Drop for Dropable { +impl Drop for Droppable { fn drop(&mut self) { println!("Dropping {}", self.0) } @@ -15,8 +15,8 @@ impl Drop for Dropable { #[derive(Debug)] struct A { - x: Dropable, - y: Dropable, + x: Droppable, + y: Droppable, } #[derive(Debug)] @@ -32,15 +32,15 @@ struct R<'a> { } fn main() { - let a = A { x: Dropable("x"), y: Dropable("y") }; + let a = A { x: Droppable("x"), y: Droppable("y") }; let c = move || println!("{:?} {:?}", a.y, a.x); c(); let b = B { - c: A { x: Dropable("b.c.x"), y: Dropable("b.c.y") }, - d: A { x: Dropable("b.d.x"), y: Dropable("b.d.y") }, + c: A { x: Droppable("b.c.x"), y: Droppable("b.c.y") }, + d: A { x: Droppable("b.d.x"), y: Droppable("b.d.y") }, }; let d = move || println!("{:?} {:?} {:?} {:?}", b.d.y, b.d.x, b.c.y, b.c.x); @@ -48,8 +48,8 @@ fn main() { d(); let r = R { - c: &A { x: Dropable("r.c.x"), y: Dropable("r.c.y") }, - d: &A { x: Dropable("r.d.x"), y: Dropable("r.d.y") }, + c: &A { x: Droppable("r.c.x"), y: Droppable("r.c.y") }, + d: &A { x: Droppable("r.d.x"), y: Droppable("r.d.y") }, }; let e = move || println!("{:?} {:?} {:?} {:?}", r.d.y, r.d.x, r.c.y, r.c.x); diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_eighteen.run.stdout b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_eighteen.run.stdout index 557d047c1d524..952dfd575bb4b 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_eighteen.run.stdout +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_eighteen.run.stdout @@ -1,6 +1,6 @@ -Dropable("y") Dropable("x") -Dropable("b.d.y") Dropable("b.d.x") Dropable("b.c.y") Dropable("b.c.x") -Dropable("r.d.y") Dropable("r.d.x") Dropable("r.c.y") Dropable("r.c.x") +Droppable("y") Droppable("x") +Droppable("b.d.y") Droppable("b.d.x") Droppable("b.c.y") Droppable("b.c.x") +Droppable("r.d.y") Droppable("r.d.x") Droppable("r.c.y") Droppable("r.c.x") Dropping r.d.x Dropping r.d.y Dropping r.c.x diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_twentyone.run.stdout b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_twentyone.run.stdout index 557d047c1d524..952dfd575bb4b 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_twentyone.run.stdout +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order2.twenty_twentyone.run.stdout @@ -1,6 +1,6 @@ -Dropable("y") Dropable("x") -Dropable("b.d.y") Dropable("b.d.x") Dropable("b.c.y") Dropable("b.c.x") -Dropable("r.d.y") Dropable("r.d.x") Dropable("r.c.y") Dropable("r.c.x") +Droppable("y") Droppable("x") +Droppable("b.d.y") Droppable("b.d.x") Droppable("b.c.y") Droppable("b.c.x") +Droppable("r.d.y") Droppable("r.d.x") Droppable("r.c.y") Droppable("r.c.x") Dropping r.d.x Dropping r.d.y Dropping r.c.x diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs index a80b40bb46957..4c0b3fa8e5ec6 100644 --- a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs @@ -1,7 +1,7 @@ // edition:2021 // run-pass -// Test whether if we can do precise capture when using nested clsoure. +// Test whether if we can do precise capture when using nested closure. struct Point { x: i32, diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs index 563095d440d24..b6b8bbfe117ef 100644 --- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs +++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs @@ -15,7 +15,7 @@ fn main() { // // Requirements: - // p.x -> MutBoorrow + // p.x -> MutBorrow // p -> ImmBorrow // // Requirements met when p is captured via MutBorrow diff --git a/tests/ui/closures/issue-84128.rs b/tests/ui/closures/issue-84128.rs index 30733871b855f..33e464edc4ae0 100644 --- a/tests/ui/closures/issue-84128.rs +++ b/tests/ui/closures/issue-84128.rs @@ -1,5 +1,5 @@ // test for issue 84128 -// missing suggestion for similar ADT type with diffetent generic parameter +// missing suggestion for similar ADT type with different generic parameter // on closure ReturnNoExpression struct Foo(T); diff --git a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.rs b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.rs index 99f805f7f0f63..d9fe350317c58 100644 --- a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.rs +++ b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.rs @@ -1,4 +1,4 @@ -// Test that impls for these two types are considered ovelapping: +// Test that impls for these two types are considered overlapping: // // * `for<'r> fn(fn(&'r u32))` // * `fn(fn(&'a u32)` where `'a` is free diff --git a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs index edee6cd7b6cf6..b27e93740b486 100644 --- a/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs +++ b/tests/ui/coherence/coherence_copy_like_err_fundamental_struct.rs @@ -3,7 +3,7 @@ // aux-build:coherence_copy_like_lib.rs // build-pass (FIXME(62277): could be check-pass?) -// skip-codgen +// skip-codegen #![allow(dead_code)] extern crate coherence_copy_like_lib as lib; diff --git a/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs b/tests/ui/coherence/impl-foreign[fundamental[foreign]]-for-foreign.rs similarity index 100% rename from tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.rs rename to tests/ui/coherence/impl-foreign[fundamental[foreign]]-for-foreign.rs diff --git a/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr b/tests/ui/coherence/impl-foreign[fundamental[foreign]]-for-foreign.stderr similarity index 90% rename from tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr rename to tests/ui/coherence/impl-foreign[fundamental[foreign]]-for-foreign.stderr index 8e77c13e1116a..6f8828edd96d3 100644 --- a/tests/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr +++ b/tests/ui/coherence/impl-foreign[fundamental[foreign]]-for-foreign.stderr @@ -1,5 +1,5 @@ error[E0117]: only traits defined in the current crate can be implemented for primitive types - --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:11:1 + --> $DIR/impl-foreign[fundamental[foreign]]-for-foreign.rs:11:1 | LL | impl Remote1> for i32 { | ^^^^^--------------------^^^^^--- @@ -12,7 +12,7 @@ LL | impl Remote1> for i32 { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for primitive types - --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:15:1 + --> $DIR/impl-foreign[fundamental[foreign]]-for-foreign.rs:15:1 | LL | impl Remote1>> for f64 { | ^^^^^---------------------^^^^^--- @@ -25,7 +25,7 @@ LL | impl Remote1>> for f64 { = note: define and implement a trait or new type instead error[E0117]: only traits defined in the current crate can be implemented for primitive types - --> $DIR/impl-foreign[fundemental[foreign]]-for-foreign.rs:19:1 + --> $DIR/impl-foreign[fundamental[foreign]]-for-foreign.rs:19:1 | LL | impl Remote1>> for f32 { | ^^^^^^^^-------------------^^^^^--- diff --git a/tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs b/tests/ui/coherence/impl-foreign[fundamental[local]]-for-foreign.rs similarity index 100% rename from tests/ui/coherence/impl-foreign[fundemental[local]]-for-foreign.rs rename to tests/ui/coherence/impl-foreign[fundamental[local]]-for-foreign.rs diff --git a/tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs b/tests/ui/coherence/impl[t]-foreign[fundamental[local]]-for-foreign[t].rs similarity index 100% rename from tests/ui/coherence/impl[t]-foreign[fundemental[local]]-for-foreign[t].rs rename to tests/ui/coherence/impl[t]-foreign[fundamental[local]]-for-foreign[t].rs diff --git a/tests/ui/conditional-compilation/cfg-attr-parse.rs b/tests/ui/conditional-compilation/cfg-attr-parse.rs index 8ca31c118369c..630205b6fb001 100644 --- a/tests/ui/conditional-compilation/cfg-attr-parse.rs +++ b/tests/ui/conditional-compilation/cfg-attr-parse.rs @@ -4,7 +4,7 @@ #[cfg_attr()] //~ error: malformed `cfg_attr` attribute input struct NoConfigurationPredicate; -// Zero attributes, zero trailing comma (comma manatory here) +// Zero attributes, zero trailing comma (comma mandatory here) #[cfg_attr(all())] //~ error: expected `,`, found end of `cfg_attr` struct A0C0; diff --git a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.rs b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.rs index 7561ae2febbdf..376b67803d375 100644 --- a/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.rs +++ b/tests/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.rs @@ -13,7 +13,7 @@ where EvaluatableU128<{N as u128}>:, { fn assert_impl() {} - // errors are bad but seems to be pre-existing issue #86198 + // errors are bad but seems to be preexisting issue #86198 assert_impl::>(); //~^ Error: mismatched types //~^^ Error: unconstrained generic constant @@ -31,7 +31,7 @@ where EvaluatableU128<{N as _}>:, { fn assert_impl() {} - // errors are bad but seems to be pre-existing issue #86198 + // errors are bad but seems to be preexisting issue #86198 assert_impl::>(); //~^ Error: mismatched types //~^^ Error: unconstrained generic constant diff --git a/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs b/tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evaluable.rs similarity index 100% rename from tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evalutable.rs rename to tests/ui/const-generics/generic_const_exprs/subexprs_are_const_evaluable.rs diff --git a/tests/ui/const-generics/issues/issue-71381.rs b/tests/ui/const-generics/issues/issue-71381.rs index 66f819dbe06e2..89289d59f304f 100644 --- a/tests/ui/const-generics/issues/issue-71381.rs +++ b/tests/ui/const-generics/issues/issue-71381.rs @@ -14,10 +14,10 @@ impl Test { pub fn call_me(&self) { //~^ ERROR: using function pointers as const generic parameters is forbidden //~| ERROR: the type of const parameters must not depend on other generic parameters - self.0 = Self::trampiline:: as _ + self.0 = Self::trampoline:: as _ } - unsafe extern "C" fn trampiline< + unsafe extern "C" fn trampoline< Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args), diff --git a/tests/ui/consts/cast-discriminant-zst-enum.rs b/tests/ui/consts/cast-discriminant-zst-enum.rs index 2767f178fb664..bbe019fb7f78e 100644 --- a/tests/ui/consts/cast-discriminant-zst-enum.rs +++ b/tests/ui/consts/cast-discriminant-zst-enum.rs @@ -1,5 +1,5 @@ // run-pass -// Test a ZST enum whose dicriminant is ~0i128. This caused an ICE when casting to an i32. +// Test a ZST enum whose discriminant is ~0i128. This caused an ICE when casting to an i32. use std::hint::black_box; #[derive(Copy, Clone)] diff --git a/tests/ui/consts/const-endianess.rs b/tests/ui/consts/const-endianness.rs similarity index 100% rename from tests/ui/consts/const-endianess.rs rename to tests/ui/consts/const-endianness.rs diff --git a/tests/ui/consts/const-eval/issue-49296.rs b/tests/ui/consts/const-eval/issue-49296.rs index 917777a32fff3..b12f9bc1267dd 100644 --- a/tests/ui/consts/const-eval/issue-49296.rs +++ b/tests/ui/consts/const-eval/issue-49296.rs @@ -1,4 +1,4 @@ -// issue-49296: Unsafe shenigans in constants can result in missing errors +// issue-49296: Unsafe shenanigans in constants can result in missing errors use std::mem::transmute; diff --git a/tests/ui/consts/invalid-union.rs b/tests/ui/consts/invalid-union.rs index 28706b4a923e7..64a7504d81c9e 100644 --- a/tests/ui/consts/invalid-union.rs +++ b/tests/ui/consts/invalid-union.rs @@ -39,6 +39,6 @@ const C: S = { }; fn main() { //~ ERROR it is undefined behavior to use this value - // FIXME the span here is wrong, sould be pointing at the line below, not above. + // FIXME the span here is wrong, should be pointing at the line below, not above. let _: &'static _ = &C; } diff --git a/tests/ui/consts/issue-67696-const-prop-ice.rs b/tests/ui/consts/issue-67696-const-prop-ice.rs index ad52608b3f46d..18159d738fb2b 100644 --- a/tests/ui/consts/issue-67696-const-prop-ice.rs +++ b/tests/ui/consts/issue-67696-const-prop-ice.rs @@ -1,7 +1,7 @@ // check-pass // compile-flags: --emit=mir,link // Checks that we don't ICE due to attempting to run const prop -// on a function with unsatisifable 'where' clauses +// on a function with unsatisfiable 'where' clauses #![allow(unused)] diff --git a/tests/ui/deriving/deriving-all-codegen.rs b/tests/ui/deriving/deriving-all-codegen.rs index 51f9708d3cd62..32e5250199185 100644 --- a/tests/ui/deriving/deriving-all-codegen.rs +++ b/tests/ui/deriving/deriving-all-codegen.rs @@ -22,7 +22,7 @@ struct Empty; // A basic struct. Note: because this derives `Copy`, it gets the simple -// `clone` implemention that just does `*self`. +// `clone` implementation that just does `*self`. #[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)] struct Point { x: u32, @@ -30,7 +30,7 @@ struct Point { } // A basic packed struct. Note: because this derives `Copy`, it gets the simple -// `clone` implemention that just does `*self`. +// `clone` implementation that just does `*self`. #[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)] #[repr(packed)] struct PackedPoint { @@ -39,31 +39,31 @@ struct PackedPoint { } // A large struct. Note: because this derives `Copy`, it gets the simple -// `clone` implemention that just does `*self`. +// `clone` implementation that just does `*self`. #[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)] struct Big { b1: u32, b2: u32, b3: u32, b4: u32, b5: u32, b6: u32, b7: u32, b8: u32, } // A struct that doesn't impl `Copy`, which means it gets the non-simple -// `clone` implemention that clones the fields individually. +// `clone` implementation that clones the fields individually. #[derive(Clone)] struct NonCopy(u32); // A packed struct that doesn't impl `Copy`, which means it gets the non-simple -// `clone` implemention that clones the fields individually. +// `clone` implementation that clones the fields individually. #[derive(Clone)] #[repr(packed)] struct PackedNonCopy(u32); // A struct that impls `Copy` manually, which means it gets the non-simple -// `clone` implemention that clones the fields individually. +// `clone` implementation that clones the fields individually. #[derive(Clone)] struct ManualCopy(u32); impl Copy for ManualCopy {} // A packed struct that impls `Copy` manually, which means it gets the -// non-simple `clone` implemention that clones the fields individually. +// non-simple `clone` implementation that clones the fields individually. #[derive(Clone)] #[repr(packed)] struct PackedManualCopy(u32); diff --git a/tests/ui/deriving/deriving-all-codegen.stdout b/tests/ui/deriving/deriving-all-codegen.stdout index 5bca83e87f878..aa0e17fc7c3ca 100644 --- a/tests/ui/deriving/deriving-all-codegen.stdout +++ b/tests/ui/deriving/deriving-all-codegen.stdout @@ -79,7 +79,7 @@ impl ::core::cmp::Ord for Empty { } // A basic struct. Note: because this derives `Copy`, it gets the simple -// `clone` implemention that just does `*self`. +// `clone` implementation that just does `*self`. struct Point { x: u32, y: u32, @@ -163,7 +163,7 @@ impl ::core::cmp::Ord for Point { } // A basic packed struct. Note: because this derives `Copy`, it gets the simple -// `clone` implemention that just does `*self`. +// `clone` implementation that just does `*self`. #[repr(packed)] struct PackedPoint { x: u32, @@ -250,7 +250,7 @@ impl ::core::cmp::Ord for PackedPoint { } // A large struct. Note: because this derives `Copy`, it gets the simple -// `clone` implemention that just does `*self`. +// `clone` implementation that just does `*self`. struct Big { b1: u32, b2: u32, @@ -420,7 +420,7 @@ impl ::core::cmp::Ord for Big { } // A struct that doesn't impl `Copy`, which means it gets the non-simple -// `clone` implemention that clones the fields individually. +// `clone` implementation that clones the fields individually. struct NonCopy(u32); #[automatically_derived] impl ::core::clone::Clone for NonCopy { @@ -431,7 +431,7 @@ impl ::core::clone::Clone for NonCopy { } // A packed struct that doesn't impl `Copy`, which means it gets the non-simple -// `clone` implemention that clones the fields individually. +// `clone` implementation that clones the fields individually. #[repr(packed)] struct PackedNonCopy(u32); #[automatically_derived] @@ -443,7 +443,7 @@ impl ::core::clone::Clone for PackedNonCopy { } // A struct that impls `Copy` manually, which means it gets the non-simple -// `clone` implemention that clones the fields individually. +// `clone` implementation that clones the fields individually. struct ManualCopy(u32); #[automatically_derived] impl ::core::clone::Clone for ManualCopy { @@ -455,7 +455,7 @@ impl ::core::clone::Clone for ManualCopy { impl Copy for ManualCopy {} // A packed struct that impls `Copy` manually, which means it gets the -// non-simple `clone` implemention that clones the fields individually. +// non-simple `clone` implementation that clones the fields individually. #[repr(packed)] struct PackedManualCopy(u32); #[automatically_derived] diff --git a/tests/ui/drop/dropck_legal_cycles.rs b/tests/ui/drop/dropck_legal_cycles.rs index 6a0fe7784fbcc..f2d6560bbab83 100644 --- a/tests/ui/drop/dropck_legal_cycles.rs +++ b/tests/ui/drop/dropck_legal_cycles.rs @@ -48,7 +48,7 @@ // // 2. every node provides a method to visit its children // -// 3. a traversal attmepts to visit the nodes of the graph and prove that +// 3. a traversal attempts to visit the nodes of the graph and prove that // it sees the same node twice. It does this by setting the mark of each // node to a fresh non-zero value, and if it sees the current mark, it // "knows" that it must have found a cycle, and stops attempting further @@ -415,7 +415,7 @@ pub fn main() { if PRINT { println!(); } - // Cycle 14: { arc0 -> (arc1, arc2), arc1 -> (), arc2 -> arc0 }, mutexs + // Cycle 14: { arc0 -> (arc1, arc2), arc1 -> (), arc2 -> arc0 }, mutexes let (arc0, arc1, arc2): (ARCM, ARCM, ARCM); arc0 = ARCM::new("arcm0"); arc1 = ARCM::new("arcm1"); diff --git a/tests/ui/drop/issue-48962.rs b/tests/ui/drop/issue-48962.rs index 80d815379bec2..b12d8f62c0a32 100644 --- a/tests/ui/drop/issue-48962.rs +++ b/tests/ui/drop/issue-48962.rs @@ -15,7 +15,7 @@ impl Drop for Dropee { } } -fn add_sentintel() { +fn add_sentinel() { unsafe { ORDER[INDEX] = 2; INDEX = INDEX + 1; @@ -25,7 +25,7 @@ fn add_sentintel() { fn main() { let mut x = Box::new(Dropee(1)); *x; // move out from `*x` - add_sentintel(); + add_sentinel(); *x = Dropee(3); // re-initialize `*x` {x}; // drop value unsafe { diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs b/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs index f2762ad421ba5..57c60f35a9c96 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs @@ -1,7 +1,7 @@ // Issue #90528: provide helpful suggestions when a trait bound is unsatisfied // due to a missed unsizing coercion. // -// This test exercises array variables and a trait implemented on immmutable slices. +// This test exercises array variables and a trait implemented on immutable slices. trait Read {} diff --git a/tests/ui/error-codes/E0026-teach.stderr b/tests/ui/error-codes/E0026-teach.stderr index 1a80edcbbe269..3d460490eb3f5 100644 --- a/tests/ui/error-codes/E0026-teach.stderr +++ b/tests/ui/error-codes/E0026-teach.stderr @@ -4,7 +4,7 @@ error[E0026]: struct `Thing` does not have a field named `z` LL | Thing { x, y, z } => {} | ^ struct `Thing` does not have this field | - = note: This error indicates that a struct pattern attempted to extract a non-existent field from a struct. Struct fields are identified by the name used before the colon : so struct patterns should resemble the declaration of the struct type being matched. + = note: This error indicates that a struct pattern attempted to extract a nonexistent field from a struct. Struct fields are identified by the name used before the colon : so struct patterns should resemble the declaration of the struct type being matched. If you are using shorthand field patterns but want to refer to the struct field by a different name, you should rename it explicitly. diff --git a/tests/ui/expr/if/expr-if.rs b/tests/ui/expr/if/expr-if.rs index 2b8474ff4539f..74cc2fcaa23c9 100644 --- a/tests/ui/expr/if/expr-if.rs +++ b/tests/ui/expr/if/expr-if.rs @@ -23,7 +23,7 @@ fn test_elseif3() { assert!((rs)); } -fn test_inferrence() { +fn test_inference() { let rs = if true { true } else { false }; assert!((rs)); } @@ -46,7 +46,7 @@ pub fn main() { test_elseif1(); test_elseif2(); test_elseif3(); - test_inferrence(); + test_inference(); test_if_as_if_condition(); test_if_as_block_result(); } diff --git a/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs b/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs index de00bc4cbac07..5e0322e0d76b6 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-macro_escape.rs @@ -1,5 +1,5 @@ // Testing that crate-level `#![macro_escape]` is not gated beyond a -// depecation warning. This file sits on its own, because crate-level +// deprecation warning. This file sits on its own, because crate-level // `#![macro_escape]` is incompatible with crate-level `#![macro_use]` // already present in issue-43106-gating-of-builtin-attrs. diff --git a/tests/ui/for/for-expn.rs b/tests/ui/for/for-expn.rs index b9c4bbedac9f7..1104bde962728 100644 --- a/tests/ui/for/for-expn.rs +++ b/tests/ui/for/for-expn.rs @@ -1,4 +1,4 @@ -// Test that an error on a sub-expresson in a for loop has the correct span. +// Test that an error on a sub-expression in a for loop has the correct span. fn main() { // Odd formatting to make sure we get the right span. diff --git a/tests/ui/generator/issue-53548.rs b/tests/ui/generator/issue-53548.rs index 3ebabb914622c..f9163edf35759 100644 --- a/tests/ui/generator/issue-53548.rs +++ b/tests/ui/generator/issue-53548.rs @@ -2,13 +2,13 @@ // expanded to `Box`, but the generator "witness" // that results is `for<'r> { Box }`. The WF code was // encountering an ICE (when debug-assertions were enabled) and an -// unexpected compilation error (without debug-asserions) when trying +// unexpected compilation error (without debug-assertions) when trying // to process this `'r` region bound. In particular, to be WF, the // region bound must meet the requirements of the trait, and hence we // got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` -// constructor we were using was assering that no higher-ranked +// constructor we were using was asserting that no higher-ranked // regions were involved (because the WF code is supposed to skip -// those). The error (if debug-asserions were disabled) came because +// those). The error (if debug-assertions were disabled) came because // we obviously cannot prove that `'r: 'static` for any region `'r`. // Pursuant with our "lazy WF" strategy for higher-ranked regions, the // fix is not to require that `for<'r> { 'r: 'static }` holds (this is diff --git a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs index f1e779fcb0063..44ee530342114 100644 --- a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs +++ b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs @@ -21,7 +21,7 @@ fn main() { // Do we indeed point to the samme memory? assert!(s.as_ptr() == copy.as_ptr()); - // Any use of `copy` is certeinly UB after this + // Any use of `copy` is certainly UB after this drop(s); // UB UB UB UB UB!! diff --git a/tests/ui/generic-associated-types/parameter_number_and_kind_impl.rs b/tests/ui/generic-associated-types/parameter_number_and_kind_impl.rs index c1381025ac2a8..b93428ac9a21a 100644 --- a/tests/ui/generic-associated-types/parameter_number_and_kind_impl.rs +++ b/tests/ui/generic-associated-types/parameter_number_and_kind_impl.rs @@ -1,6 +1,6 @@ #![feature(associated_type_defaults)] -// FIXME(#44265) add tests for type-generic and const-genertic associated types. +// FIXME(#44265) add tests for type-generic and const-generic associated types. trait Foo { type A<'a>; diff --git a/tests/ui/generic-associated-types/self-outlives-lint.rs b/tests/ui/generic-associated-types/self-outlives-lint.rs index 673891fc3d1b4..0ea81b5aecb9e 100644 --- a/tests/ui/generic-associated-types/self-outlives-lint.rs +++ b/tests/ui/generic-associated-types/self-outlives-lint.rs @@ -189,7 +189,7 @@ trait MultipleMethods { } // We would normally require `Self: 'a`, but we can prove that `Self: 'static` -// because of the the bounds on the trait, so the bound is proven +// because of the bounds on the trait, so the bound is proven trait Trait: 'static { type Assoc<'a>; fn make_assoc(_: &u32) -> Self::Assoc<'_>; diff --git a/tests/ui/higher-rank-trait-bounds/issue-30786.rs b/tests/ui/higher-rank-trait-bounds/issue-30786.rs index 4a6399c8f6246..f809122646632 100644 --- a/tests/ui/higher-rank-trait-bounds/issue-30786.rs +++ b/tests/ui/higher-rank-trait-bounds/issue-30786.rs @@ -114,7 +114,7 @@ fn variant1() { // signature. // // Why *exactly* we opt for this signature is a bit unclear to me, - // we deduce it somehow from a reuqirement that `Map: Stream` I + // we deduce it somehow from a requirement that `Map: Stream` I // guess. let map = source.mapx(|x: &_| x); let filter = map.filterx(|x: &_| true); diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs b/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs index 623237763100d..968ce12f88cf5 100644 --- a/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs +++ b/tests/ui/impl-trait/in-trait/default-body-type-err-2.rs @@ -6,7 +6,7 @@ #![feature(async_fn_in_trait)] pub trait Foo { - async fn woopsie_async(&self) -> String { + async fn whoopsie_async(&self) -> String { 42 //~^ ERROR mismatched types } diff --git a/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs index 5407fb6dd2804..e0f7082109ce2 100644 --- a/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs +++ b/tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs @@ -5,7 +5,7 @@ trait X<'x>: Sized {} impl X<'_> for U {} -fn multiple_lifeteimes<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl X<'b> + 'a { +fn multiple_lifetimes<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl X<'b> + 'a { x } diff --git a/tests/ui/impl-trait/static-return-lifetime-infered.rs b/tests/ui/impl-trait/static-return-lifetime-inferred.rs similarity index 100% rename from tests/ui/impl-trait/static-return-lifetime-infered.rs rename to tests/ui/impl-trait/static-return-lifetime-inferred.rs diff --git a/tests/ui/impl-trait/static-return-lifetime-infered.stderr b/tests/ui/impl-trait/static-return-lifetime-inferred.stderr similarity index 100% rename from tests/ui/impl-trait/static-return-lifetime-infered.stderr rename to tests/ui/impl-trait/static-return-lifetime-inferred.stderr diff --git a/tests/ui/imports/import-glob-1.rs b/tests/ui/imports/import-glob-1.rs index fcc0b63f101dc..2e95b0c1fe3d4 100644 --- a/tests/ui/imports/import-glob-1.rs +++ b/tests/ui/imports/import-glob-1.rs @@ -2,7 +2,7 @@ #![allow(dead_code)] #![allow(unused_imports)] // This should resolve fine. Prior to fix, the last import -// was being tried too early, and marked as unrsolved before +// was being tried too early, and marked as unresolved before // the glob import had a chance to be resolved. mod bar { diff --git a/tests/ui/imports/issue-53269.rs b/tests/ui/imports/issue-53269.rs index 1031d507101de..258af7a1f081c 100644 --- a/tests/ui/imports/issue-53269.rs +++ b/tests/ui/imports/issue-53269.rs @@ -1,4 +1,4 @@ -// Ambiguity between a `macro_rules` macro and a non-existent import recovered as `Res::Err` +// Ambiguity between a `macro_rules` macro and a nonexistent import recovered as `Res::Err` macro_rules! mac { () => () } diff --git a/tests/ui/imports/issue-53512.rs b/tests/ui/imports/issue-53512.rs index 67470f854cedf..1303f2d3c5268 100644 --- a/tests/ui/imports/issue-53512.rs +++ b/tests/ui/imports/issue-53512.rs @@ -1,4 +1,4 @@ -// Macro from prelude is shadowed by non-existent import recovered as `Res::Err`. +// Macro from prelude is shadowed by nonexistent import recovered as `Res::Err`. mod m {} use m::assert; //~ ERROR unresolved import `m::assert` diff --git a/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.rs b/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.rs index 7f6758f47f8fe..3cdb488e7a545 100644 --- a/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.rs +++ b/tests/ui/inference/need_type_info/issue-107745-avoid-expr-from-macro-expansion.rs @@ -2,7 +2,7 @@ // Regression test for #107745. // Previously need_type_info::update_infer_source will consider expressions originating from -// macro expressions as candiate "previous sources". This unfortunately can mean that +// macro expressions as candidate "previous sources". This unfortunately can mean that // for macros expansions such as `format!()` internal implementation details can leak, such as: // // ``` diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.rs b/tests/ui/io-checks/inaccessible-temp-dir.rs similarity index 95% rename from tests/ui/io-checks/inaccessbile-temp-dir.rs rename to tests/ui/io-checks/inaccessible-temp-dir.rs index 9c0aa01357217..06b9936246e40 100644 --- a/tests/ui/io-checks/inaccessbile-temp-dir.rs +++ b/tests/ui/io-checks/inaccessible-temp-dir.rs @@ -6,7 +6,7 @@ // be an error; but not an ICE. // // However, some folks run tests as root, which can write `/dev/` and end -// up clobbering `/dev/null`. Instead we'll use a non-existent path, which +// up clobbering `/dev/null`. Instead we'll use a nonexistent path, which // also used to ICE, but even root can't magically write there. // compile-flags: -Z temps-dir=/does-not-exist/output diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.stderr b/tests/ui/io-checks/inaccessible-temp-dir.stderr similarity index 100% rename from tests/ui/io-checks/inaccessbile-temp-dir.stderr rename to tests/ui/io-checks/inaccessible-temp-dir.stderr diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs index 134e7d420e3ea..1c74dc11e3bfc 100644 --- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs +++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs @@ -6,7 +6,7 @@ // be an error; but not an ICE. // // However, some folks run tests as root, which can write `/dev/` and end -// up clobbering `/dev/null`. Instead we'll use a non-existent path, which +// up clobbering `/dev/null`. Instead we'll use a nonexistent path, which // also used to ICE, but even root can't magically write there. // compile-flags: -o /does-not-exist/output diff --git a/tests/ui/issues/issue-15094.rs b/tests/ui/issues/issue-15094.rs index cb27e2bcfb6c0..8a98d6cc13296 100644 --- a/tests/ui/issues/issue-15094.rs +++ b/tests/ui/issues/issue-15094.rs @@ -2,11 +2,11 @@ use std::{fmt, ops}; -struct Debuger { +struct Debugger { x: T } -impl ops::FnOnce<(),> for Debuger { +impl ops::FnOnce<(),> for Debugger { type Output = (); fn call_once(self, _args: ()) { //~^ ERROR `call_once` has an incompatible type for trait @@ -16,8 +16,8 @@ impl ops::FnOnce<(),> for Debuger { } } -fn make_shower(x: T) -> Debuger { - Debuger { x: x } +fn make_shower(x: T) -> Debugger { + Debugger { x: x } } pub fn main() { diff --git a/tests/ui/issues/issue-15094.stderr b/tests/ui/issues/issue-15094.stderr index b7c950892dc29..15f94888bd3b2 100644 --- a/tests/ui/issues/issue-15094.stderr +++ b/tests/ui/issues/issue-15094.stderr @@ -4,8 +4,8 @@ error[E0053]: method `call_once` has an incompatible type for trait LL | fn call_once(self, _args: ()) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected "rust-call" fn, found "Rust" fn | - = note: expected signature `extern "rust-call" fn(Debuger<_>, ())` - found signature `fn(Debuger<_>, ())` + = note: expected signature `extern "rust-call" fn(Debugger<_>, ())` + found signature `fn(Debugger<_>, ())` error: aborting due to previous error diff --git a/tests/ui/issues/issue-20427.rs b/tests/ui/issues/issue-20427.rs index cfd8b2191ac38..4772e398601a9 100644 --- a/tests/ui/issues/issue-20427.rs +++ b/tests/ui/issues/issue-20427.rs @@ -70,7 +70,7 @@ mod guard { use std::u8; // bring module u8 in scope fn f() -> u8 { // OK, resolves to primitive u8, not to std::u8 u8::max_value() // OK, resolves to associated function ::max_value, - // not to non-existent std::u8::max_value + // not to nonexistent std::u8::max_value } assert_eq!(f(), u8::MAX); // OK, resolves to std::u8::MAX } diff --git a/tests/ui/issues/issue-26905-rpass.rs b/tests/ui/issues/issue-26905-rpass.rs index 2d5827f476b9e..abc48e8e8b322 100644 --- a/tests/ui/issues/issue-26905-rpass.rs +++ b/tests/ui/issues/issue-26905-rpass.rs @@ -1,7 +1,7 @@ // run-pass #![feature(unsize, coerce_unsized)] -// Verfies that PhantomData is ignored for DST coercions +// Verifies that PhantomData is ignored for DST coercions use std::marker::{Unsize, PhantomData}; use std::ops::CoerceUnsized; diff --git a/tests/ui/issues/issue-26905.rs b/tests/ui/issues/issue-26905.rs index 4c5c67d58bc3d..03a4dca683388 100644 --- a/tests/ui/issues/issue-26905.rs +++ b/tests/ui/issues/issue-26905.rs @@ -1,6 +1,6 @@ #![feature(unsize, coerce_unsized)] -// Verfies that non-PhantomData ZSTs still cause coercions to fail. +// Verifies that non-PhantomData ZSTs still cause coercions to fail. // They might have additional semantics that we don't want to bulldoze. use std::marker::{Unsize, PhantomData}; diff --git a/tests/ui/issues/issue-50411.rs b/tests/ui/issues/issue-50411.rs index cd728b15256e9..e6d28e294870f 100644 --- a/tests/ui/issues/issue-50411.rs +++ b/tests/ui/issues/issue-50411.rs @@ -1,6 +1,6 @@ // Regression test for #50411: the MIR inliner was causing problems // here because it would inline promoted code (which had already had -// elaborate-drops invoked on it) and then try to elaboate drops a +// elaborate-drops invoked on it) and then try to elaborate drops a // second time. Uncool. // compile-flags:-Zmir-opt-level=4 diff --git a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs b/tests/ui/issues/issue-70093/issue-70093-link-directives.rs index 83f9b16c4086a..04182dd2170fa 100644 --- a/tests/ui/issues/issue-70093/issue-70093-link-directives.rs +++ b/tests/ui/issues/issue-70093/issue-70093-link-directives.rs @@ -4,7 +4,7 @@ // ignore-fuchsia - missing __libc_start_main for some reason (#84733) // ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling -#[link(name = "some-random-non-existent-library", kind = "static")] +#[link(name = "some-random-nonexistent-library", kind = "static")] extern "C" {} fn main() {} diff --git a/tests/ui/issues/issue-70093/issue-70093.rs b/tests/ui/issues/issue-70093/issue-70093.rs index 86459dc904a6e..ab6856b98f5fa 100644 --- a/tests/ui/issues/issue-70093/issue-70093.rs +++ b/tests/ui/issues/issue-70093/issue-70093.rs @@ -4,7 +4,7 @@ // ignore-fuchsia - missing __libc_start_main for some reason (#84733) // ignore-cross-compile - default-linker-libraries=yes doesn't play well with cross compiling -#[link(name = "some-random-non-existent-library", kind = "static")] +#[link(name = "some-random-nonexistent-library", kind = "static")] extern "C" {} fn main() {} diff --git a/tests/ui/issues/issue-75704.rs b/tests/ui/issues/issue-75704.rs index aed7ddbcb8c9c..cbff1f05ad4c2 100644 --- a/tests/ui/issues/issue-75704.rs +++ b/tests/ui/issues/issue-75704.rs @@ -1,4 +1,4 @@ -// Caused an infinite loop during SimlifyCfg MIR transform previously. +// Caused an infinite loop during SimplifyCfg MIR transform previously. // // build-pass diff --git a/tests/ui/lifetimes/fullwidth-ampersand.rs b/tests/ui/lifetimes/fullwidth-ampersand.rs index 7d8948bd844cf..7444567b6cad7 100644 --- a/tests/ui/lifetimes/fullwidth-ampersand.rs +++ b/tests/ui/lifetimes/fullwidth-ampersand.rs @@ -1,4 +1,4 @@ -// Verify that we do not ICE when the user uses a multubyte ampersand. +// Verify that we do not ICE when the user uses a multibyte ampersand. fn f(_: &&()) -> &() { todo!() } //~^ ERROR unknown start of token: \u{ff06} diff --git a/tests/ui/lifetimes/issue-77175.rs b/tests/ui/lifetimes/issue-77175.rs index 2282752b6c1fe..6a466ce9498d0 100644 --- a/tests/ui/lifetimes/issue-77175.rs +++ b/tests/ui/lifetimes/issue-77175.rs @@ -6,7 +6,7 @@ // once. This was obviously wrong since the lifetime is used twice: For the s3 // parameter and the return type. The issue was caused by the compiler // desugaring the async function into a generator that uses only a single -// lifetime, which then the validator complained about becauase of the +// lifetime, which then the validator complained about because of the // single_use_lifetimes constraints. async fn bar<'a>(s1: String, s2: &'_ str, s3: &'a str) -> &'a str { s3 diff --git a/tests/ui/lint/dead-code/unused-assoc-fns.rs b/tests/ui/lint/dead-code/unused-assoc-fns.rs index b111f4b9463c7..63b379e50c272 100644 --- a/tests/ui/lint/dead-code/unused-assoc-fns.rs +++ b/tests/ui/lint/dead-code/unused-assoc-fns.rs @@ -10,7 +10,7 @@ impl Foo { fn two(&self) {} - // seperation between items + // separation between items // ... // ... @@ -18,7 +18,7 @@ impl Foo { const CONSTANT: usize = 5; - // more seperation + // more separation // ... // ... diff --git a/tests/ui/lint/lint-level-macro-def.rs b/tests/ui/lint/lint-level-macro-def.rs index 720f4b453abf5..4c018aa1e50ab 100644 --- a/tests/ui/lint/lint-level-macro-def.rs +++ b/tests/ui/lint/lint-level-macro-def.rs @@ -1,4 +1,4 @@ -// Checks that you can set a lint level specficially for a macro definition. +// Checks that you can set a lint level specifically for a macro definition. // // This is a regression test for issue #59306. // diff --git a/tests/ui/lto/issue-105637.rs b/tests/ui/lto/issue-105637.rs index 0d9f0bec00fd3..e917d3347a4f3 100644 --- a/tests/ui/lto/issue-105637.rs +++ b/tests/ui/lto/issue-105637.rs @@ -3,7 +3,7 @@ // // That manifested as both `rustc_driver` and rustc's "main" (`compiler/rustc`) having their own // `std::panicking::HOOK` static, and the hook in rustc's main (the default stdlib's) being executed -// when rustc ICEs, instead of the overriden hook from `rustc_driver` (which also displays the query +// when rustc ICEs, instead of the overridden hook from `rustc_driver` (which also displays the query // stack and information on how to open a GH issue for the encountered ICE). // // In this test, we reproduce this setup by installing a panic hook in both the main and an LTOed diff --git a/tests/ui/macros/format-unused-lables.rs b/tests/ui/macros/format-unused-labels.rs similarity index 100% rename from tests/ui/macros/format-unused-lables.rs rename to tests/ui/macros/format-unused-labels.rs diff --git a/tests/ui/macros/format-unused-lables.stderr b/tests/ui/macros/format-unused-labels.stderr similarity index 90% rename from tests/ui/macros/format-unused-lables.stderr rename to tests/ui/macros/format-unused-labels.stderr index fad87fa2aeea8..f48e09f2b8544 100644 --- a/tests/ui/macros/format-unused-lables.stderr +++ b/tests/ui/macros/format-unused-labels.stderr @@ -1,5 +1,5 @@ error: multiple unused formatting arguments - --> $DIR/format-unused-lables.rs:2:22 + --> $DIR/format-unused-labels.rs:2:22 | LL | println!("Test", 123, 456, 789); | ------ ^^^ ^^^ ^^^ argument never used @@ -9,7 +9,7 @@ LL | println!("Test", 123, 456, 789); | multiple missing formatting specifiers error: multiple unused formatting arguments - --> $DIR/format-unused-lables.rs:6:9 + --> $DIR/format-unused-labels.rs:6:9 | LL | println!("Test2", | ------- multiple missing formatting specifiers @@ -21,7 +21,7 @@ LL | 789 | ^^^ argument never used error: named argument never used - --> $DIR/format-unused-lables.rs:11:35 + --> $DIR/format-unused-labels.rs:11:35 | LL | println!("Some stuff", UNUSED="args"); | ------------ ^^^^^^ named argument never used @@ -29,7 +29,7 @@ LL | println!("Some stuff", UNUSED="args"); | formatting specifier missing error: multiple unused formatting arguments - --> $DIR/format-unused-lables.rs:14:9 + --> $DIR/format-unused-labels.rs:14:9 | LL | println!("Some more $STUFF", | ------------------ diff --git a/tests/ui/macros/trace_faulty_macros.rs b/tests/ui/macros/trace_faulty_macros.rs index b2fdd2e196581..4f70fc1ba876c 100644 --- a/tests/ui/macros/trace_faulty_macros.rs +++ b/tests/ui/macros/trace_faulty_macros.rs @@ -31,7 +31,7 @@ fn main() { my_faulty_macro!(); my_recursive_macro!(); test!(); - non_exisiting!(); + nonexistent!(); derive!(Debug); let a = pat_macro!(); } diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.rs b/tests/ui/methods/method-not-found-generic-arg-elision.rs index 799ced5e9c460..4df15b5725a86 100644 --- a/tests/ui/methods/method-not-found-generic-arg-elision.rs +++ b/tests/ui/methods/method-not-found-generic-arg-elision.rs @@ -62,12 +62,12 @@ impl Other { } struct Struct { - _phatom: PhantomData, + _phantom: PhantomData, } impl Default for Struct { fn default() -> Self { - Self { _phatom: PhantomData } + Self { _phantom: PhantomData } } } diff --git a/tests/ui/mir/issue-101844.rs b/tests/ui/mir/issue-101844.rs index da8a25f5f822f..0299e19383a53 100644 --- a/tests/ui/mir/issue-101844.rs +++ b/tests/ui/mir/issue-101844.rs @@ -42,11 +42,11 @@ pub trait Extra { type Error; } -struct ImplShoulExist { +struct ImplShouldExist { _gen: (D, Req), } -impl ImplShoulExist +impl ImplShouldExist where D: FourthTrait, D::Item4: Extra, @@ -57,7 +57,7 @@ where } } -impl Extra for ImplShoulExist { +impl Extra for ImplShouldExist { type Error = (); } @@ -67,7 +67,7 @@ where MS::Item: Into<()>, { // Error: Apparently Balance::new doesn't exist during MIR validation - let _ = ImplShoulExist::::access_fn(ms); + let _ = ImplShouldExist::::access_fn(ms); } fn main() {} diff --git a/tests/ui/mismatched_types/issue-75361-mismatched-impl.rs b/tests/ui/mismatched_types/issue-75361-mismatched-impl.rs index 4410514476dc1..6522afdabd90b 100644 --- a/tests/ui/mismatched_types/issue-75361-mismatched-impl.rs +++ b/tests/ui/mismatched_types/issue-75361-mismatched-impl.rs @@ -1,4 +1,4 @@ -// Regresison test for issue #75361 +// Regression test for issue #75361 // Tests that we don't ICE on mismatched types with inference variables diff --git a/tests/ui/moves/move-guard-same-consts.rs b/tests/ui/moves/move-guard-same-consts.rs index b96ef8e19eb51..e9a13fa8d3543 100644 --- a/tests/ui/moves/move-guard-same-consts.rs +++ b/tests/ui/moves/move-guard-same-consts.rs @@ -1,9 +1,9 @@ -// #47295: We used to have a hack of special-casing adjacent amtch +// #47295: We used to have a hack of special-casing adjacent match // arms whose patterns were composed solely of constants to not have // them linked in the cfg. // // This was broken for various reasons. In particular, that hack was -// originally authored under the assunption that other checks +// originally authored under the assumption that other checks // elsewhere would ensure that the two patterns did not overlap. But // that assumption did not hold, at least not in the long run (namely, // overlapping patterns were turned into warnings rather than errors). diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs index 7ea97126f89c9..615e2661158d4 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs @@ -1,4 +1,4 @@ -// Variant of diverging-falllback-control-flow that tests +// Variant of diverging-fallback-control-flow that tests // the specific case of a free function with an unconstrained // return type. This captures the pattern we saw in the wild // in the objc crate, where changing the fallback from `!` to `()` diff --git a/tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs b/tests/ui/nll/closure-requirements/issue-58127-multiple-requirements.rs similarity index 100% rename from tests/ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs rename to tests/ui/nll/closure-requirements/issue-58127-multiple-requirements.rs diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs index afe6f10a52f08..15cc753b92233 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs @@ -30,7 +30,7 @@ fn case2() { let cell = Cell::new(&a); //~^ ERROR `a` does not live long enough - // As you can see in the stderr output, this closure propoagates a + // As you can see in the stderr output, this closure propagates a // requirement that `'a: 'static'. foo(cell, |cell_a, cell_x| { cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error diff --git a/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs b/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs index 55905850f0c97..43af6e10e1a2e 100644 --- a/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs +++ b/tests/ui/nll/closure-requirements/type-test-subject-opaque-2.rs @@ -1,4 +1,4 @@ -// Resgression test for #107516. +// Regression test for #107516. // check-pass fn iter1<'a: 'a>() -> impl Iterator { diff --git a/tests/ui/nll/generator-upvar-mutability.rs b/tests/ui/nll/generator-upvar-mutability.rs index c49ea15b82483..59ca308ff7b1c 100644 --- a/tests/ui/nll/generator-upvar-mutability.rs +++ b/tests/ui/nll/generator-upvar-mutability.rs @@ -1,4 +1,4 @@ -// Check that generators respect the muatability of their upvars. +// Check that generators respect the mutability of their upvars. #![feature(generators)] diff --git a/tests/ui/nll/match-on-borrowed.rs b/tests/ui/nll/match-on-borrowed.rs index 447dabeb47e59..f46a60ed8e670 100644 --- a/tests/ui/nll/match-on-borrowed.rs +++ b/tests/ui/nll/match-on-borrowed.rs @@ -67,7 +67,7 @@ fn indirect_enum_example(mut f: &mut E) { x; } -fn match_on_muatbly_borrowed_ref(mut p: &bool) { +fn match_on_mutably_borrowed_ref(mut p: &bool) { let r = &mut p; match *p { // OK, no access at all _ if false => (), diff --git a/tests/ui/nll/ty-outlives/issue-55756.rs b/tests/ui/nll/ty-outlives/issue-55756.rs index e1a3bc3c4ebc8..e40b60bad966d 100644 --- a/tests/ui/nll/ty-outlives/issue-55756.rs +++ b/tests/ui/nll/ty-outlives/issue-55756.rs @@ -2,7 +2,7 @@ // // In this test, the result of `self.callee` is a projection `>::Guard`. As it may contain a destructor, the dropck -// rules require that this type outlivess the scope of `state`. Unfortunately, +// rules require that this type outlives the scope of `state`. Unfortunately, // our region inference is not smart enough to figure out how to // translate a requirement like // diff --git a/tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs b/tests/ui/nll/user-annotations/issue-57731-ascribed-coupled-types.rs similarity index 100% rename from tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs rename to tests/ui/nll/user-annotations/issue-57731-ascribed-coupled-types.rs diff --git a/tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr b/tests/ui/nll/user-annotations/issue-57731-ascribed-coupled-types.stderr similarity index 86% rename from tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr rename to tests/ui/nll/user-annotations/issue-57731-ascribed-coupled-types.stderr index 8601691e88ad7..60e5a49912919 100644 --- a/tests/ui/nll/user-annotations/issue-57731-ascibed-coupled-types.stderr +++ b/tests/ui/nll/user-annotations/issue-57731-ascribed-coupled-types.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/issue-57731-ascibed-coupled-types.rs:17:5 + --> $DIR/issue-57731-ascribed-coupled-types.rs:17:5 | LL | fn coupled_wilds_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here @@ -8,7 +8,7 @@ LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough - --> $DIR/issue-57731-ascibed-coupled-types.rs:22:5 + --> $DIR/issue-57731-ascribed-coupled-types.rs:22:5 | LL | fn coupled_regions_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here @@ -17,7 +17,7 @@ LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough - --> $DIR/issue-57731-ascibed-coupled-types.rs:32:5 + --> $DIR/issue-57731-ascribed-coupled-types.rs:32:5 | LL | fn cast_coupled_wilds_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here @@ -26,7 +26,7 @@ LL | y | ^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough - --> $DIR/issue-57731-ascibed-coupled-types.rs:37:5 + --> $DIR/issue-57731-ascribed-coupled-types.rs:37:5 | LL | fn cast_coupled_regions_rhs<'a>(_x: &'a u32, s: &'static u32) -> &'static u32 { | -- lifetime `'a` defined here diff --git a/tests/ui/nll/user-annotations/normalization-infer.rs b/tests/ui/nll/user-annotations/normalization-infer.rs index 8bfc272d4ba09..58f174e34f93f 100644 --- a/tests/ui/nll/user-annotations/normalization-infer.rs +++ b/tests/ui/nll/user-annotations/normalization-infer.rs @@ -1,4 +1,4 @@ -// Annnotations may contain projection types with inference variables as input. +// Annotations may contain projection types with inference variables as input. // Make sure we don't get ambiguities when normalizing them. // check-fail diff --git a/tests/ui/numbers-arithmetic/shift-various-types.rs b/tests/ui/numbers-arithmetic/shift-various-types.rs index 473bda3d76e07..e5130a86da021 100644 --- a/tests/ui/numbers-arithmetic/shift-various-types.rs +++ b/tests/ui/numbers-arithmetic/shift-various-types.rs @@ -2,7 +2,7 @@ // Test that we can do shifts by any integral type. -struct Panolpy { +struct Panoply { i8: i8, i16: i16, i32: i32, @@ -16,7 +16,7 @@ struct Panolpy { usize: usize, } -fn foo(p: &Panolpy) { +fn foo(p: &Panoply) { assert_eq!(22 >> p.i8, 11); assert_eq!(22 >> p.i16, 11); assert_eq!(22 >> p.i32, 11); @@ -31,7 +31,7 @@ fn foo(p: &Panolpy) { } fn main() { - let p = Panolpy { + let p = Panoply { i8: 1, i16: 1, i32: 1, diff --git a/tests/ui/or-patterns/mix-with-wild.rs b/tests/ui/or-patterns/mix-with-wild.rs index d9911cda1b685..ab890bc95d76b 100644 --- a/tests/ui/or-patterns/mix-with-wild.rs +++ b/tests/ui/or-patterns/mix-with-wild.rs @@ -1,7 +1,7 @@ // Test that an or-pattern works with a wild pattern. This tests two things: // // 1) The Wild pattern should cause the pattern to always succeed. -// 2) or-patterns should work with simplifyable patterns. +// 2) or-patterns should work with simplifiable patterns. // run-pass diff --git a/tests/ui/overloaded/fixup-deref-mut.rs b/tests/ui/overloaded/fixup-deref-mut.rs index 6b2fd72b89553..691e631acbbd0 100644 --- a/tests/ui/overloaded/fixup-deref-mut.rs +++ b/tests/ui/overloaded/fixup-deref-mut.rs @@ -5,7 +5,7 @@ use std::ops::{Deref, DerefMut}; -// Generic unique/owned smaht pointer. +// Generic unique/owned smart pointer. struct Own { value: *mut T } diff --git a/tests/ui/parser/issue-103381.fixed b/tests/ui/parser/issue-103381.fixed index 6a9fb991097fb..6471e0a785037 100644 --- a/tests/ui/parser/issue-103381.fixed +++ b/tests/ui/parser/issue-103381.fixed @@ -37,7 +37,7 @@ fn should_ok_3() { if true && if true { true } else { false } {} } -fn shoule_match_ok() { +fn should_match_ok() { #[cfg(feature = "full")] { let a = 1; diff --git a/tests/ui/parser/issue-103381.rs b/tests/ui/parser/issue-103381.rs index bf79e10103e13..f7754e8e0b576 100644 --- a/tests/ui/parser/issue-103381.rs +++ b/tests/ui/parser/issue-103381.rs @@ -37,7 +37,7 @@ fn should_ok_3() { if true && if true { true } else { false } {} } -fn shoule_match_ok() { +fn should_match_ok() { #[cfg(feature = "full")] { let a = 1; diff --git a/tests/ui/parser/issues/issue-32446.rs b/tests/ui/parser/issues/issue-32446.rs index 53e519a72a5fd..31972aea7bd75 100644 --- a/tests/ui/parser/issues/issue-32446.rs +++ b/tests/ui/parser/issues/issue-32446.rs @@ -1,4 +1,4 @@ fn main() {} -// This used to end up in an infite loop trying to bump past EOF. +// This used to end up in an infinite loop trying to bump past EOF. trait T { ... } //~ ERROR diff --git a/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-enum.rs b/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-enum.rs index ef89e31d8429d..50a22e1e2f466 100644 --- a/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-enum.rs +++ b/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-enum.rs @@ -1,6 +1,6 @@ // check-pass -// Here we check that a `:vis` macro matcher subsititued for the empty visibility +// Here we check that a `:vis` macro matcher substituted for the empty visibility // (`VisibilityKind::Inherited`) is accepted when used before an enum variant. fn main() {} diff --git a/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-trait.rs b/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-trait.rs index b08767b210b06..809f7db610572 100644 --- a/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-trait.rs +++ b/tests/ui/parser/issues/issue-65041-empty-vis-matcher-in-trait.rs @@ -1,6 +1,6 @@ // check-pass -// Here we check that a `:vis` macro matcher subsititued for the empty visibility +// Here we check that a `:vis` macro matcher substituted for the empty visibility // (`VisibilityKind::Inherited`) is accepted when used before an item in a trait. fn main() {} diff --git a/tests/ui/parser/multibyte-char-use-seperator-issue-80134.rs b/tests/ui/parser/multibyte-char-use-separator-issue-80134.rs similarity index 100% rename from tests/ui/parser/multibyte-char-use-seperator-issue-80134.rs rename to tests/ui/parser/multibyte-char-use-separator-issue-80134.rs diff --git a/tests/ui/parser/multibyte-char-use-seperator-issue-80134.stderr b/tests/ui/parser/multibyte-char-use-separator-issue-80134.stderr similarity index 76% rename from tests/ui/parser/multibyte-char-use-seperator-issue-80134.stderr rename to tests/ui/parser/multibyte-char-use-separator-issue-80134.stderr index 21e71aa121560..394bf3d54ad4c 100644 --- a/tests/ui/parser/multibyte-char-use-seperator-issue-80134.stderr +++ b/tests/ui/parser/multibyte-char-use-separator-issue-80134.stderr @@ -1,5 +1,5 @@ error: expected one of `)`, `,`, `.`, `?`, or an operator, found `é` - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:4:8 + --> $DIR/multibyte-char-use-separator-issue-80134.rs:4:8 | LL | (()é); | ^ @@ -8,7 +8,7 @@ LL | (()é); | help: missing `,` error: expected one of `)`, `,`, `.`, `?`, or an operator, found `氷` - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:7:8 + --> $DIR/multibyte-char-use-separator-issue-80134.rs:7:8 | LL | (()氷); | -^ @@ -17,13 +17,13 @@ LL | (()氷); | help: missing `,` error[E0425]: cannot find value `é` in this scope - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:4:8 + --> $DIR/multibyte-char-use-separator-issue-80134.rs:4:8 | LL | (()é); | ^ not found in this scope error[E0425]: cannot find value `氷` in this scope - --> $DIR/multibyte-char-use-seperator-issue-80134.rs:7:8 + --> $DIR/multibyte-char-use-separator-issue-80134.rs:7:8 | LL | (()氷); | ^^ not found in this scope diff --git a/tests/ui/proc-macro/hygiene_example.rs b/tests/ui/proc-macro/hygiene_example.rs index 346ed1207cde5..a0b13461c341e 100644 --- a/tests/ui/proc-macro/hygiene_example.rs +++ b/tests/ui/proc-macro/hygiene_example.rs @@ -8,7 +8,7 @@ use hygiene_example::hello; fn main() { mod hygiene_example {} // no conflict with `extern crate hygiene_example;` from the proc macro macro_rules! format { () => {} } // does not interfere with `format!` from the proc macro - macro_rules! hello_helper { () => {} } // similarly does not intefere with the proc macro + macro_rules! hello_helper { () => {} } // similarly does not interfere with the proc macro let string = "world"; // no conflict with `string` from the proc macro hello!(string); diff --git a/tests/ui/proc-macro/span-absolute-posititions.rs b/tests/ui/proc-macro/span-absolute-positions.rs similarity index 100% rename from tests/ui/proc-macro/span-absolute-posititions.rs rename to tests/ui/proc-macro/span-absolute-positions.rs diff --git a/tests/ui/proc-macro/span-absolute-posititions.stderr b/tests/ui/proc-macro/span-absolute-positions.stderr similarity index 78% rename from tests/ui/proc-macro/span-absolute-posititions.stderr rename to tests/ui/proc-macro/span-absolute-positions.stderr index 6aca44a6b57a6..103bac933927b 100644 --- a/tests/ui/proc-macro/span-absolute-posititions.stderr +++ b/tests/ui/proc-macro/span-absolute-positions.stderr @@ -1,11 +1,11 @@ error: line/column mismatch: (0, 35) != (21, 35) - --> $DIR/span-absolute-posititions.rs:21:35 + --> $DIR/span-absolute-positions.rs:21:35 | LL | assert_span_pos::assert_span_pos!(0, 35); | ^ error: line/column mismatch: (22, 0) != (22, 35) - --> $DIR/span-absolute-posititions.rs:22:35 + --> $DIR/span-absolute-positions.rs:22:35 | LL | assert_span_pos::assert_span_pos!(22, 0); | ^^ diff --git a/tests/ui/proc-macro/subspan.rs b/tests/ui/proc-macro/subspan.rs index a4187f9e7c20c..8cf1bbdfd3132 100644 --- a/tests/ui/proc-macro/subspan.rs +++ b/tests/ui/proc-macro/subspan.rs @@ -21,6 +21,6 @@ subspan!("why I hide? hi!"); //~ ERROR found 'hi's subspan!("hey, hi, hidy, hidy, hi hi"); //~ ERROR found 'hi's subspan!("this is a hi, and this is another hi"); //~ ERROR found 'hi's subspan!("how are you this evening"); //~ ERROR found 'hi's -subspan!("this is highly eradic"); //~ ERROR found 'hi's +subspan!("this is highly erratic"); //~ ERROR found 'hi's fn main() { } diff --git a/tests/ui/proc-macro/subspan.stderr b/tests/ui/proc-macro/subspan.stderr index b5dacba0e37e0..064a305055159 100644 --- a/tests/ui/proc-macro/subspan.stderr +++ b/tests/ui/proc-macro/subspan.stderr @@ -92,13 +92,13 @@ LL | subspan!("how are you this evening"); error: found 'hi's --> $DIR/subspan.rs:24:1 | -LL | subspan!("this is highly eradic"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | subspan!("this is highly erratic"); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: here --> $DIR/subspan.rs:24:12 | -LL | subspan!("this is highly eradic"); +LL | subspan!("this is highly erratic"); | ^^ ^^ = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/reachable/expr_return_in_macro.rs b/tests/ui/reachable/expr_return_in_macro.rs index 4e57618bf5e77..cda5a357d6077 100644 --- a/tests/ui/reachable/expr_return_in_macro.rs +++ b/tests/ui/reachable/expr_return_in_macro.rs @@ -1,5 +1,5 @@ // Tests that we generate nice error messages -// when an expression is unreachble due to control +// when an expression is unreachable due to control // flow inside of a macro expansion. #![deny(unreachable_code)] diff --git a/tests/ui/regions/region-borrow-params-issue-29793-small.rs b/tests/ui/regions/region-borrow-params-issue-29793-small.rs index 5f1c2ed08f6b7..3b27d821603d1 100644 --- a/tests/ui/regions/region-borrow-params-issue-29793-small.rs +++ b/tests/ui/regions/region-borrow-params-issue-29793-small.rs @@ -12,7 +12,7 @@ fn escaping_borrow_of_closure_params_1() { return f; }; - // We delberately do not call `g`; this small version of the test, + // We deliberately do not call `g`; this small version of the test, // after adding such a call, was (properly) rejected even when the // system still suffered from issue #29793. diff --git a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.rs b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.rs index d364c467714ce..27c4e017d58e5 100644 --- a/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.rs +++ b/tests/ui/regions/region-lifetime-bounds-on-fns-where-clause.rs @@ -16,7 +16,7 @@ fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) { fn d() { // 'a and 'b are early bound in the function `a` because they appear - // inconstraints: + // in constraints: let _: fn(&mut &isize, &mut &isize) = a; //~^ ERROR mismatched types [E0308] } diff --git a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.rs b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.rs index 60dafdd528cf2..18b52cba1f435 100644 --- a/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.rs +++ b/tests/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.rs @@ -18,7 +18,7 @@ fn c<'a,'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) { fn d() { // 'a and 'b are early bound in the function `a` because they appear - // inconstraints: + // in constraints: let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; //~^ ERROR E0308 } diff --git a/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs b/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs index eb6e66818fc34..3219f63f5df9e 100644 --- a/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs +++ b/tests/ui/regions/regions-assoc-type-in-supertrait-outlives-container.rs @@ -1,7 +1,7 @@ // Test that we are imposing the requirement that every associated // type of a bound that appears in the where clause on a struct must // outlive the location in which the type appears, even when the -// associted type is in a supertype. Issue #22246. +// associated type is in a supertype. Issue #22246. #![allow(dead_code)] diff --git a/tests/ui/regions/regions-bounded-by-trait-requiring-static.rs b/tests/ui/regions/regions-bounded-by-trait-requiring-static.rs index 7d02a46193ef7..055b847b2457b 100644 --- a/tests/ui/regions/regions-bounded-by-trait-requiring-static.rs +++ b/tests/ui/regions/regions-bounded-by-trait-requiring-static.rs @@ -7,7 +7,7 @@ fn assert_send() { } // lifetime pointers with 'static lifetime are ok -fn static_lifime_ok<'a,T,U:Send>(_: &'a isize) { +fn static_lifetime_ok<'a,T,U:Send>(_: &'a isize) { assert_send::<&'static isize>(); assert_send::<&'static str>(); assert_send::<&'static [isize]>(); diff --git a/tests/ui/regions/regions-lifetime-bounds-on-fns.rs b/tests/ui/regions/regions-lifetime-bounds-on-fns.rs index 177f52fa72d55..3dbd42d64f5cb 100644 --- a/tests/ui/regions/regions-lifetime-bounds-on-fns.rs +++ b/tests/ui/regions/regions-lifetime-bounds-on-fns.rs @@ -16,7 +16,7 @@ fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) { fn d() { // 'a and 'b are early bound in the function `a` because they appear - // inconstraints: + // in constraints: let _: fn(&mut &isize, &mut &isize) = a; //~^ ERROR mismatched types [E0308] } diff --git a/tests/ui/resolve/editions-crate-root-2015.rs b/tests/ui/resolve/editions-crate-root-2015.rs index 4c890e3ae6994..37d73bb9ae83f 100644 --- a/tests/ui/resolve/editions-crate-root-2015.rs +++ b/tests/ui/resolve/editions-crate-root-2015.rs @@ -1,18 +1,18 @@ // edition:2015 mod inner { - fn global_inner(_: ::nonexistant::Foo) { - //~^ ERROR failed to resolve: maybe a missing crate `nonexistant`? + fn global_inner(_: ::nonexistent::Foo) { + //~^ ERROR failed to resolve: maybe a missing crate `nonexistent`? } - fn crate_inner(_: crate::nonexistant::Foo) { - //~^ ERROR failed to resolve: maybe a missing crate `nonexistant`? + fn crate_inner(_: crate::nonexistent::Foo) { + //~^ ERROR failed to resolve: maybe a missing crate `nonexistent`? } - fn bare_global(_: ::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + fn bare_global(_: ::nonexistent) { + //~^ ERROR cannot find type `nonexistent` in the crate root } - fn bare_crate(_: crate::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + fn bare_crate(_: crate::nonexistent) { + //~^ ERROR cannot find type `nonexistent` in the crate root } } diff --git a/tests/ui/resolve/editions-crate-root-2015.stderr b/tests/ui/resolve/editions-crate-root-2015.stderr index 00cdd0c58f4ec..46361ca9ffd68 100644 --- a/tests/ui/resolve/editions-crate-root-2015.stderr +++ b/tests/ui/resolve/editions-crate-root-2015.stderr @@ -1,29 +1,29 @@ -error[E0433]: failed to resolve: maybe a missing crate `nonexistant`? +error[E0433]: failed to resolve: maybe a missing crate `nonexistent`? --> $DIR/editions-crate-root-2015.rs:4:26 | -LL | fn global_inner(_: ::nonexistant::Foo) { - | ^^^^^^^^^^^ maybe a missing crate `nonexistant`? +LL | fn global_inner(_: ::nonexistent::Foo) { + | ^^^^^^^^^^^ maybe a missing crate `nonexistent`? | - = help: consider adding `extern crate nonexistant` to use the `nonexistant` crate + = help: consider adding `extern crate nonexistent` to use the `nonexistent` crate -error[E0433]: failed to resolve: maybe a missing crate `nonexistant`? +error[E0433]: failed to resolve: maybe a missing crate `nonexistent`? --> $DIR/editions-crate-root-2015.rs:7:30 | -LL | fn crate_inner(_: crate::nonexistant::Foo) { - | ^^^^^^^^^^^ maybe a missing crate `nonexistant`? +LL | fn crate_inner(_: crate::nonexistent::Foo) { + | ^^^^^^^^^^^ maybe a missing crate `nonexistent`? | - = help: consider adding `extern crate nonexistant` to use the `nonexistant` crate + = help: consider adding `extern crate nonexistent` to use the `nonexistent` crate -error[E0412]: cannot find type `nonexistant` in the crate root +error[E0412]: cannot find type `nonexistent` in the crate root --> $DIR/editions-crate-root-2015.rs:11:25 | -LL | fn bare_global(_: ::nonexistant) { +LL | fn bare_global(_: ::nonexistent) { | ^^^^^^^^^^^ not found in the crate root -error[E0412]: cannot find type `nonexistant` in the crate root +error[E0412]: cannot find type `nonexistent` in the crate root --> $DIR/editions-crate-root-2015.rs:14:29 | -LL | fn bare_crate(_: crate::nonexistant) { +LL | fn bare_crate(_: crate::nonexistent) { | ^^^^^^^^^^^ not found in the crate root error: aborting due to 4 previous errors diff --git a/tests/ui/resolve/editions-crate-root-2018.rs b/tests/ui/resolve/editions-crate-root-2018.rs index 61e4329bbb347..c903bbfc5cafa 100644 --- a/tests/ui/resolve/editions-crate-root-2018.rs +++ b/tests/ui/resolve/editions-crate-root-2018.rs @@ -1,18 +1,18 @@ // edition:2018 mod inner { - fn global_inner(_: ::nonexistant::Foo) { - //~^ ERROR failed to resolve: could not find `nonexistant` in the list of imported crates + fn global_inner(_: ::nonexistent::Foo) { + //~^ ERROR failed to resolve: could not find `nonexistent` in the list of imported crates } - fn crate_inner(_: crate::nonexistant::Foo) { - //~^ ERROR failed to resolve: could not find `nonexistant` in the crate root + fn crate_inner(_: crate::nonexistent::Foo) { + //~^ ERROR failed to resolve: could not find `nonexistent` in the crate root } - fn bare_global(_: ::nonexistant) { - //~^ ERROR cannot find crate `nonexistant` in the list of imported crates + fn bare_global(_: ::nonexistent) { + //~^ ERROR cannot find crate `nonexistent` in the list of imported crates } - fn bare_crate(_: crate::nonexistant) { - //~^ ERROR cannot find type `nonexistant` in the crate root + fn bare_crate(_: crate::nonexistent) { + //~^ ERROR cannot find type `nonexistent` in the crate root } } diff --git a/tests/ui/resolve/editions-crate-root-2018.stderr b/tests/ui/resolve/editions-crate-root-2018.stderr index 967a5a2fca155..61b88f8bb9caa 100644 --- a/tests/ui/resolve/editions-crate-root-2018.stderr +++ b/tests/ui/resolve/editions-crate-root-2018.stderr @@ -1,25 +1,25 @@ -error[E0433]: failed to resolve: could not find `nonexistant` in the list of imported crates +error[E0433]: failed to resolve: could not find `nonexistent` in the list of imported crates --> $DIR/editions-crate-root-2018.rs:4:26 | -LL | fn global_inner(_: ::nonexistant::Foo) { - | ^^^^^^^^^^^ could not find `nonexistant` in the list of imported crates +LL | fn global_inner(_: ::nonexistent::Foo) { + | ^^^^^^^^^^^ could not find `nonexistent` in the list of imported crates -error[E0433]: failed to resolve: could not find `nonexistant` in the crate root +error[E0433]: failed to resolve: could not find `nonexistent` in the crate root --> $DIR/editions-crate-root-2018.rs:7:30 | -LL | fn crate_inner(_: crate::nonexistant::Foo) { - | ^^^^^^^^^^^ could not find `nonexistant` in the crate root +LL | fn crate_inner(_: crate::nonexistent::Foo) { + | ^^^^^^^^^^^ could not find `nonexistent` in the crate root -error[E0412]: cannot find crate `nonexistant` in the list of imported crates +error[E0412]: cannot find crate `nonexistent` in the list of imported crates --> $DIR/editions-crate-root-2018.rs:11:25 | -LL | fn bare_global(_: ::nonexistant) { +LL | fn bare_global(_: ::nonexistent) { | ^^^^^^^^^^^ not found in the list of imported crates -error[E0412]: cannot find type `nonexistant` in the crate root +error[E0412]: cannot find type `nonexistent` in the crate root --> $DIR/editions-crate-root-2018.rs:14:29 | -LL | fn bare_crate(_: crate::nonexistant) { +LL | fn bare_crate(_: crate::nonexistent) { | ^^^^^^^^^^^ not found in the crate root error: aborting due to 4 previous errors diff --git a/tests/ui/resolve/levenshtein.rs b/tests/ui/resolve/levenshtein.rs index a6f4716256881..0e0f0cf4a2e9d 100644 --- a/tests/ui/resolve/levenshtein.rs +++ b/tests/ui/resolve/levenshtein.rs @@ -9,7 +9,7 @@ enum Bar { } type A = Baz; // Misspelled type name. //~^ ERROR cannot find -type B = Opiton; // Misspelled type name from the prelude. +type B = Option_; // Misspelled type name from the prelude. //~^ ERROR cannot find mod m { diff --git a/tests/ui/resolve/levenshtein.stderr b/tests/ui/resolve/levenshtein.stderr index cf478210132ed..f4674e2d7ce89 100644 --- a/tests/ui/resolve/levenshtein.stderr +++ b/tests/ui/resolve/levenshtein.stderr @@ -13,11 +13,11 @@ LL | LL | type A = Baz; // Misspelled type name. | ^^^ help: an enum with a similar name exists: `Bar` -error[E0412]: cannot find type `Opiton` in this scope +error[E0412]: cannot find type `Option_` in this scope --> $DIR/levenshtein.rs:12:10 | -LL | type B = Opiton; // Misspelled type name from the prelude. - | ^^^^^^ help: an enum with a similar name exists: `Option` +LL | type B = Option_; // Misspelled type name from the prelude. + | ^^^^^^^ help: an enum with a similar name exists: `Option` --> $SRC_DIR/core/src/option.rs:LL:COL | = note: similarly named enum `Option` defined here diff --git a/tests/ui/resolve/missing-in-namespace.rs b/tests/ui/resolve/missing-in-namespace.rs index e1dedb072b77b..bde20f30969dc 100644 --- a/tests/ui/resolve/missing-in-namespace.rs +++ b/tests/ui/resolve/missing-in-namespace.rs @@ -1,4 +1,4 @@ fn main() { - let _map = std::hahmap::HashMap::new(); - //~^ ERROR failed to resolve: could not find `hahmap` in `std + let _map = std::hashmap_::HashMap::new(); + //~^ ERROR failed to resolve: could not find `hashmap_` in `std } diff --git a/tests/ui/resolve/missing-in-namespace.stderr b/tests/ui/resolve/missing-in-namespace.stderr index 7a7b749aebb7b..885ae5586a9c0 100644 --- a/tests/ui/resolve/missing-in-namespace.stderr +++ b/tests/ui/resolve/missing-in-namespace.stderr @@ -1,8 +1,8 @@ -error[E0433]: failed to resolve: could not find `hahmap` in `std` +error[E0433]: failed to resolve: could not find `hashmap_` in `std` --> $DIR/missing-in-namespace.rs:2:21 | -LL | let _map = std::hahmap::HashMap::new(); - | ^^^^^^ could not find `hahmap` in `std` +LL | let _map = std::hashmap_::HashMap::new(); + | ^^^^^^^^ could not find `hashmap_` in `std` | help: consider importing this struct | @@ -10,7 +10,7 @@ LL + use std::collections::HashMap; | help: if you import `HashMap`, refer to it directly | -LL - let _map = std::hahmap::HashMap::new(); +LL - let _map = std::hashmap_::HashMap::new(); LL + let _map = HashMap::new(); | diff --git a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs index ecd3f58811904..7f899d1f31feb 100644 --- a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs +++ b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs @@ -3,15 +3,15 @@ struct A { } impl A { - fn new(cofig: String) -> Self { + fn new(config_: String) -> Self { Self { config } //~ Error cannot find value `config` in this scope } - fn do_something(cofig: String) { + fn do_something(config_: String) { println!("{config}"); //~ Error cannot find value `config` in this scope } - fn self_is_available(self, cofig: String) { + fn self_is_available(self, config_: String) { println!("{config}"); //~ Error cannot find value `config` in this scope } } diff --git a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr index f32e0404e46cb..273149c66788e 100644 --- a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr +++ b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr @@ -5,7 +5,7 @@ LL | Self { config } | ^^^^^^ | | | a field by this name exists in `Self` - | help: a local variable with a similar name exists: `cofig` + | help: a local variable with a similar name exists: `config_` error[E0425]: cannot find value `config` in this scope --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:11:20 @@ -14,7 +14,7 @@ LL | println!("{config}"); | ^^^^^^ | | | a field by this name exists in `Self` - | help: a local variable with a similar name exists: `cofig` + | help: a local variable with a similar name exists: `config_` error[E0425]: cannot find value `config` in this scope --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:15:20 @@ -28,8 +28,8 @@ LL | println!("{self.config}"); | ~~~~~~~~~~~ help: a local variable with a similar name exists | -LL | println!("{cofig}"); - | ~~~~~ +LL | println!("{config_}"); + | ~~~~~~~ error[E0425]: cannot find value `bah` in this scope --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:33:9 diff --git a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs index 1914e15549307..8bdce4ae5a62f 100644 --- a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs +++ b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-embedded.rs @@ -1,4 +1,4 @@ -// Test explores how `#[structral_match]` behaves in tandem with +// Test explores how `#[structural_match]` behaves in tandem with // `*const` and `*mut` pointers. // run-pass diff --git a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs index e713b003b0059..e3af045b54a1b 100644 --- a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs +++ b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-direct-unsafe-ptr-param.rs @@ -1,4 +1,4 @@ -// Test explores how `#[structral_match]` behaves in tandem with +// Test explores how `#[structural_match]` behaves in tandem with // `*const` and `*mut` pointers. // run-pass diff --git a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs index 04da14c54194a..03acf6e6c4818 100644 --- a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs +++ b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-embedded.rs @@ -1,4 +1,4 @@ -// Test explores how `#[structral_match]` behaves in tandem with +// Test explores how `#[structural_match]` behaves in tandem with // `*const` and `*mut` pointers. // run-pass diff --git a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs index 8313c25e7538d..8791ab31ab795 100644 --- a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs +++ b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-hide-behind-indirect-unsafe-ptr-param.rs @@ -1,4 +1,4 @@ -// Test explores how `#[structral_match]` behaves in tandem with +// Test explores how `#[structural_match]` behaves in tandem with // `*const` and `*mut` pointers. // run-pass diff --git a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs index dca8aaef1500d..c74f23ed49e0b 100644 --- a/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs +++ b/tests/ui/rfc-1445-restrict-constants-in-patterns/allow-use-behind-cousin-variant.rs @@ -3,7 +3,7 @@ // any such variant. // NOTE: for now, deliberately leaving the lint `indirect_structural_match` set -// to its default, so that we will not issue a diangostic even if +// to its default, so that we will not issue a diagnostic even if // rust-lang/rust#62614 remains an open issue. // run-pass diff --git a/tests/ui/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs b/tests/ui/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs index 2a915d61e3d90..d2684084fe991 100644 --- a/tests/ui/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs +++ b/tests/ui/rfc-1445-restrict-constants-in-patterns/issue-61188-match-slice-forbidden-without-eq.rs @@ -1,6 +1,6 @@ // Issue 61188 pointed out a case where we hit an ICE during code gen: // the compiler assumed that `PartialEq` was always implemented on any -// use of a `const` item in a pattern context, but the pre-existing +// use of a `const` item in a pattern context, but the preexisting // structural-match checking was too shallow // (see rust-lang/rust#62307), and so we hit cases where we were // trying to dispatch to `PartialEq` on types that did not implement diff --git a/tests/ui/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs b/tests/ui/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs index 7ba0f3a9e8dd9..df029083b8bd9 100644 --- a/tests/ui/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs +++ b/tests/ui/rfc-1445-restrict-constants-in-patterns/match-empty-array-allowed-without-eq-issue-62336.rs @@ -1,4 +1,4 @@ -// Pre-existing behavior has been to reject patterns with consts +// Preexisting behavior has been to reject patterns with consts // denoting non-empty arrays of non-`Eq` types, but *accept* empty // arrays of such types. // diff --git a/tests/ui/rfc-2093-infer-outlives/privacy.rs b/tests/ui/rfc-2093-infer-outlives/privacy.rs index 180f5ac6cdc46..293416355dc79 100644 --- a/tests/ui/rfc-2093-infer-outlives/privacy.rs +++ b/tests/ui/rfc-2093-infer-outlives/privacy.rs @@ -1,5 +1,5 @@ // Test that we do not get a privacy error here. Initially, we did, -// because we inferred an outlives predciate of ` as +// because we inferred an outlives predicate of ` as // Private>::Out: 'a`, but the private trait is -- well -- private, // and hence it was not something that a pub trait could refer to. // diff --git a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-1.rs b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-1.rs similarity index 100% rename from tests/ui/rfc-2126-extern-absolute-paths/non-existent-1.rs rename to tests/ui/rfc-2126-extern-absolute-paths/nonexistent-1.rs diff --git a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-1.stderr b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-1.stderr similarity index 87% rename from tests/ui/rfc-2126-extern-absolute-paths/non-existent-1.stderr rename to tests/ui/rfc-2126-extern-absolute-paths/nonexistent-1.stderr index 81891572179b0..176bdf1e67716 100644 --- a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-1.stderr +++ b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-1.stderr @@ -1,5 +1,5 @@ error[E0432]: unresolved import `xcrate` - --> $DIR/non-existent-1.rs:3:5 + --> $DIR/nonexistent-1.rs:3:5 | LL | use xcrate::S; | ^^^^^^ use of undeclared crate or module `xcrate` diff --git a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-2.rs b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-2.rs similarity index 100% rename from tests/ui/rfc-2126-extern-absolute-paths/non-existent-2.rs rename to tests/ui/rfc-2126-extern-absolute-paths/nonexistent-2.rs diff --git a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-2.stderr b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-2.stderr similarity index 90% rename from tests/ui/rfc-2126-extern-absolute-paths/non-existent-2.stderr rename to tests/ui/rfc-2126-extern-absolute-paths/nonexistent-2.stderr index 7df4f06d1c7e5..9285023c1272e 100644 --- a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-2.stderr +++ b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-2.stderr @@ -1,5 +1,5 @@ error[E0433]: failed to resolve: could not find `xcrate` in the list of imported crates - --> $DIR/non-existent-2.rs:4:15 + --> $DIR/nonexistent-2.rs:4:15 | LL | let s = ::xcrate::S; | ^^^^^^ could not find `xcrate` in the list of imported crates diff --git a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-3.rs b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-3.rs similarity index 100% rename from tests/ui/rfc-2126-extern-absolute-paths/non-existent-3.rs rename to tests/ui/rfc-2126-extern-absolute-paths/nonexistent-3.rs diff --git a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-3.stderr similarity index 86% rename from tests/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr rename to tests/ui/rfc-2126-extern-absolute-paths/nonexistent-3.stderr index bd6778cf3d63d..8531c58a7cd12 100644 --- a/tests/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr +++ b/tests/ui/rfc-2126-extern-absolute-paths/nonexistent-3.stderr @@ -1,5 +1,5 @@ error[E0432]: unresolved import `ycrate` - --> $DIR/non-existent-3.rs:3:5 + --> $DIR/nonexistent-3.rs:3:5 | LL | use ycrate; | ^^^^^^ no external crate `ycrate` diff --git a/tests/ui/rfc-2497-if-let-chains/no-double-assigments.rs b/tests/ui/rfc-2497-if-let-chains/no-double-assignments.rs similarity index 100% rename from tests/ui/rfc-2497-if-let-chains/no-double-assigments.rs rename to tests/ui/rfc-2497-if-let-chains/no-double-assignments.rs diff --git a/tests/ui/rfcs/rfc1623.rs b/tests/ui/rfcs/rfc1623.rs index adaf25c6bbff4..6cf5362030e1f 100644 --- a/tests/ui/rfcs/rfc1623.rs +++ b/tests/ui/rfcs/rfc1623.rs @@ -62,7 +62,7 @@ fn main() { STATIC_SIMPLE_FN(x); CONST_SIMPLE_FN(x); - STATIC_BAZ(BYTES); // neees static lifetime + STATIC_BAZ(BYTES); // needs static lifetime CONST_BAZ(BYTES); // make sure this works with different lifetimes diff --git a/tests/ui/rust-2018/unresolved-asterisk-imports.rs b/tests/ui/rust-2018/unresolved-asterisk-imports.rs index ad1064570c77b..33bfecbc0de2a 100644 --- a/tests/ui/rust-2018/unresolved-asterisk-imports.rs +++ b/tests/ui/rust-2018/unresolved-asterisk-imports.rs @@ -1,6 +1,6 @@ // edition:2018 -use not_existing_crate::*; //~ ERROR unresolved import `not_existing_crate +use nonexistent_crate::*; //~ ERROR unresolved import `nonexistent_crate use std as foo; fn main() {} diff --git a/tests/ui/rust-2018/unresolved-asterisk-imports.stderr b/tests/ui/rust-2018/unresolved-asterisk-imports.stderr index 09e9edc638d1d..7cee15f7a4700 100644 --- a/tests/ui/rust-2018/unresolved-asterisk-imports.stderr +++ b/tests/ui/rust-2018/unresolved-asterisk-imports.stderr @@ -1,8 +1,8 @@ -error[E0432]: unresolved import `not_existing_crate` +error[E0432]: unresolved import `nonexistent_crate` --> $DIR/unresolved-asterisk-imports.rs:3:5 | -LL | use not_existing_crate::*; - | ^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `not_existing_crate` +LL | use nonexistent_crate::*; + | ^^^^^^^^^^^^^^^^^ use of undeclared crate or module `nonexistent_crate` error: aborting due to previous error diff --git a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs index 91aacedfc5778..dfd6c0ee8d7c2 100644 --- a/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs +++ b/tests/ui/self/arbitrary_self_types_pointers_and_wrappers.rs @@ -51,7 +51,7 @@ impl, U> DispatchFromDyn> for Wrapper {} trait Trait { // This method isn't object-safe yet. Unsized by-value `self` is object-safe (but not callable - // without unsized_locals), but wrappers arond `Self` currently are not. + // without unsized_locals), but wrappers around `Self` currently are not. // FIXME (mikeyhew) uncomment this when unsized rvalues object-safety is implemented // fn wrapper(self: Wrapper) -> i32; fn ptr_wrapper(self: Ptr>) -> i32; diff --git a/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs b/tests/ui/specialization/min_specialization/implicit-well-formed-bounds.rs similarity index 100% rename from tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs rename to tests/ui/specialization/min_specialization/implicit-well-formed-bounds.rs diff --git a/tests/ui/specialization/specialization-projection-alias.rs b/tests/ui/specialization/specialization-projection-alias.rs index f1f0b47bb6503..2bce90fd83668 100644 --- a/tests/ui/specialization/specialization-projection-alias.rs +++ b/tests/ui/specialization/specialization-projection-alias.rs @@ -17,7 +17,7 @@ impl Id_ for T { default type Out = T; } -fn test_proection() { +fn test_protection() { let x: Id = panic!(); } diff --git a/tests/ui/suggestions/attribute-typos.rs b/tests/ui/suggestions/attribute-typos.rs index 7c8231bbb24f8..bff4f15cde918 100644 --- a/tests/ui/suggestions/attribute-typos.rs +++ b/tests/ui/suggestions/attribute-typos.rs @@ -1,4 +1,4 @@ -#[deprcated] //~ ERROR cannot find attribute `deprcated` in this scope +#[deprecate] //~ ERROR cannot find attribute `deprecate` in this scope fn foo() {} #[tests] //~ ERROR cannot find attribute `tests` in this scope diff --git a/tests/ui/suggestions/attribute-typos.stderr b/tests/ui/suggestions/attribute-typos.stderr index b871c9b45a56c..cffec1a40c498 100644 --- a/tests/ui/suggestions/attribute-typos.stderr +++ b/tests/ui/suggestions/attribute-typos.stderr @@ -19,10 +19,10 @@ LL | #[tests] | = note: similarly named attribute macro `test` defined here -error: cannot find attribute `deprcated` in this scope +error: cannot find attribute `deprecate` in this scope --> $DIR/attribute-typos.rs:1:3 | -LL | #[deprcated] +LL | #[deprecate] | ^^^^^^^^^ help: a built-in attribute with a similar name exists: `deprecated` error: aborting due to 4 previous errors diff --git a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs b/tests/ui/suggestions/const-pat-non-exhaustive-let-new-var.rs similarity index 100% rename from tests/ui/suggestions/const-pat-non-exaustive-let-new-var.rs rename to tests/ui/suggestions/const-pat-non-exhaustive-let-new-var.rs diff --git a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr b/tests/ui/suggestions/const-pat-non-exhaustive-let-new-var.stderr similarity index 92% rename from tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr rename to tests/ui/suggestions/const-pat-non-exhaustive-let-new-var.stderr index 9ee3e6eb2c827..f481cd80dd144 100644 --- a/tests/ui/suggestions/const-pat-non-exaustive-let-new-var.stderr +++ b/tests/ui/suggestions/const-pat-non-exhaustive-let-new-var.stderr @@ -1,5 +1,5 @@ error[E0005]: refutable pattern in local binding - --> $DIR/const-pat-non-exaustive-let-new-var.rs:2:9 + --> $DIR/const-pat-non-exhaustive-let-new-var.rs:2:9 | LL | let A = 3; | ^ diff --git a/tests/ui/suggestions/if-then-neeing-semi.rs b/tests/ui/suggestions/if-then-needing-semi.rs similarity index 100% rename from tests/ui/suggestions/if-then-neeing-semi.rs rename to tests/ui/suggestions/if-then-needing-semi.rs diff --git a/tests/ui/suggestions/if-then-neeing-semi.stderr b/tests/ui/suggestions/if-then-needing-semi.stderr similarity index 91% rename from tests/ui/suggestions/if-then-neeing-semi.stderr rename to tests/ui/suggestions/if-then-needing-semi.stderr index 6833e0bab2b83..959e70c8b8ba5 100644 --- a/tests/ui/suggestions/if-then-neeing-semi.stderr +++ b/tests/ui/suggestions/if-then-needing-semi.stderr @@ -1,5 +1,5 @@ error[E0308]: `if` and `else` have incompatible types - --> $DIR/if-then-neeing-semi.rs:28:9 + --> $DIR/if-then-needing-semi.rs:28:9 | LL | let _ = if true { | _____________- @@ -16,7 +16,7 @@ LL | | }; | |_____- `if` and `else` have incompatible types | note: calling an async function returns a future - --> $DIR/if-then-neeing-semi.rs:28:9 + --> $DIR/if-then-needing-semi.rs:28:9 | LL | async_dummy() | ^^^^^^^^^^^^^ @@ -31,7 +31,7 @@ LL + async_dummy() | error[E0308]: `if` and `else` have incompatible types - --> $DIR/if-then-neeing-semi.rs:41:9 + --> $DIR/if-then-needing-semi.rs:41:9 | LL | let _ = if true { | _____________- @@ -48,7 +48,7 @@ LL | | }; | |_____- `if` and `else` have incompatible types | note: calling an async function returns a future - --> $DIR/if-then-neeing-semi.rs:41:9 + --> $DIR/if-then-needing-semi.rs:41:9 | LL | async_dummy2() | ^^^^^^^^^^^^^^ @@ -65,7 +65,7 @@ LL ~ Box::new(async_dummy2()) | error[E0308]: `if` and `else` have incompatible types - --> $DIR/if-then-neeing-semi.rs:54:9 + --> $DIR/if-then-needing-semi.rs:54:9 | LL | let _ = if true { | _____________- @@ -91,7 +91,7 @@ LL ~ async_dummy2().await | error[E0308]: `if` and `else` have incompatible types - --> $DIR/if-then-neeing-semi.rs:13:9 + --> $DIR/if-then-needing-semi.rs:13:9 | LL | let _ = if true { | _____________- diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.rs b/tests/ui/suggestions/nonexistent-field-present-in-subfield-recursion-limit.rs similarity index 100% rename from tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.rs rename to tests/ui/suggestions/nonexistent-field-present-in-subfield-recursion-limit.rs diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr b/tests/ui/suggestions/nonexistent-field-present-in-subfield-recursion-limit.stderr similarity index 79% rename from tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr rename to tests/ui/suggestions/nonexistent-field-present-in-subfield-recursion-limit.stderr index b294f4da7db33..ddac01287415c 100644 --- a/tests/ui/suggestions/non-existent-field-present-in-subfield-recursion-limit.stderr +++ b/tests/ui/suggestions/nonexistent-field-present-in-subfield-recursion-limit.stderr @@ -1,5 +1,5 @@ error[E0609]: no field `f` on type `Foo` - --> $DIR/non-existent-field-present-in-subfield-recursion-limit.rs:41:22 + --> $DIR/nonexistent-field-present-in-subfield-recursion-limit.rs:41:22 | LL | let test = fooer.f; | ^ unknown field diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.fixed b/tests/ui/suggestions/nonexistent-field-present-in-subfield.fixed similarity index 100% rename from tests/ui/suggestions/non-existent-field-present-in-subfield.fixed rename to tests/ui/suggestions/nonexistent-field-present-in-subfield.fixed diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.rs b/tests/ui/suggestions/nonexistent-field-present-in-subfield.rs similarity index 100% rename from tests/ui/suggestions/non-existent-field-present-in-subfield.rs rename to tests/ui/suggestions/nonexistent-field-present-in-subfield.rs diff --git a/tests/ui/suggestions/non-existent-field-present-in-subfield.stderr b/tests/ui/suggestions/nonexistent-field-present-in-subfield.stderr similarity index 87% rename from tests/ui/suggestions/non-existent-field-present-in-subfield.stderr rename to tests/ui/suggestions/nonexistent-field-present-in-subfield.stderr index cc991b915d339..6925d2b6622d3 100644 --- a/tests/ui/suggestions/non-existent-field-present-in-subfield.stderr +++ b/tests/ui/suggestions/nonexistent-field-present-in-subfield.stderr @@ -1,5 +1,5 @@ error[E0609]: no field `c` on type `Foo` - --> $DIR/non-existent-field-present-in-subfield.rs:37:24 + --> $DIR/nonexistent-field-present-in-subfield.rs:37:24 | LL | let _test = &fooer.c; | ^ unknown field @@ -11,7 +11,7 @@ LL | let _test = &fooer.first.bar.c; | ++++++++++ error[E0609]: no field `test` on type `Foo` - --> $DIR/non-existent-field-present-in-subfield.rs:40:24 + --> $DIR/nonexistent-field-present-in-subfield.rs:40:24 | LL | let _test2 = fooer.test; | ^^^^ unknown field diff --git a/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.rs b/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-bracket.rs similarity index 100% rename from tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.rs rename to tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-bracket.rs diff --git a/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr b/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-bracket.stderr similarity index 84% rename from tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr rename to tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-bracket.stderr index 618ccba0d3d12..b9ee09410f3fd 100644 --- a/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-braket.stderr +++ b/tests/ui/suggestions/recover-missing-turbofish-surrounding-angle-bracket.stderr @@ -1,5 +1,5 @@ error: generic parameters without surrounding angle brackets - --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:2:48 + --> $DIR/recover-missing-turbofish-surrounding-angle-bracket.rs:2:48 | LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>(); | ^^^^^^ @@ -10,7 +10,7 @@ LL | let _ = vec![1, 2, 3].into_iter().collect::>(); | + + error: generic parameters without surrounding angle brackets - --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:4:48 + --> $DIR/recover-missing-turbofish-surrounding-angle-bracket.rs:4:48 | LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>>>(); | ^^^^^^ @@ -21,7 +21,7 @@ LL | let _ = vec![1, 2, 3].into_iter().collect::>(); | + ~ error: generic parameters without surrounding angle brackets - --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:6:48 + --> $DIR/recover-missing-turbofish-surrounding-angle-bracket.rs:6:48 | LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>>(); | ^^^^^^ @@ -32,7 +32,7 @@ LL | let _ = vec![1, 2, 3].into_iter().collect::>(); | + ~ error: generic parameters without surrounding angle brackets - --> $DIR/recover-missing-turbofish-surrounding-angle-braket.rs:8:48 + --> $DIR/recover-missing-turbofish-surrounding-angle-bracket.rs:8:48 | LL | let _ = vec![1, 2, 3].into_iter().collect::Vec<_>>(); | ^^^^^^ diff --git a/tests/ui/suggestions/restrict-type-argument.rs b/tests/ui/suggestions/restrict-type-argument.rs index c4ebfbe922c09..7d3b0f8dbb1f2 100644 --- a/tests/ui/suggestions/restrict-type-argument.rs +++ b/tests/ui/suggestions/restrict-type-argument.rs @@ -13,7 +13,7 @@ fn use_bound(val: S) { } fn use_bound_2< - S // Make sure we can synthezise a correct suggestion span for this case + S // Make sure we can synthesize a correct suggestion span for this case : Sync >(val: S) { diff --git a/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.rs b/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.rs index 21ab6830b3c81..88a399c3724f6 100644 --- a/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.rs +++ b/tests/ui/suggestions/sugg_with_positional_args_and_debug_fmt.rs @@ -1,4 +1,4 @@ -// When build the suggesttion take in consideration the `:?` +// When build the suggestion take in consideration the `:?` // https://github.com/rust-lang/rust/issues/100648 #![deny(warnings)] diff --git a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs index 14fef1b524892..fb0e9b1cb33c3 100644 --- a/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs +++ b/tests/ui/suggestions/suggest-blanket-impl-local-trait.rs @@ -1,4 +1,4 @@ -// Ensure that the compiler include the blanklet implementation suggestion +// Ensure that the compiler include the blanket implementation suggestion // when inside a `impl` statement are used two local traits. // // edition:2021 diff --git a/tests/ui/suggestions/suggest-methods.rs b/tests/ui/suggestions/suggest-methods.rs index f40b9ed99b827..6ef074dca3826 100644 --- a/tests/ui/suggestions/suggest-methods.rs +++ b/tests/ui/suggestions/suggest-methods.rs @@ -18,7 +18,7 @@ fn main() { f.bat(1.0); //~ ERROR no method named let s = "foo".to_string(); - let _ = s.is_emtpy(); //~ ERROR no method named + let _ = s.in_empty(); //~ ERROR no method named // Generates a warning for `count_zeros()`. `count_ones()` is also a close // match, but the former is closer. diff --git a/tests/ui/suggestions/suggest-methods.stderr b/tests/ui/suggestions/suggest-methods.stderr index 03cb9c7792285..9929ae4fb652e 100644 --- a/tests/ui/suggestions/suggest-methods.stderr +++ b/tests/ui/suggestions/suggest-methods.stderr @@ -7,10 +7,10 @@ LL | struct Foo; LL | f.bat(1.0); | ^^^ help: there is a method with a similar name: `bar` -error[E0599]: no method named `is_emtpy` found for struct `String` in the current scope +error[E0599]: no method named `in_empty` found for struct `String` in the current scope --> $DIR/suggest-methods.rs:21:15 | -LL | let _ = s.is_emtpy(); +LL | let _ = s.in_empty(); | ^^^^^^^^ help: there is a method with a similar name: `is_empty` error[E0599]: no method named `count_eos` found for type `u32` in the current scope diff --git a/tests/ui/traits/alias/only-maybe-bound.rs b/tests/ui/traits/alias/only-maybe-bound.rs index e4abf314e0a96..b4c483ede42aa 100644 --- a/tests/ui/traits/alias/only-maybe-bound.rs +++ b/tests/ui/traits/alias/only-maybe-bound.rs @@ -1,4 +1,4 @@ -// Test that `dyn ?Sized` (i.e., a trait object with only a maybe buond) is not allowed, when just +// Test that `dyn ?Sized` (i.e., a trait object with only a maybe bound) is not allowed, when just // `?Sized` results from trait alias expansion. #![feature(trait_alias)] diff --git a/tests/ui/traits/alias/self-in-generics.rs b/tests/ui/traits/alias/self-in-generics.rs index dcb33b7a90af4..eac6de7a8d877 100644 --- a/tests/ui/traits/alias/self-in-generics.rs +++ b/tests/ui/traits/alias/self-in-generics.rs @@ -1,4 +1,4 @@ -// astconv uses `FreshTy(0)` as a dummy `Self` type when instanciating trait objects. +// astconv uses `FreshTy(0)` as a dummy `Self` type when instantiating trait objects. // This `FreshTy(0)` can leak into substs, causing ICEs in several places. #![feature(trait_alias)] diff --git a/tests/ui/traits/auxiliary/traitimpl.rs b/tests/ui/traits/auxiliary/traitimpl.rs index fda5314cdbfa5..3a0a8f2480339 100644 --- a/tests/ui/traits/auxiliary/traitimpl.rs +++ b/tests/ui/traits/auxiliary/traitimpl.rs @@ -1,4 +1,4 @@ -// Test inherent trait impls work cross-crait. +// Test inherent trait impls work cross-crate. pub trait Bar<'a> : 'a {} diff --git a/tests/ui/traits/impl.rs b/tests/ui/traits/impl.rs index f512d91ebeb4a..52606ee169231 100644 --- a/tests/ui/traits/impl.rs +++ b/tests/ui/traits/impl.rs @@ -35,7 +35,7 @@ fn main() { unsafe { assert_eq!(COUNT, 12); } - // Cross-crait case + // Cross-crate case let x: &dyn Bar = &Foo; x.bar(); } diff --git a/tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs b/tests/ui/traits/new-solver/alias_eq_cant_be_further_normalized.rs similarity index 100% rename from tests/ui/traits/new-solver/alias_eq_cant_be_furthur_normalized.rs rename to tests/ui/traits/new-solver/alias_eq_cant_be_further_normalized.rs diff --git a/tests/ui/traits/non_lifetime_binders/basic.rs b/tests/ui/traits/non_lifetime_binders/basic.rs index a797aae65dba2..14861d47a6ec5 100644 --- a/tests/ui/traits/non_lifetime_binders/basic.rs +++ b/tests/ui/traits/non_lifetime_binders/basic.rs @@ -1,5 +1,5 @@ // check-pass -// Basic test that show's we can succesfully typeck a `for` where clause. +// Basic test that show's we can successfully typeck a `for` where clause. #![feature(non_lifetime_binders)] //~^ WARN the feature `non_lifetime_binders` is incomplete diff --git a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguity.rs similarity index 100% rename from tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.rs rename to tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguity.rs diff --git a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguity.stderr similarity index 88% rename from tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr rename to tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguity.stderr index 0ad18be03cdf9..b261537ddbcfa 100644 --- a/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguousity.stderr +++ b/tests/ui/traits/trait-upcasting/multiple-occurrence-ambiguity.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/multiple-occurrence-ambiguousity.rs:20:26 + --> $DIR/multiple-occurrence-ambiguity.rs:20:26 | LL | let t: &dyn Bar<_> = s; | ----------- ^ expected trait `Bar`, found trait `Foo` diff --git a/tests/ui/traits/wf-object/only-maybe-bound.rs b/tests/ui/traits/wf-object/only-maybe-bound.rs index 3e6db3e997c9b..67d65d7544d0e 100644 --- a/tests/ui/traits/wf-object/only-maybe-bound.rs +++ b/tests/ui/traits/wf-object/only-maybe-bound.rs @@ -1,4 +1,4 @@ -// Test that `dyn ?Sized` (i.e., a trait object with only a maybe buond) is not allowed. +// Test that `dyn ?Sized` (i.e., a trait object with only a maybe bound) is not allowed. type _0 = dyn ?Sized; //~^ ERROR at least one trait is required for an object type [E0224] diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr index 758ff31ff7022..e24cb11288e29 100644 --- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr +++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr @@ -115,7 +115,7 @@ LL | Self::SVariant::<()> { v: () }; | not allowed on this type | = note: enum variants can't have type parameters -help: you might have meant to specity type parameters on enum `Enum` +help: you might have meant to specify type parameters on enum `Enum` | LL - Self::SVariant::<()> { v: () }; LL + Enum::<()>::SVariant { v: () }; @@ -196,7 +196,7 @@ LL | Self::<()>::SVariant::<()> { v: () }; | not allowed on this type | = note: enum variants can't have type parameters -help: you might have meant to specity type parameters on enum `Enum` +help: you might have meant to specify type parameters on enum `Enum` | LL - Self::<()>::SVariant::<()> { v: () }; LL + Enum::<()>::SVariant { v: () }; @@ -359,7 +359,7 @@ LL | Alias::SVariant::<()> { v: () }; | not allowed on this type | = note: enum variants can't have type parameters -help: you might have meant to specity type parameters on enum `Enum` +help: you might have meant to specify type parameters on enum `Enum` | LL - Alias::SVariant::<()> { v: () }; LL + Alias::<()>::SVariant { v: () }; @@ -374,7 +374,7 @@ LL | Alias::<()>::SVariant::<()> { v: () }; | not allowed on this type | = note: enum variants can't have type parameters -help: you might have meant to specity type parameters on enum `Enum` +help: you might have meant to specify type parameters on enum `Enum` | LL - Alias::<()>::SVariant::<()> { v: () }; LL + Alias::<()>::SVariant { v: () }; @@ -389,7 +389,7 @@ LL | AliasFixed::SVariant::<()> { v: () }; | not allowed on this type | = note: enum variants can't have type parameters -help: you might have meant to specity type parameters on enum `Enum` +help: you might have meant to specify type parameters on enum `Enum` | LL - AliasFixed::SVariant::<()> { v: () }; LL + AliasFixed::<()>::SVariant { v: () }; @@ -432,7 +432,7 @@ LL | AliasFixed::<()>::SVariant::<()> { v: () }; | not allowed on this type | = note: enum variants can't have type parameters -help: you might have meant to specity type parameters on enum `Enum` +help: you might have meant to specify type parameters on enum `Enum` | LL - AliasFixed::<()>::SVariant::<()> { v: () }; LL + AliasFixed::<()>::SVariant { v: () }; diff --git a/tests/ui/type-inference/issue-30225.rs b/tests/ui/type-inference/issue-30225.rs index 42315332c20c5..a39ff62f6521a 100644 --- a/tests/ui/type-inference/issue-30225.rs +++ b/tests/ui/type-inference/issue-30225.rs @@ -32,7 +32,7 @@ fn bomb() { //~^ ERROR mismatched types x = Some(()); // set $2 = (), allowing impl selection // to proceed for <() as Foo<$0, $1>> = impl A. - // kaboom, this *used* to trigge an ICE + // kaboom, this *used* to trigger an ICE } fn main() {} diff --git a/tests/ui/type/type-check/assignment-in-if.rs b/tests/ui/type/type-check/assignment-in-if.rs index ada250df24695..de7d5b13122b4 100644 --- a/tests/ui/type/type-check/assignment-in-if.rs +++ b/tests/ui/type/type-check/assignment-in-if.rs @@ -26,7 +26,7 @@ fn main() { //~^ ERROR mismatched types println!("{}", x); } - // "invalid left-hand side of assignment" error is suppresed + // "invalid left-hand side of assignment" error is suppressed if 3 = x { //~^ ERROR mismatched types println!("{}", x); diff --git a/tests/ui/typeof/type_mismatch.rs b/tests/ui/typeof/type_mismatch.rs index 3f8339fa5beaf..957b1bed33455 100644 --- a/tests/ui/typeof/type_mismatch.rs +++ b/tests/ui/typeof/type_mismatch.rs @@ -1,5 +1,5 @@ // Test that using typeof results in the correct type mismatch errors instead of always assuming -// `usize`, in addition to the pre-existing "typeof is reserved and unimplemented" error +// `usize`, in addition to the preexisting "typeof is reserved and unimplemented" error fn main() { const a: u8 = 1; let b: typeof(a) = 1i8; diff --git a/tests/ui/union/union-nodrop.rs b/tests/ui/union/union-nodrop.rs index 6e6b105a73e9f..3176e3fb60410 100644 --- a/tests/ui/union/union-nodrop.rs +++ b/tests/ui/union/union-nodrop.rs @@ -13,7 +13,7 @@ impl Drop for NeedDrop { fn drop(&mut self) {} } -// Constant expressios allow `NoDrop` to go out of scope, +// Constant expression allow `NoDrop` to go out of scope, // unlike a value of the interior type implementing `Drop`. static X: () = (NoDrop { inner: ManuallyDrop::new(NeedDrop) }, ()).1; diff --git a/tests/ui/unresolved/unresolved-asterisk-imports.rs b/tests/ui/unresolved/unresolved-asterisk-imports.rs index 2d853a66c8d06..9c179c4b6552f 100644 --- a/tests/ui/unresolved/unresolved-asterisk-imports.rs +++ b/tests/ui/unresolved/unresolved-asterisk-imports.rs @@ -1,4 +1,4 @@ -use not_existing_crate::*; //~ ERROR unresolved import `not_existing_crate +use nonexistent_crate::*; //~ ERROR unresolved import `nonexistent_crate use std as foo; fn main() {} diff --git a/tests/ui/unresolved/unresolved-asterisk-imports.stderr b/tests/ui/unresolved/unresolved-asterisk-imports.stderr index 8df8eab34a715..473a71755a808 100644 --- a/tests/ui/unresolved/unresolved-asterisk-imports.stderr +++ b/tests/ui/unresolved/unresolved-asterisk-imports.stderr @@ -1,10 +1,10 @@ -error[E0432]: unresolved import `not_existing_crate` +error[E0432]: unresolved import `nonexistent_crate` --> $DIR/unresolved-asterisk-imports.rs:1:5 | -LL | use not_existing_crate::*; - | ^^^^^^^^^^^^^^^^^^ maybe a missing crate `not_existing_crate`? +LL | use nonexistent_crate::*; + | ^^^^^^^^^^^^^^^^^ maybe a missing crate `nonexistent_crate`? | - = help: consider adding `extern crate not_existing_crate` to use the `not_existing_crate` crate + = help: consider adding `extern crate nonexistent_crate` to use the `nonexistent_crate` crate error: aborting due to previous error diff --git a/tests/ui/use/use-keyword.rs b/tests/ui/use/use-keyword.rs index c30c2e06c4557..840cddcb907cc 100644 --- a/tests/ui/use/use-keyword.rs +++ b/tests/ui/use/use-keyword.rs @@ -1,4 +1,4 @@ -// Check that imports with nakes super and self don't fail during parsing +// Check that imports with naked super and self don't fail during parsing // FIXME: this shouldn't fail during name resolution either mod a { diff --git a/tests/ui/variance/variance-trait-object-bound.rs b/tests/ui/variance/variance-trait-object-bound.rs index 11303c4652005..f00d4bf773b7b 100644 --- a/tests/ui/variance/variance-trait-object-bound.rs +++ b/tests/ui/variance/variance-trait-object-bound.rs @@ -1,6 +1,6 @@ // Checks that regions which appear in a trait object type are // observed by the variance inference algorithm (and hence -// `TOption` is contavariant w/r/t `'a` and not bivariant). +// `TOption` is contravariant w/r/t `'a` and not bivariant). // // Issue #18262. diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs b/tests/ui/where-clauses/where-clause-method-substitution-rpass.rs similarity index 100% rename from tests/ui/where-clauses/where-clause-method-substituion-rpass.rs rename to tests/ui/where-clauses/where-clause-method-substitution-rpass.rs diff --git a/tests/ui/where-clauses/where-clause-method-substituion.rs b/tests/ui/where-clauses/where-clause-method-substitution.rs similarity index 100% rename from tests/ui/where-clauses/where-clause-method-substituion.rs rename to tests/ui/where-clauses/where-clause-method-substitution.rs diff --git a/tests/ui/where-clauses/where-clause-method-substituion.stderr b/tests/ui/where-clauses/where-clause-method-substitution.stderr similarity index 81% rename from tests/ui/where-clauses/where-clause-method-substituion.stderr rename to tests/ui/where-clauses/where-clause-method-substitution.stderr index 8c47ed6d4317a..227da2d02f7bb 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion.stderr +++ b/tests/ui/where-clauses/where-clause-method-substitution.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `X: Foo` is not satisfied - --> $DIR/where-clause-method-substituion.rs:20:16 + --> $DIR/where-clause-method-substitution.rs:20:16 | LL | 1.method::(); | ^ the trait `Foo` is not implemented for `X` | note: required by a bound in `Bar::method` - --> $DIR/where-clause-method-substituion.rs:6:34 + --> $DIR/where-clause-method-substitution.rs:6:34 | LL | fn method(&self) where A: Foo; | ^^^^^^ required by this bound in `Bar::method`