Skip to content

Commit 40d7940

Browse files
committed
Auto merge of rust-lang#106132 - kadiwa4:typos, r=compiler-errors
Fix some typos
2 parents 3468044 + 7b371d2 commit 40d7940

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

compiler/rustc_data_structures/src/stable_hasher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub trait ToStableHashKey<HCX> {
223223
/// stable across compilation session boundaries. More formally:
224224
///
225225
/// ```txt
226-
/// Ord::cmp(a1, b1) == Ord:cmp(a2, b2)
226+
/// Ord::cmp(a1, b1) == Ord::cmp(a2, b2)
227227
/// where a2 = decode(encode(a1, context1), context2)
228228
/// b2 = decode(encode(b1, context1), context2)
229229
/// ```

compiler/rustc_hir_analysis/src/astconv/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2626,7 +2626,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
26262626
let e = self
26272627
.tcx()
26282628
.sess
2629-
.delay_span_bug(path.span, "path with `Res:Err` but no error emitted");
2629+
.delay_span_bug(path.span, "path with `Res::Err` but no error emitted");
26302630
self.set_tainted_by_errors(e);
26312631
self.tcx().ty_error_with_guaranteed(e)
26322632
}

compiler/rustc_hir_typeck/src/pat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10131013
let (res, opt_ty, segments) =
10141014
self.resolve_ty_and_res_fully_qualified_call(qpath, pat.hir_id, pat.span);
10151015
if res == Res::Err {
1016-
let e = tcx.sess.delay_span_bug(pat.span, "`Res:Err` but no error emitted");
1016+
let e = tcx.sess.delay_span_bug(pat.span, "`Res::Err` but no error emitted");
10171017
self.set_tainted_by_errors(e);
10181018
on_error(e);
10191019
return tcx.ty_error_with_guaranteed(e);

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3581,7 +3581,7 @@ declare_lint! {
35813581
/// fn main() {
35823582
/// let x: String = "3".try_into().unwrap();
35833583
/// // ^^^^^^^^
3584-
/// // This call to try_into matches both Foo:try_into and TryInto::try_into as
3584+
/// // This call to try_into matches both Foo::try_into and TryInto::try_into as
35853585
/// // `TryInto` has been added to the Rust prelude in 2021 edition.
35863586
/// println!("{x}");
35873587
/// }

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub(super) struct EncodeContext<'a, 'tcx> {
7676
symbol_table: FxHashMap<Symbol, usize>,
7777
}
7878

79-
/// If the current crate is a proc-macro, returns early with `Lazy:empty()`.
79+
/// If the current crate is a proc-macro, returns early with `LazyArray::empty()`.
8080
/// This is useful for skipping the encoding of things that aren't needed
8181
/// for proc-macro crates.
8282
macro_rules! empty_proc_macro {

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2291,7 +2291,7 @@ impl Target {
22912291
} else {
22922292
return Some(Err(format!(
22932293
"'{}' is not a valid value for lld-flavor. \
2294-
Use 'darwin', 'gnu', 'link' or 'wasm.",
2294+
Use 'darwin', 'gnu', 'link' or 'wasm'.",
22952295
s)))
22962296
}
22972297
Some(Ok(()))

src/test/ui/mismatched_types/suggest-removing-tulpe-struct-field.stderr renamed to src/test/ui/mismatched_types/suggest-removing-tuple-struct-field.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0308]: mismatched types
2-
--> $DIR/suggest-removing-tulpe-struct-field.rs:11:13
2+
--> $DIR/suggest-removing-tuple-struct-field.rs:11:13
33
|
44
LL | some_fn(value.0);
55
| ------- ^^^^^^^ expected struct `MyWrapper`, found `u32`
66
| |
77
| arguments to this function are incorrect
88
|
99
note: function defined here
10-
--> $DIR/suggest-removing-tulpe-struct-field.rs:15:4
10+
--> $DIR/suggest-removing-tuple-struct-field.rs:15:4
1111
|
1212
LL | fn some_fn(wrapped: MyWrapper) {
1313
| ^^^^^^^ ------------------
@@ -18,15 +18,15 @@ LL + some_fn(value);
1818
|
1919

2020
error[E0308]: mismatched types
21-
--> $DIR/suggest-removing-tulpe-struct-field.rs:12:13
21+
--> $DIR/suggest-removing-tuple-struct-field.rs:12:13
2222
|
2323
LL | some_fn(my_wrapper!(123).0);
2424
| ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32`
2525
| |
2626
| arguments to this function are incorrect
2727
|
2828
note: function defined here
29-
--> $DIR/suggest-removing-tulpe-struct-field.rs:15:4
29+
--> $DIR/suggest-removing-tuple-struct-field.rs:15:4
3030
|
3131
LL | fn some_fn(wrapped: MyWrapper) {
3232
| ^^^^^^^ ------------------

0 commit comments

Comments
 (0)