Skip to content

Commit e809de4

Browse files
authored
Rollup merge of rust-lang#134884 - calciumbe:patch1, r=jieyouxu
Fix typos Hello, I fix some typos in docs and comments. Thank you very much.
2 parents d8f22da + 4f8bebd commit e809de4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_parse/src/parser/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ impl<'a> Parser<'a> {
755755
// When there are a few keywords in the last ten elements of `self.expected_token_types`
756756
// and the current token is an identifier, it's probably a misspelled keyword. This handles
757757
// code like `async Move {}`, misspelled `if` in match guard, misspelled `else` in
758-
// `if`-`else` and mispelled `where` in a where clause.
758+
// `if`-`else` and misspelled `where` in a where clause.
759759
if !expected_keywords.is_empty()
760760
&& !curr_ident.is_used_keyword()
761761
&& let Some(misspelled_kw) = find_similar_kw(curr_ident, &expected_keywords)

library/alloc/src/raw_vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ impl<A: Allocator> RawVecInner<A> {
420420
match Self::try_allocate_in(capacity, AllocInit::Uninitialized, alloc, elem_layout) {
421421
Ok(this) => {
422422
unsafe {
423-
// Make it more obvious that a subsquent Vec::reserve(capacity) will not allocate.
423+
// Make it more obvious that a subsequent Vec::reserve(capacity) will not allocate.
424424
hint::assert_unchecked(!this.needs_to_grow(0, capacity, elem_layout));
425425
}
426426
this

library/std/src/thread/current.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub(crate) fn set_current(thread: Thread) -> Result<(), Thread> {
136136
/// one thread and is guaranteed not to call the global allocator.
137137
#[inline]
138138
pub(crate) fn current_id() -> ThreadId {
139-
// If accessing the persistant thread ID takes multiple TLS accesses, try
139+
// If accessing the persistent thread ID takes multiple TLS accesses, try
140140
// to retrieve it from the current thread handle, which will only take one
141141
// TLS access.
142142
if !id::CHEAP {

src/doc/rustc/src/platform-support/android.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ Currently the `riscv64-linux-android` target requires the following architecture
6565
### aarch64-linux-android on Nightly compilers
6666

6767
As soon as `-Zfixed-x18` compiler flag is supplied, the [`ShadowCallStack` sanitizer](https://releases.llvm.org/7.0.1/tools/clang/docs/ShadowCallStack.html)
68-
instrumentation is also made avaiable by supplying the second compiler flag `-Zsanitizer=shadow-call-stack`.
68+
instrumentation is also made available by supplying the second compiler flag `-Zsanitizer=shadow-call-stack`.

0 commit comments

Comments
 (0)