fix typo in docs and comments
This commit is contained in:
parent
0f9f0b384a
commit
16047d46a1
8 changed files with 8 additions and 8 deletions
|
@ -733,7 +733,7 @@ fn get_nullable_type<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<Ty<'t
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if this enum can be safely exported based on the "nullable pointer optimization". If it
|
/// Check if this enum can be safely exported based on the "nullable pointer optimization". If it
|
||||||
/// can, return the the type that `ty` can be safely converted to, otherwise return `None`.
|
/// can, return the type that `ty` can be safely converted to, otherwise return `None`.
|
||||||
/// Currently restricted to function pointers, boxes, references, `core::num::NonZero*`,
|
/// Currently restricted to function pointers, boxes, references, `core::num::NonZero*`,
|
||||||
/// `core::ptr::NonNull`, and `#[repr(transparent)]` newtypes.
|
/// `core::ptr::NonNull`, and `#[repr(transparent)]` newtypes.
|
||||||
/// FIXME: This duplicates code in codegen.
|
/// FIXME: This duplicates code in codegen.
|
||||||
|
|
|
@ -33,7 +33,7 @@ impl PredecessorCache {
|
||||||
self.cache = OnceCell::new();
|
self.cache = OnceCell::new();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the the predecessor graph for this MIR.
|
/// Returns the predecessor graph for this MIR.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(super) fn compute(
|
pub(super) fn compute(
|
||||||
&self,
|
&self,
|
||||||
|
|
|
@ -71,7 +71,7 @@ impl<'tcx> MemberConstraintSet<'tcx, ty::RegionVid> {
|
||||||
/// Pushes a member constraint into the set.
|
/// Pushes a member constraint into the set.
|
||||||
///
|
///
|
||||||
/// The input member constraint `m_c` is in the form produced by
|
/// The input member constraint `m_c` is in the form produced by
|
||||||
/// the the `rustc_middle::infer` code.
|
/// the `rustc_middle::infer` code.
|
||||||
///
|
///
|
||||||
/// The `to_region_vid` callback fn is used to convert the regions
|
/// The `to_region_vid` callback fn is used to convert the regions
|
||||||
/// within into `RegionVid` format -- it typically consults the
|
/// within into `RegionVid` format -- it typically consults the
|
||||||
|
|
|
@ -321,7 +321,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
let target_block = self.cfg.start_new_block();
|
let target_block = self.cfg.start_new_block();
|
||||||
let mut schedule_drops = true;
|
let mut schedule_drops = true;
|
||||||
// We keep a stack of all of the bindings and type asciptions
|
// We keep a stack of all of the bindings and type asciptions
|
||||||
// from the the parent candidates that we visit, that also need to
|
// from the parent candidates that we visit, that also need to
|
||||||
// be bound for each candidate.
|
// be bound for each candidate.
|
||||||
traverse_candidate(
|
traverse_candidate(
|
||||||
candidate,
|
candidate,
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl<'a> Parser<'a> {
|
||||||
|
|
||||||
/// Parse a type suitable for a function or function pointer parameter.
|
/// Parse a type suitable for a function or function pointer parameter.
|
||||||
/// The difference from `parse_ty` is that this version allows `...`
|
/// The difference from `parse_ty` is that this version allows `...`
|
||||||
/// (`CVarArgs`) at the top level of the the type.
|
/// (`CVarArgs`) at the top level of the type.
|
||||||
pub(super) fn parse_ty_for_param(&mut self) -> PResult<'a, P<Ty>> {
|
pub(super) fn parse_ty_for_param(&mut self) -> PResult<'a, P<Ty>> {
|
||||||
self.parse_ty_common(AllowPlus::Yes, RecoverQPath::Yes, AllowCVariadic::Yes)
|
self.parse_ty_common(AllowPlus::Yes, RecoverQPath::Yes, AllowCVariadic::Yes)
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ symbols! {
|
||||||
// called `sym::proc_macro` because then it's easy to mistakenly think it
|
// called `sym::proc_macro` because then it's easy to mistakenly think it
|
||||||
// represents "proc_macro".
|
// represents "proc_macro".
|
||||||
//
|
//
|
||||||
// As well as the symbols listed, there are symbols for the the strings
|
// As well as the symbols listed, there are symbols for the strings
|
||||||
// "0", "1", ..., "9", which are accessible via `sym::integer`.
|
// "0", "1", ..., "9", which are accessible via `sym::integer`.
|
||||||
//
|
//
|
||||||
// The proc macro will abort if symbols are not in alphabetical order (as
|
// The proc macro will abort if symbols are not in alphabetical order (as
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
//! ## No interop with C required
|
//! ## No interop with C required
|
||||||
//!
|
//!
|
||||||
//! By default the `crt-static` target feature is enabled, and when enabled
|
//! By default the `crt-static` target feature is enabled, and when enabled
|
||||||
//! this means that the the bundled version of `libc.a` found in `liblibc.rlib`
|
//! this means that the bundled version of `libc.a` found in `liblibc.rlib`
|
||||||
//! is used. This isn't intended really for interoperation with a C because it
|
//! is used. This isn't intended really for interoperation with a C because it
|
||||||
//! may be the case that Rust's bundled C library is incompatible with a
|
//! may be the case that Rust's bundled C library is incompatible with a
|
||||||
//! foreign-compiled C library. In this use case, though, we use `rust-lld` and
|
//! foreign-compiled C library. In this use case, though, we use `rust-lld` and
|
||||||
|
|
|
@ -1843,7 +1843,7 @@ fn binding_opaque_type_cycle_error(
|
||||||
) {
|
) {
|
||||||
let mut err = struct_span_err!(tcx.sess, span, E0720, "cannot resolve opaque type");
|
let mut err = struct_span_err!(tcx.sess, span, E0720, "cannot resolve opaque type");
|
||||||
err.span_label(span, "cannot resolve opaque type");
|
err.span_label(span, "cannot resolve opaque type");
|
||||||
// Find the the owner that declared this `impl Trait` type.
|
// Find the owner that declared this `impl Trait` type.
|
||||||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||||
let mut prev_hir_id = hir_id;
|
let mut prev_hir_id = hir_id;
|
||||||
let mut hir_id = tcx.hir().get_parent_node(hir_id);
|
let mut hir_id = tcx.hir().get_parent_node(hir_id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue