1
Fork 0

fix some typos

This commit is contained in:
KaDiWa 2022-12-25 00:43:50 +01:00
parent 7e4f4660eb
commit 7b371d2ad9
No known key found for this signature in database
GPG key ID: 0B52AE391C674CE5
9 changed files with 10 additions and 10 deletions

View file

@ -223,7 +223,7 @@ pub trait ToStableHashKey<HCX> {
/// stable across compilation session boundaries. More formally: /// stable across compilation session boundaries. More formally:
/// ///
/// ```txt /// ```txt
/// Ord::cmp(a1, b1) == Ord:cmp(a2, b2) /// Ord::cmp(a1, b1) == Ord::cmp(a2, b2)
/// where a2 = decode(encode(a1, context1), context2) /// where a2 = decode(encode(a1, context1), context2)
/// b2 = decode(encode(b1, context1), context2) /// b2 = decode(encode(b1, context1), context2)
/// ``` /// ```

View file

@ -2626,7 +2626,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
let e = self let e = self
.tcx() .tcx()
.sess .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.set_tainted_by_errors(e);
self.tcx().ty_error_with_guaranteed(e) self.tcx().ty_error_with_guaranteed(e)
} }

View file

@ -1013,7 +1013,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let (res, opt_ty, segments) = let (res, opt_ty, segments) =
self.resolve_ty_and_res_fully_qualified_call(qpath, pat.hir_id, pat.span); self.resolve_ty_and_res_fully_qualified_call(qpath, pat.hir_id, pat.span);
if res == Res::Err { 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); self.set_tainted_by_errors(e);
on_error(e); on_error(e);
return tcx.ty_error_with_guaranteed(e); return tcx.ty_error_with_guaranteed(e);

View file

@ -3581,7 +3581,7 @@ declare_lint! {
/// fn main() { /// fn main() {
/// let x: String = "3".try_into().unwrap(); /// 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. /// // `TryInto` has been added to the Rust prelude in 2021 edition.
/// println!("{x}"); /// println!("{x}");
/// } /// }

View file

@ -76,7 +76,7 @@ pub(super) struct EncodeContext<'a, 'tcx> {
symbol_table: FxHashMap<Symbol, usize>, symbol_table: FxHashMap<Symbol, usize>,
} }
/// 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 /// This is useful for skipping the encoding of things that aren't needed
/// for proc-macro crates. /// for proc-macro crates.
macro_rules! empty_proc_macro { macro_rules! empty_proc_macro {

View file

@ -2291,7 +2291,7 @@ impl Target {
} else { } else {
return Some(Err(format!( return Some(Err(format!(
"'{}' is not a valid value for lld-flavor. \ "'{}' is not a valid value for lld-flavor. \
Use 'darwin', 'gnu', 'link' or 'wasm.", Use 'darwin', 'gnu', 'link' or 'wasm'.",
s))) s)))
} }
Some(Ok(())) Some(Ok(()))

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types 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); LL | some_fn(value.0);
| ------- ^^^^^^^ expected struct `MyWrapper`, found `u32` | ------- ^^^^^^^ expected struct `MyWrapper`, found `u32`
@ -7,7 +7,7 @@ LL | some_fn(value.0);
| arguments to this function are incorrect | arguments to this function are incorrect
| |
note: function defined here 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) { LL | fn some_fn(wrapped: MyWrapper) {
| ^^^^^^^ ------------------ | ^^^^^^^ ------------------
@ -18,7 +18,7 @@ LL + some_fn(value);
| |
error[E0308]: mismatched types 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); LL | some_fn(my_wrapper!(123).0);
| ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32` | ------- ^^^^^^^^^^^^^^^^^^ expected struct `MyWrapper`, found `u32`
@ -26,7 +26,7 @@ LL | some_fn(my_wrapper!(123).0);
| arguments to this function are incorrect | arguments to this function are incorrect
| |
note: function defined here 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) { LL | fn some_fn(wrapped: MyWrapper) {
| ^^^^^^^ ------------------ | ^^^^^^^ ------------------