From 7b371d2ad9325b80b1472444e2a833160d9e7c2b Mon Sep 17 00:00:00 2001 From: KaDiWa Date: Sun, 25 Dec 2022 00:43:50 +0100 Subject: [PATCH] fix some typos --- compiler/rustc_data_structures/src/stable_hasher.rs | 2 +- compiler/rustc_hir_analysis/src/astconv/mod.rs | 2 +- compiler/rustc_hir_typeck/src/pat.rs | 2 +- compiler/rustc_lint_defs/src/builtin.rs | 2 +- compiler/rustc_metadata/src/rmeta/encoder.rs | 2 +- compiler/rustc_target/src/spec/mod.rs | 2 +- ...ld.fixed => suggest-removing-tuple-struct-field.fixed} | 0 ...ct-field.rs => suggest-removing-tuple-struct-field.rs} | 0 ....stderr => suggest-removing-tuple-struct-field.stderr} | 8 ++++---- 9 files changed, 10 insertions(+), 10 deletions(-) rename src/test/ui/mismatched_types/{suggest-removing-tulpe-struct-field.fixed => suggest-removing-tuple-struct-field.fixed} (100%) rename src/test/ui/mismatched_types/{suggest-removing-tulpe-struct-field.rs => suggest-removing-tuple-struct-field.rs} (100%) rename src/test/ui/mismatched_types/{suggest-removing-tulpe-struct-field.stderr => suggest-removing-tuple-struct-field.stderr} (81%) diff --git a/compiler/rustc_data_structures/src/stable_hasher.rs b/compiler/rustc_data_structures/src/stable_hasher.rs index 1a728f82f00..ae4836645fa 100644 --- a/compiler/rustc_data_structures/src/stable_hasher.rs +++ b/compiler/rustc_data_structures/src/stable_hasher.rs @@ -223,7 +223,7 @@ pub trait ToStableHashKey { /// stable across compilation session boundaries. More formally: /// /// ```txt -/// Ord::cmp(a1, b1) == Ord:cmp(a2, b2) +/// Ord::cmp(a1, b1) == Ord::cmp(a2, b2) /// where a2 = decode(encode(a1, context1), context2) /// b2 = decode(encode(b1, context1), context2) /// ``` diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index c29a3afd7fb..6f0c5d36a5f 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -2626,7 +2626,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { let e = self .tcx() .sess - .delay_span_bug(path.span, "path with `Res:Err` but no error emitted"); + .delay_span_bug(path.span, "path with `Res::Err` but no error emitted"); self.set_tainted_by_errors(e); self.tcx().ty_error_with_guaranteed(e) } diff --git a/compiler/rustc_hir_typeck/src/pat.rs b/compiler/rustc_hir_typeck/src/pat.rs index d3e88b1b80a..0021fdd7f61 100644 --- a/compiler/rustc_hir_typeck/src/pat.rs +++ b/compiler/rustc_hir_typeck/src/pat.rs @@ -1013,7 +1013,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { let (res, opt_ty, segments) = self.resolve_ty_and_res_fully_qualified_call(qpath, pat.hir_id, pat.span); if res == Res::Err { - let e = tcx.sess.delay_span_bug(pat.span, "`Res:Err` but no error emitted"); + let e = tcx.sess.delay_span_bug(pat.span, "`Res::Err` but no error emitted"); self.set_tainted_by_errors(e); on_error(e); return tcx.ty_error_with_guaranteed(e); diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 67868ded0b8..28317d6cea0 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -3581,7 +3581,7 @@ declare_lint! { /// fn main() { /// let x: String = "3".try_into().unwrap(); /// // ^^^^^^^^ - /// // This call to try_into matches both Foo:try_into and TryInto::try_into as + /// // This call to try_into matches both Foo::try_into and TryInto::try_into as /// // `TryInto` has been added to the Rust prelude in 2021 edition. /// println!("{x}"); /// } diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index d5d31bc3edc..be4a0c9bb34 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -76,7 +76,7 @@ pub(super) struct EncodeContext<'a, 'tcx> { symbol_table: FxHashMap, } -/// If the current crate is a proc-macro, returns early with `Lazy:empty()`. +/// If the current crate is a proc-macro, returns early with `LazyArray::empty()`. /// This is useful for skipping the encoding of things that aren't needed /// for proc-macro crates. macro_rules! empty_proc_macro { diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 988cd401f40..4512db49403 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -2291,7 +2291,7 @@ impl Target { } else { return Some(Err(format!( "'{}' is not a valid value for lld-flavor. \ - Use 'darwin', 'gnu', 'link' or 'wasm.", + Use 'darwin', 'gnu', 'link' or 'wasm'.", s))) } Some(Ok(())) diff --git a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.fixed b/src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed similarity index 100% rename from src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.fixed rename to src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.fixed diff --git a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.rs b/src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.rs similarity index 100% rename from src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.rs rename to src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.rs diff --git a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.stderr b/src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr similarity index 81% rename from src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.stderr rename to src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr index 82a7f276372..35871afb58b 100644 --- a/src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.stderr +++ b/src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/suggest-removing-tulpe-struct-field.rs:11:13 + --> $DIR/suggest-removing-tuple-struct-field.rs:11:13 | LL | some_fn(value.0); | ------- ^^^^^^^ expected struct `MyWrapper`, found `u32` @@ -7,7 +7,7 @@ LL | some_fn(value.0); | arguments to this function are incorrect | note: function defined here - --> $DIR/suggest-removing-tulpe-struct-field.rs:15:4 + --> $DIR/suggest-removing-tuple-struct-field.rs:15:4 | LL | fn some_fn(wrapped: MyWrapper) { | ^^^^^^^ ------------------ @@ -18,7 +18,7 @@ LL + some_fn(value); | error[E0308]: mismatched types - --> $DIR/suggest-removing-tulpe-struct-field.rs:12:13 + --> $DIR/suggest-removing-tuple-struct-field.rs:12:13 | LL | some_fn(my_wrapper!(123).0); | ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32` @@ -26,7 +26,7 @@ LL | some_fn(my_wrapper!(123).0); | arguments to this function are incorrect | note: function defined here - --> $DIR/suggest-removing-tulpe-struct-field.rs:15:4 + --> $DIR/suggest-removing-tuple-struct-field.rs:15:4 | LL | fn some_fn(wrapped: MyWrapper) { | ^^^^^^^ ------------------