Skip to content

Commit 16047d4

Browse files
committed
fix typo in docs and comments
1 parent 0f9f0b3 commit 16047d4

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

compiler/rustc_lint/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ fn get_nullable_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'t
733733
}
734734

735735
/// Check if this enum can be safely exported based on the "nullable pointer optimization". If it
736-
/// can, return the the type that `ty` can be safely converted to, otherwise return `None`.
736+
/// can, return the type that `ty` can be safely converted to, otherwise return `None`.
737737
/// Currently restricted to function pointers, boxes, references, `core::num::NonZero*`,
738738
/// `core::ptr::NonNull`, and `#[repr(transparent)]` newtypes.
739739
/// FIXME: This duplicates code in codegen.

compiler/rustc_middle/src/mir/predecessors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl PredecessorCache {
3333
self.cache = OnceCell::new();
3434
}
3535

36-
/// Returns the the predecessor graph for this MIR.
36+
/// Returns the predecessor graph for this MIR.
3737
#[inline]
3838
pub(super) fn compute(
3939
&self,

compiler/rustc_mir/src/borrow_check/member_constraints.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl<'tcx> MemberConstraintSet<'tcx, ty::RegionVid> {
7171
/// Pushes a member constraint into the set.
7272
///
7373
/// The input member constraint `m_c` is in the form produced by
74-
/// the the `rustc_middle::infer` code.
74+
/// the `rustc_middle::infer` code.
7575
///
7676
/// The `to_region_vid` callback fn is used to convert the regions
7777
/// within into `RegionVid` format -- it typically consults the

compiler/rustc_mir_build/src/build/matches/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
321321
let target_block = self.cfg.start_new_block();
322322
let mut schedule_drops = true;
323323
// We keep a stack of all of the bindings and type asciptions
324-
// from the the parent candidates that we visit, that also need to
324+
// from the parent candidates that we visit, that also need to
325325
// be bound for each candidate.
326326
traverse_candidate(
327327
candidate,

compiler/rustc_parse/src/parser/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<'a> Parser<'a> {
6767

6868
/// Parse a type suitable for a function or function pointer parameter.
6969
/// The difference from `parse_ty` is that this version allows `...`
70-
/// (`CVarArgs`) at the top level of the the type.
70+
/// (`CVarArgs`) at the top level of the type.
7171
pub(super) fn parse_ty_for_param(&mut self) -> PResult<'a, P<Ty>> {
7272
self.parse_ty_common(AllowPlus::Yes, RecoverQPath::Yes, AllowCVariadic::Yes)
7373
}

compiler/rustc_span/src/symbol.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ symbols! {
110110
// called `sym::proc_macro` because then it's easy to mistakenly think it
111111
// represents "proc_macro".
112112
//
113-
// As well as the symbols listed, there are symbols for the the strings
113+
// As well as the symbols listed, there are symbols for the strings
114114
// "0", "1", ..., "9", which are accessible via `sym::integer`.
115115
//
116116
// The proc macro will abort if symbols are not in alphabetical order (as

compiler/rustc_target/src/spec/wasm32_wasi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! ## No interop with C required
3131
//!
3232
//! By default the `crt-static` target feature is enabled, and when enabled
33-
//! this means that the the bundled version of `libc.a` found in `liblibc.rlib`
33+
//! this means that the bundled version of `libc.a` found in `liblibc.rlib`
3434
//! is used. This isn't intended really for interoperation with a C because it
3535
//! may be the case that Rust's bundled C library is incompatible with a
3636
//! foreign-compiled C library. In this use case, though, we use `rust-lld` and

compiler/rustc_typeck/src/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,7 @@ fn binding_opaque_type_cycle_error(
18431843
) {
18441844
let mut err = struct_span_err!(tcx.sess, span, E0720, "cannot resolve opaque type");
18451845
err.span_label(span, "cannot resolve opaque type");
1846-
// Find the the owner that declared this `impl Trait` type.
1846+
// Find the owner that declared this `impl Trait` type.
18471847
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
18481848
let mut prev_hir_id = hir_id;
18491849
let mut hir_id = tcx.hir().get_parent_node(hir_id);

0 commit comments

Comments
 (0)