mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
fix: typos
Signed-off-by: calciumbe <192480234+calciumbe@users.noreply.github.com>
This commit is contained in:
parent
42591a4cc0
commit
4f8bebd6b5
@ -755,7 +755,7 @@ impl<'a> Parser<'a> {
|
|||||||
// When there are a few keywords in the last ten elements of `self.expected_token_types`
|
// When there are a few keywords in the last ten elements of `self.expected_token_types`
|
||||||
// and the current token is an identifier, it's probably a misspelled keyword. This handles
|
// and the current token is an identifier, it's probably a misspelled keyword. This handles
|
||||||
// code like `async Move {}`, misspelled `if` in match guard, misspelled `else` in
|
// code like `async Move {}`, misspelled `if` in match guard, misspelled `else` in
|
||||||
// `if`-`else` and mispelled `where` in a where clause.
|
// `if`-`else` and misspelled `where` in a where clause.
|
||||||
if !expected_keywords.is_empty()
|
if !expected_keywords.is_empty()
|
||||||
&& !curr_ident.is_used_keyword()
|
&& !curr_ident.is_used_keyword()
|
||||||
&& let Some(misspelled_kw) = find_similar_kw(curr_ident, &expected_keywords)
|
&& let Some(misspelled_kw) = find_similar_kw(curr_ident, &expected_keywords)
|
||||||
|
@ -420,7 +420,7 @@ impl<A: Allocator> RawVecInner<A> {
|
|||||||
match Self::try_allocate_in(capacity, AllocInit::Uninitialized, alloc, elem_layout) {
|
match Self::try_allocate_in(capacity, AllocInit::Uninitialized, alloc, elem_layout) {
|
||||||
Ok(this) => {
|
Ok(this) => {
|
||||||
unsafe {
|
unsafe {
|
||||||
// Make it more obvious that a subsquent Vec::reserve(capacity) will not allocate.
|
// Make it more obvious that a subsequent Vec::reserve(capacity) will not allocate.
|
||||||
hint::assert_unchecked(!this.needs_to_grow(0, capacity, elem_layout));
|
hint::assert_unchecked(!this.needs_to_grow(0, capacity, elem_layout));
|
||||||
}
|
}
|
||||||
this
|
this
|
||||||
|
@ -136,7 +136,7 @@ pub(crate) fn set_current(thread: Thread) -> Result<(), Thread> {
|
|||||||
/// one thread and is guaranteed not to call the global allocator.
|
/// one thread and is guaranteed not to call the global allocator.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) fn current_id() -> ThreadId {
|
pub(crate) fn current_id() -> ThreadId {
|
||||||
// If accessing the persistant thread ID takes multiple TLS accesses, try
|
// If accessing the persistent thread ID takes multiple TLS accesses, try
|
||||||
// to retrieve it from the current thread handle, which will only take one
|
// to retrieve it from the current thread handle, which will only take one
|
||||||
// TLS access.
|
// TLS access.
|
||||||
if !id::CHEAP {
|
if !id::CHEAP {
|
||||||
|
@ -65,4 +65,4 @@ Currently the `riscv64-linux-android` target requires the following architecture
|
|||||||
### aarch64-linux-android on Nightly compilers
|
### aarch64-linux-android on Nightly compilers
|
||||||
|
|
||||||
As soon as `-Zfixed-x18` compiler flag is supplied, the [`ShadowCallStack` sanitizer](https://releases.llvm.org/7.0.1/tools/clang/docs/ShadowCallStack.html)
|
As soon as `-Zfixed-x18` compiler flag is supplied, the [`ShadowCallStack` sanitizer](https://releases.llvm.org/7.0.1/tools/clang/docs/ShadowCallStack.html)
|
||||||
instrumentation is also made avaiable by supplying the second compiler flag `-Zsanitizer=shadow-call-stack`.
|
instrumentation is also made available by supplying the second compiler flag `-Zsanitizer=shadow-call-stack`.
|
||||||
|
Loading…
Reference in New Issue
Block a user