mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Match unmatched backticks in compiler/ that are part of rustdoc
This commit is contained in:
parent
13471d3b20
commit
ff2c609d66
@ -1607,7 +1607,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||||||
hir::OwnerNode::Item(self.arena.alloc(opaque_ty_item))
|
hir::OwnerNode::Item(self.arena.alloc(opaque_ty_item))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Given a `parent_def_id`, a list of `lifetimes_in_bounds and a `remapping` hash to be
|
/// Given a `parent_def_id`, a list of `lifetimes_in_bounds` and a `remapping` hash to be
|
||||||
/// filled, this function creates new definitions for `Param` and `Fresh` lifetimes, inserts the
|
/// filled, this function creates new definitions for `Param` and `Fresh` lifetimes, inserts the
|
||||||
/// new definition, adds it to the remapping with the definition of the given lifetime and
|
/// new definition, adds it to the remapping with the definition of the given lifetime and
|
||||||
/// returns a list of lifetimes to be lowered afterwards.
|
/// returns a list of lifetimes to be lowered afterwards.
|
||||||
|
@ -415,7 +415,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
|
|||||||
/// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }
|
/// fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Here we would be invoked with `fr = 'a` and `outlived_fr = `'b`.
|
/// Here we would be invoked with `fr = 'a` and `outlived_fr = 'b`.
|
||||||
pub(crate) fn report_region_error(
|
pub(crate) fn report_region_error(
|
||||||
&mut self,
|
&mut self,
|
||||||
fr: RegionVid,
|
fr: RegionVid,
|
||||||
|
@ -889,7 +889,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
|||||||
/// from a universe it can't name; at present, the only way for
|
/// from a universe it can't name; at present, the only way for
|
||||||
/// this to be true is if `scc` outlives `'static`. This is
|
/// this to be true is if `scc` outlives `'static`. This is
|
||||||
/// actually stricter than necessary: ideally, we'd support bounds
|
/// actually stricter than necessary: ideally, we'd support bounds
|
||||||
/// like `for<'a: 'b`>` that might then allow us to approximate
|
/// like `for<'a: 'b>` that might then allow us to approximate
|
||||||
/// `'a` with `'b` and not `'static`. But it will have to do for
|
/// `'a` with `'b` and not `'static`. But it will have to do for
|
||||||
/// now.
|
/// now.
|
||||||
fn add_incompatible_universe(&mut self, scc: ConstraintSccIndex) {
|
fn add_incompatible_universe(&mut self, scc: ConstraintSccIndex) {
|
||||||
|
@ -235,7 +235,7 @@ pub(crate) struct RegionValues<N: Idx> {
|
|||||||
free_regions: SparseBitMatrix<N, RegionVid>,
|
free_regions: SparseBitMatrix<N, RegionVid>,
|
||||||
|
|
||||||
/// Placeholders represent bound regions -- so something like `'a`
|
/// Placeholders represent bound regions -- so something like `'a`
|
||||||
/// in for<'a> fn(&'a u32)`.
|
/// in `for<'a> fn(&'a u32)`.
|
||||||
placeholders: SparseBitMatrix<N, PlaceholderIndex>,
|
placeholders: SparseBitMatrix<N, PlaceholderIndex>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2223,7 +2223,7 @@ fn determine_place_ancestry_relation<'tcx>(
|
|||||||
/// || drop(&*m.a.field_of_a)
|
/// || drop(&*m.a.field_of_a)
|
||||||
/// // Here we really do want to capture `*m.a` because that outlives `'static`
|
/// // Here we really do want to capture `*m.a` because that outlives `'static`
|
||||||
///
|
///
|
||||||
/// // If we capture `m`, then the closure no longer outlives `'static'
|
/// // If we capture `m`, then the closure no longer outlives `'static`
|
||||||
/// // it is constrained to `'a`
|
/// // it is constrained to `'a`
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
//! the HIR doesn't change as a result of the annotations, which might
|
//! the HIR doesn't change as a result of the annotations, which might
|
||||||
//! perturb the reuse results.
|
//! perturb the reuse results.
|
||||||
//!
|
//!
|
||||||
//! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
|
//! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]`
|
||||||
//! allows for doing a more fine-grained check to see if pre- or post-lto data
|
//! allows for doing a more fine-grained check to see if pre- or post-lto data
|
||||||
//! was re-used.
|
//! was re-used.
|
||||||
|
|
||||||
|
@ -1870,7 +1870,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Subtracts `set from `row`. `set` can be either `BitSet` or
|
/// Subtracts `set` from `row`. `set` can be either `BitSet` or
|
||||||
/// `HybridBitSet`. Has no effect if `row` does not exist.
|
/// `HybridBitSet`. Has no effect if `row` does not exist.
|
||||||
///
|
///
|
||||||
/// Returns true if the row was changed.
|
/// Returns true if the row was changed.
|
||||||
|
@ -50,7 +50,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||||||
|
|
||||||
/// Like [Self::canonicalize_query], but preserves distinct universes. For
|
/// Like [Self::canonicalize_query], but preserves distinct universes. For
|
||||||
/// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
|
/// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
|
||||||
/// `'?1` is in `U3` would be canonicalized to have ?0` in `U1` and `'?1`
|
/// `'?1` is in `U3` would be canonicalized to have `?0` in `U1` and `'?1`
|
||||||
/// in `U2`.
|
/// in `U2`.
|
||||||
///
|
///
|
||||||
/// This is used for Chalk integration.
|
/// This is used for Chalk integration.
|
||||||
|
@ -70,7 +70,7 @@ pub enum RegionResolutionError<'tcx> {
|
|||||||
/// `o` requires that `a <= b`, but this does not hold
|
/// `o` requires that `a <= b`, but this does not hold
|
||||||
ConcreteFailure(SubregionOrigin<'tcx>, Region<'tcx>, Region<'tcx>),
|
ConcreteFailure(SubregionOrigin<'tcx>, Region<'tcx>, Region<'tcx>),
|
||||||
|
|
||||||
/// `GenericBoundFailure(p, s, a)
|
/// `GenericBoundFailure(p, s, a)`:
|
||||||
///
|
///
|
||||||
/// The parameter/associated-type `p` must be known to outlive the lifetime
|
/// The parameter/associated-type `p` must be known to outlive the lifetime
|
||||||
/// `a` (but none of the known bounds are sufficient).
|
/// `a` (but none of the known bounds are sufficient).
|
||||||
|
@ -50,7 +50,7 @@ where
|
|||||||
///
|
///
|
||||||
/// - Covariant means `a <: b`.
|
/// - Covariant means `a <: b`.
|
||||||
/// - Contravariant means `b <: a`.
|
/// - Contravariant means `b <: a`.
|
||||||
/// - Invariant means `a == b.
|
/// - Invariant means `a == b`.
|
||||||
/// - Bivariant means that it doesn't matter.
|
/// - Bivariant means that it doesn't matter.
|
||||||
ambient_variance: ty::Variance,
|
ambient_variance: ty::Variance,
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ pub enum VerifyBound<'tcx> {
|
|||||||
/// in that case we can show `'b: 'c`. But if `'?x` winds up being something
|
/// in that case we can show `'b: 'c`. But if `'?x` winds up being something
|
||||||
/// else, the bound isn't relevant.
|
/// else, the bound isn't relevant.
|
||||||
///
|
///
|
||||||
/// In the [`VerifyBound`], this struct is enclosed in `Binder to account
|
/// In the [`VerifyBound`], this struct is enclosed in `Binder` to account
|
||||||
/// for cases like
|
/// for cases like
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
@ -1288,7 +1288,7 @@ declare_lint! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare_lint_pass!(
|
declare_lint_pass!(
|
||||||
/// Explains corresponding feature flag must be enabled for the `#[track_caller] attribute to
|
/// Explains corresponding feature flag must be enabled for the `#[track_caller]` attribute to
|
||||||
/// do anything
|
/// do anything
|
||||||
UngatedAsyncFnTrackCaller => [UNGATED_ASYNC_FN_TRACK_CALLER]
|
UngatedAsyncFnTrackCaller => [UNGATED_ASYNC_FN_TRACK_CALLER]
|
||||||
);
|
);
|
||||||
|
@ -1672,7 +1672,7 @@ rustc_queries! {
|
|||||||
|
|
||||||
/// Does lifetime resolution on items. Importantly, we can't resolve
|
/// Does lifetime resolution on items. Importantly, we can't resolve
|
||||||
/// lifetimes directly on things like trait methods, because of trait params.
|
/// lifetimes directly on things like trait methods, because of trait params.
|
||||||
/// See `rustc_resolve::late::lifetimes for details.
|
/// See `rustc_resolve::late::lifetimes` for details.
|
||||||
query resolve_bound_vars(_: hir::OwnerId) -> &'tcx ResolveBoundVars {
|
query resolve_bound_vars(_: hir::OwnerId) -> &'tcx ResolveBoundVars {
|
||||||
arena_cache
|
arena_cache
|
||||||
desc { "resolving lifetimes" }
|
desc { "resolving lifetimes" }
|
||||||
|
@ -16,7 +16,7 @@ pub use int::*;
|
|||||||
pub use kind::*;
|
pub use kind::*;
|
||||||
pub use valtree::*;
|
pub use valtree::*;
|
||||||
|
|
||||||
/// Use this rather than `ConstData, whenever possible.
|
/// Use this rather than `ConstData`, whenever possible.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
|
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
|
||||||
#[rustc_pass_by_value]
|
#[rustc_pass_by_value]
|
||||||
pub struct Const<'tcx>(pub(super) Interned<'tcx, ConstData<'tcx>>);
|
pub struct Const<'tcx>(pub(super) Interned<'tcx, ConstData<'tcx>>);
|
||||||
|
@ -310,7 +310,7 @@ pub struct CommonLifetimes<'tcx> {
|
|||||||
pub re_vars: Vec<Region<'tcx>>,
|
pub re_vars: Vec<Region<'tcx>>,
|
||||||
|
|
||||||
/// Pre-interned values of the form:
|
/// Pre-interned values of the form:
|
||||||
/// `ReLateBound(DebruijnIndex(i), BoundRegion { var: v, kind: BrAnon(v, None) })
|
/// `ReLateBound(DebruijnIndex(i), BoundRegion { var: v, kind: BrAnon(v, None) })`
|
||||||
/// for small values of `i` and `v`.
|
/// for small values of `i` and `v`.
|
||||||
pub re_late_bounds: Vec<Vec<Region<'tcx>>>,
|
pub re_late_bounds: Vec<Vec<Region<'tcx>>>,
|
||||||
}
|
}
|
||||||
@ -2450,7 +2450,7 @@ impl<'tcx> TyCtxtAt<'tcx> {
|
|||||||
self.tcx.ty_error_with_message(self.span, "TyKind::Error constructed but no error reported")
|
self.tcx.ty_error_with_message(self.span, "TyKind::Error constructed but no error reported")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
|
/// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg` to
|
||||||
/// ensure it gets used.
|
/// ensure it gets used.
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn ty_error_with_message(self, msg: &str) -> Ty<'tcx> {
|
pub fn ty_error_with_message(self, msg: &str) -> Ty<'tcx> {
|
||||||
|
@ -2444,7 +2444,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if the given `DefId` is `#\[automatically_derived\], *and*
|
/// Check if the given `DefId` is `#\[automatically_derived\]`, *and*
|
||||||
/// whether it was produced by expanding a builtin derive macro.
|
/// whether it was produced by expanding a builtin derive macro.
|
||||||
pub fn is_builtin_derived(self, def_id: DefId) -> bool {
|
pub fn is_builtin_derived(self, def_id: DefId) -> bool {
|
||||||
if self.is_automatically_derived(def_id)
|
if self.is_automatically_derived(def_id)
|
||||||
|
@ -694,7 +694,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
|
|||||||
/// `prev.span.hi()` will be greater than (further right of) `prev_original_span.hi()`.
|
/// `prev.span.hi()` will be greater than (further right of) `prev_original_span.hi()`.
|
||||||
/// If prev.span() was split off to the right of a closure, prev.span().lo() will be
|
/// If prev.span() was split off to the right of a closure, prev.span().lo() will be
|
||||||
/// greater than prev_original_span.lo(). The actual span of `prev_original_span` is
|
/// greater than prev_original_span.lo(). The actual span of `prev_original_span` is
|
||||||
/// not as important as knowing that `prev()` **used to have the same span** as `curr(),
|
/// not as important as knowing that `prev()` **used to have the same span** as `curr()`,
|
||||||
/// which means their sort order is still meaningful for determining the dominator
|
/// which means their sort order is still meaningful for determining the dominator
|
||||||
/// relationship.
|
/// relationship.
|
||||||
///
|
///
|
||||||
|
@ -9,7 +9,7 @@ pub(super) struct RWU {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Conceptually, this is like a `Vec<Vec<RWU>>`. But the number of
|
/// Conceptually, this is like a `Vec<Vec<RWU>>`. But the number of
|
||||||
/// RWU`s can get very large, so it uses a more compact representation.
|
/// RWU's can get very large, so it uses a more compact representation.
|
||||||
pub(super) struct RWUTable {
|
pub(super) struct RWUTable {
|
||||||
/// Total number of live nodes.
|
/// Total number of live nodes.
|
||||||
live_nodes: usize,
|
live_nodes: usize,
|
||||||
|
@ -368,7 +368,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||||||
/// This is a variation of `fn resolve_ident_in_lexical_scope` that can be run during
|
/// This is a variation of `fn resolve_ident_in_lexical_scope` that can be run during
|
||||||
/// expansion and import resolution (perhaps they can be merged in the future).
|
/// expansion and import resolution (perhaps they can be merged in the future).
|
||||||
/// The function is used for resolving initial segments of macro paths (e.g., `foo` in
|
/// The function is used for resolving initial segments of macro paths (e.g., `foo` in
|
||||||
/// `foo::bar!(); or `foo!();`) and also for import paths on 2018 edition.
|
/// `foo::bar!();` or `foo!();`) and also for import paths on 2018 edition.
|
||||||
#[instrument(level = "debug", skip(self, scope_set))]
|
#[instrument(level = "debug", skip(self, scope_set))]
|
||||||
pub(crate) fn early_resolve_ident_in_lexical_scope(
|
pub(crate) fn early_resolve_ident_in_lexical_scope(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
@ -2792,7 +2792,7 @@ pub enum PpMode {
|
|||||||
HirTree,
|
HirTree,
|
||||||
/// `-Zunpretty=thir-tree`
|
/// `-Zunpretty=thir-tree`
|
||||||
ThirTree,
|
ThirTree,
|
||||||
/// `-Zunpretty=`thir-flat`
|
/// `-Zunpretty=thir-flat`
|
||||||
ThirFlat,
|
ThirFlat,
|
||||||
/// `-Zunpretty=mir`
|
/// `-Zunpretty=mir`
|
||||||
Mir,
|
Mir,
|
||||||
|
@ -1175,7 +1175,7 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
|
|||||||
/// paths you want to take. To make things worse, it was possible for
|
/// paths you want to take. To make things worse, it was possible for
|
||||||
/// cycles to arise, where you basically had a setup like `<MyType<$0>
|
/// cycles to arise, where you basically had a setup like `<MyType<$0>
|
||||||
/// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0> as
|
/// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0> as
|
||||||
/// Trait>::Foo> to `[type error]` would lead to an obligation of
|
/// Trait>::Foo>` to `[type error]` would lead to an obligation of
|
||||||
/// `<MyType<[type error]> as Trait>::Foo`. We are supposed to report
|
/// `<MyType<[type error]> as Trait>::Foo`. We are supposed to report
|
||||||
/// an error for this obligation, but we legitimately should not,
|
/// an error for this obligation, but we legitimately should not,
|
||||||
/// because it contains `[type error]`. Yuck! (See issue #29857 for
|
/// because it contains `[type error]`. Yuck! (See issue #29857 for
|
||||||
|
@ -151,7 +151,7 @@ struct TraitObligationStack<'prev, 'tcx> {
|
|||||||
/// you don't want to cache that `B: AutoTrait` or `A: AutoTrait`
|
/// you don't want to cache that `B: AutoTrait` or `A: AutoTrait`
|
||||||
/// is `EvaluatedToOk`; this is because they were only considered
|
/// is `EvaluatedToOk`; this is because they were only considered
|
||||||
/// ok on the premise that if `A: AutoTrait` held, but we indeed
|
/// ok on the premise that if `A: AutoTrait` held, but we indeed
|
||||||
/// encountered a problem (later on) with `A: AutoTrait. So we
|
/// encountered a problem (later on) with `A: AutoTrait`. So we
|
||||||
/// currently set a flag on the stack node for `B: AutoTrait` (as
|
/// currently set a flag on the stack node for `B: AutoTrait` (as
|
||||||
/// well as the second instance of `A: AutoTrait`) to suppress
|
/// well as the second instance of `A: AutoTrait`) to suppress
|
||||||
/// caching.
|
/// caching.
|
||||||
|
Loading…
Reference in New Issue
Block a user