Skip to content

Commit 7a228ce

Browse files
authored
Rollup merge of #108688 - est31:backticks_matchmaking_library, r=jyn514
Match unmatched backticks in library/ Found with GNU grep: ``` grep -rEn '^(([^`]*`){2})*[^`]*`[^`]*$' library/ | rg -v '\s*[//]?.{1,2}```' ``` split out from #108685 as per advice.
2 parents 37bd50e + 9994050 commit 7a228ce

File tree

17 files changed

+18
-18
lines changed

17 files changed

+18
-18
lines changed

library/alloc/src/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@ impl<T, I: iter::TrustedLen<Item = T>> ToRcSlice<T> for I {
21452145
Rc::from_iter_exact(self, low)
21462146
}
21472147
} else {
2148-
// TrustedLen contract guarantees that `upper_bound == `None` implies an iterator
2148+
// TrustedLen contract guarantees that `upper_bound == None` implies an iterator
21492149
// length exceeding `usize::MAX`.
21502150
// The default implementation would collect into a vec which would panic.
21512151
// Thus we panic here immediately without invoking `Vec` code.

library/alloc/src/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2895,7 +2895,7 @@ impl<T, I: iter::TrustedLen<Item = T>> ToArcSlice<T> for I {
28952895
Arc::from_iter_exact(self, low)
28962896
}
28972897
} else {
2898-
// TrustedLen contract guarantees that `upper_bound == `None` implies an iterator
2898+
// TrustedLen contract guarantees that `upper_bound == None` implies an iterator
28992899
// length exceeding `usize::MAX`.
29002900
// The default implementation would collect into a vec which would panic.
29012901
// Thus we panic here immediately without invoking `Vec` code.

library/core/src/any.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
//! let value_any = value as &dyn Any;
5757
//!
5858
//! // Try to convert our value to a `String`. If successful, we want to
59-
//! // output the String`'s length as well as its value. If not, it's a
59+
//! // output the `String`'s length as well as its value. If not, it's a
6060
//! // different type: just print it out unadorned.
6161
//! match value_any.downcast_ref::<String>() {
6262
//! Some(as_string) => {

library/core/src/cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ pub struct RefCell<T: ?Sized> {
632632
// Stores the location of the earliest currently active borrow.
633633
// This gets updated whenever we go from having zero borrows
634634
// to having a single borrow. When a borrow occurs, this gets included
635-
// in the generated `BorrowError/`BorrowMutError`
635+
// in the generated `BorrowError`/`BorrowMutError`
636636
#[cfg(feature = "debug_refcell")]
637637
borrowed_at: Cell<Option<&'static crate::panic::Location<'static>>>,
638638
value: UnsafeCell<T>,

library/core/src/intrinsics/mir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
//! another function. The `dialect` and `phase` parameters indicate which [version of MIR][dialect
4343
//! docs] you are inserting here. Generally you'll want to use `#![custom_mir(dialect = "built")]`
4444
//! if you want your MIR to be modified by the full MIR pipeline, or `#![custom_mir(dialect =
45-
//! "runtime", phase = "optimized")] if you don't.
45+
//! "runtime", phase = "optimized")]` if you don't.
4646
//!
4747
//! [dialect docs]:
4848
//! https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.MirPhase.html

library/core/src/ptr/alignment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl Alignment {
4141
/// Returns the alignment for a type.
4242
///
4343
/// This provides the same numerical value as [`mem::align_of`],
44-
/// but in an `Alignment` instead of a `usize.
44+
/// but in an `Alignment` instead of a `usize`.
4545
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
4646
#[inline]
4747
pub const fn of<T>() -> Self {

library/core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2955,7 +2955,7 @@ impl<T> [T] {
29552955
// This operation is still `O(n)`.
29562956
//
29572957
// Example: We start in this state, where `r` represents "next
2958-
// read" and `w` represents "next_write`.
2958+
// read" and `w` represents "next_write".
29592959
//
29602960
// r
29612961
// +---+---+---+---+---+---+

library/core/src/slice/sort.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ where
317317
// 1. `block` - Number of elements in the block.
318318
// 2. `start` - Start pointer into the `offsets` array.
319319
// 3. `end` - End pointer into the `offsets` array.
320-
// 4. `offsets - Indices of out-of-order elements within the block.
320+
// 4. `offsets` - Indices of out-of-order elements within the block.
321321

322322
// The current block on the left side (from `l` to `l.add(block_l)`).
323323
let mut l = v.as_mut_ptr();
@@ -327,7 +327,7 @@ where
327327
let mut offsets_l = [MaybeUninit::<u8>::uninit(); BLOCK];
328328

329329
// The current block on the right side (from `r.sub(block_r)` to `r`).
330-
// SAFETY: The documentation for .add() specifically mention that `vec.as_ptr().add(vec.len())` is always safe`
330+
// SAFETY: The documentation for .add() specifically mention that `vec.as_ptr().add(vec.len())` is always safe
331331
let mut r = unsafe { l.add(v.len()) };
332332
let mut block_r = BLOCK;
333333
let mut start_r = ptr::null_mut();

library/core/tests/iter/adapters/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mod zip;
2424

2525
use core::cell::Cell;
2626

27-
/// An iterator that panics whenever `next` or next_back` is called
27+
/// An iterator that panics whenever `next` or `next_back` is called
2828
/// after `None` has already been returned. This does not violate
2929
/// `Iterator`'s contract. Used to test that iterator adapters don't
3030
/// poll their inner iterators after exhausting them.

library/portable-simd/crates/core_simd/src/vector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::simd::{
2828
/// let zm_add = a0.zip(a1).map(|(lhs, rhs)| lhs + rhs);
2929
/// let zm_mul = a0.zip(a1).map(|(lhs, rhs)| lhs * rhs);
3030
///
31-
/// // `Simd<T, N>` implements `From<[T; N]>
31+
/// // `Simd<T, N>` implements `From<[T; N]>`
3232
/// let (v0, v1) = (Simd::from(a0), Simd::from(a1));
3333
/// // Which means arrays implement `Into<Simd<T, N>>`.
3434
/// assert_eq!(v0 + v1, zm_add.into());

library/std/src/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ impl From<fs::File> for Stdio {
14161416
/// use std::fs::File;
14171417
/// use std::process::Command;
14181418
///
1419-
/// // With the `foo.txt` file containing `Hello, world!"
1419+
/// // With the `foo.txt` file containing "Hello, world!"
14201420
/// let file = File::open("foo.txt").unwrap();
14211421
///
14221422
/// let reverse = Command::new("rev")

library/std/src/sys/itron/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl Thread {
247247
// [FINISHED → JOINED]
248248
// To synchronize with the child task's memory accesses to
249249
// `inner` up to the point of the assignment of `FINISHED`,
250-
// `Ordering::Acquire` must be used for the above `swap` call`.
250+
// `Ordering::Acquire` must be used for the above `swap` call.
251251
}
252252
_ => unsafe { hint::unreachable_unchecked() },
253253
}

library/std/src/sys/unix/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ pub fn cvt_nz(error: libc::c_int) -> crate::io::Result<()> {
329329
// do so. In 1003.1-2004 this was fixed.
330330
//
331331
// glibc's implementation did the flush, unsafely, before glibc commit
332-
// 91e7cf982d01 `abort: Do not flush stdio streams [BZ #15436]' by Florian
332+
// 91e7cf982d01 `abort: Do not flush stdio streams [BZ #15436]` by Florian
333333
// Weimer. According to glibc's NEWS:
334334
//
335335
// The abort function terminates the process immediately, without flushing

library/std/src/sys_common/net/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn no_lookup_host_duplicates() {
66
let mut addrs = HashMap::new();
77
let lh = match LookupHost::try_from(("localhost", 0)) {
88
Ok(lh) => lh,
9-
Err(e) => panic!("couldn't resolve `localhost': {e}"),
9+
Err(e) => panic!("couldn't resolve `localhost`: {e}"),
1010
};
1111
for sa in lh {
1212
*addrs.entry(sa).or_insert(0) += 1;

library/std/src/sys_common/wtf8.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ impl Wtf8 {
594594
}
595595

596596
/// Returns the code point at `position` if it is in the ASCII range,
597-
/// or `b'\xFF' otherwise.
597+
/// or `b'\xFF'` otherwise.
598598
///
599599
/// # Panics
600600
///

library/test/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ fn make_owned_test(test: &&TestDescAndFn) -> TestDescAndFn {
204204
}
205205

206206
/// Invoked when unit tests terminate. Returns `Result::Err` if the test is
207-
/// considered a failure. By default, invokes `report() and checks for a `0`
207+
/// considered a failure. By default, invokes `report()` and checks for a `0`
208208
/// result.
209209
pub fn assert_test_result<T: Termination>(result: T) -> Result<(), String> {
210210
let code = result.report().to_i32();

library/unwind/src/libunwind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub type _Unwind_Exception_Cleanup_Fn =
8989

9090
// FIXME: The `#[link]` attributes on `extern "C"` block marks those symbols declared in
9191
// the block are reexported in dylib build of std. This is needed when build rustc with
92-
// feature `llvm-libunwind', as no other cdylib will provided those _Unwind_* symbols.
92+
// feature `llvm-libunwind`, as no other cdylib will provided those _Unwind_* symbols.
9393
// However the `link` attribute is duplicated multiple times and does not just export symbol,
9494
// a better way to manually export symbol would be another attribute like `#[export]`.
9595
// See the logic in function rustc_codegen_ssa::src::back::exported_symbols, module

0 commit comments

Comments
 (0)