Directly use the instrument
macro instead of its full path
This commit is contained in:
parent
4f9898a794
commit
d3b22c7267
25 changed files with 86 additions and 89 deletions
|
@ -31,7 +31,7 @@ pub(super) struct NodeCollector<'a, 'hir> {
|
||||||
definitions: &'a definitions::Definitions,
|
definitions: &'a definitions::Definitions,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(sess, definitions, bodies))]
|
#[instrument(level = "debug", skip(sess, definitions, bodies))]
|
||||||
pub(super) fn index_hir<'hir>(
|
pub(super) fn index_hir<'hir>(
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
definitions: &definitions::Definitions,
|
definitions: &definitions::Definitions,
|
||||||
|
@ -67,7 +67,7 @@ pub(super) fn index_hir<'hir>(
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'hir> NodeCollector<'a, 'hir> {
|
impl<'a, 'hir> NodeCollector<'a, 'hir> {
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn insert(&mut self, span: Span, hir_id: HirId, node: Node<'hir>) {
|
fn insert(&mut self, span: Span, hir_id: HirId, node: Node<'hir>) {
|
||||||
debug_assert_eq!(self.owner, hir_id.owner);
|
debug_assert_eq!(self.owner, hir_id.owner);
|
||||||
debug_assert_ne!(hir_id.local_id.as_u32(), 0);
|
debug_assert_ne!(hir_id.local_id.as_u32(), 0);
|
||||||
|
@ -142,7 +142,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_item(&mut self, i: &'hir Item<'hir>) {
|
fn visit_item(&mut self, i: &'hir Item<'hir>) {
|
||||||
debug_assert_eq!(i.def_id, self.owner);
|
debug_assert_eq!(i.def_id, self.owner);
|
||||||
self.with_parent(i.hir_id(), |this| {
|
self.with_parent(i.hir_id(), |this| {
|
||||||
|
@ -156,7 +156,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_foreign_item(&mut self, fi: &'hir ForeignItem<'hir>) {
|
fn visit_foreign_item(&mut self, fi: &'hir ForeignItem<'hir>) {
|
||||||
debug_assert_eq!(fi.def_id, self.owner);
|
debug_assert_eq!(fi.def_id, self.owner);
|
||||||
self.with_parent(fi.hir_id(), |this| {
|
self.with_parent(fi.hir_id(), |this| {
|
||||||
|
@ -175,7 +175,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_trait_item(&mut self, ti: &'hir TraitItem<'hir>) {
|
fn visit_trait_item(&mut self, ti: &'hir TraitItem<'hir>) {
|
||||||
debug_assert_eq!(ti.def_id, self.owner);
|
debug_assert_eq!(ti.def_id, self.owner);
|
||||||
self.with_parent(ti.hir_id(), |this| {
|
self.with_parent(ti.hir_id(), |this| {
|
||||||
|
@ -183,7 +183,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_impl_item(&mut self, ii: &'hir ImplItem<'hir>) {
|
fn visit_impl_item(&mut self, ii: &'hir ImplItem<'hir>) {
|
||||||
debug_assert_eq!(ii.def_id, self.owner);
|
debug_assert_eq!(ii.def_id, self.owner);
|
||||||
self.with_parent(ii.hir_id(), |this| {
|
self.with_parent(ii.hir_id(), |this| {
|
||||||
|
|
|
@ -220,7 +220,7 @@ impl ResolverAstLoweringExt for ResolverAstLowering {
|
||||||
/// Panics if no map has been pushed.
|
/// Panics if no map has been pushed.
|
||||||
/// Remapping is used when creating lowering `-> impl Trait` return
|
/// Remapping is used when creating lowering `-> impl Trait` return
|
||||||
/// types to create the resulting opaque type.
|
/// types to create the resulting opaque type.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId) {
|
fn record_def_id_remap(&mut self, from: LocalDefId, to: LocalDefId) {
|
||||||
self.generics_def_id_map.last_mut().expect("no map pushed").insert(from, to);
|
self.generics_def_id_map.last_mut().expect("no map pushed").insert(from, to);
|
||||||
}
|
}
|
||||||
|
@ -771,7 +771,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts a lifetime into a new generic parameter.
|
/// Converts a lifetime into a new generic parameter.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn lifetime_res_to_generic_param(
|
fn lifetime_res_to_generic_param(
|
||||||
&mut self,
|
&mut self,
|
||||||
ident: Ident,
|
ident: Ident,
|
||||||
|
@ -815,7 +815,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
/// name resolver owing to lifetime elision; this also populates the resolver's node-id->def-id
|
/// name resolver owing to lifetime elision; this also populates the resolver's node-id->def-id
|
||||||
/// map, so that later calls to `opt_node_id_to_def_id` that refer to these extra lifetime
|
/// map, so that later calls to `opt_node_id_to_def_id` that refer to these extra lifetime
|
||||||
/// parameters will be successful.
|
/// parameters will be successful.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn lower_lifetime_binder(
|
fn lower_lifetime_binder(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
@ -1385,7 +1385,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
/// added explicitly in the HIR). But this includes all the lifetimes, and we only want to
|
/// added explicitly in the HIR). But this includes all the lifetimes, and we only want to
|
||||||
/// capture the lifetimes that are referenced in the bounds. Therefore, we add *extra* lifetime parameters
|
/// capture the lifetimes that are referenced in the bounds. Therefore, we add *extra* lifetime parameters
|
||||||
/// for the lifetimes that get captured (`'x`, in our example above) and reference those.
|
/// for the lifetimes that get captured (`'x`, in our example above) and reference those.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn lower_opaque_impl_trait(
|
fn lower_opaque_impl_trait(
|
||||||
&mut self,
|
&mut self,
|
||||||
span: Span,
|
span: Span,
|
||||||
|
@ -1621,7 +1621,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
// `make_ret_async`: if `Some`, converts `-> T` into `-> impl Future<Output = T>` in the
|
// `make_ret_async`: if `Some`, converts `-> T` into `-> impl Future<Output = T>` in the
|
||||||
// return type. This is used for `async fn` declarations. The `NodeId` is the ID of the
|
// return type. This is used for `async fn` declarations. The `NodeId` is the ID of the
|
||||||
// return type `impl Trait` item.
|
// return type `impl Trait` item.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn lower_fn_decl(
|
fn lower_fn_decl(
|
||||||
&mut self,
|
&mut self,
|
||||||
decl: &FnDecl,
|
decl: &FnDecl,
|
||||||
|
@ -1730,7 +1730,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
// `output`: unlowered output type (`T` in `-> T`)
|
// `output`: unlowered output type (`T` in `-> T`)
|
||||||
// `fn_def_id`: `DefId` of the parent function (used to create child impl trait definition)
|
// `fn_def_id`: `DefId` of the parent function (used to create child impl trait definition)
|
||||||
// `opaque_ty_node_id`: `NodeId` of the opaque `impl Trait` type that should be created
|
// `opaque_ty_node_id`: `NodeId` of the opaque `impl Trait` type that should be created
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn lower_async_fn_ret_ty(
|
fn lower_async_fn_ret_ty(
|
||||||
&mut self,
|
&mut self,
|
||||||
output: &FnRetTy,
|
output: &FnRetTy,
|
||||||
|
@ -2013,7 +2013,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
self.new_named_lifetime(l.id, l.id, span, ident)
|
self.new_named_lifetime(l.id, l.id, span, ident)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn new_named_lifetime_with_res(
|
fn new_named_lifetime_with_res(
|
||||||
&mut self,
|
&mut self,
|
||||||
id: NodeId,
|
id: NodeId,
|
||||||
|
@ -2044,7 +2044,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
hir::Lifetime { hir_id: self.lower_node_id(id), span: self.lower_span(span), name }
|
hir::Lifetime { hir_id: self.lower_node_id(id), span: self.lower_span(span), name }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn new_named_lifetime(
|
fn new_named_lifetime(
|
||||||
&mut self,
|
&mut self,
|
||||||
id: NodeId,
|
id: NodeId,
|
||||||
|
@ -2132,7 +2132,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
hir::TraitRef { path, hir_ref_id: self.lower_node_id(p.ref_id) }
|
hir::TraitRef { path, hir_ref_id: self.lower_node_id(p.ref_id) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn lower_poly_trait_ref(
|
fn lower_poly_trait_ref(
|
||||||
&mut self,
|
&mut self,
|
||||||
p: &PolyTraitRef,
|
p: &PolyTraitRef,
|
||||||
|
|
|
@ -265,7 +265,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
|
||||||
/// *user* has a name for. In that case, we'll be able to map
|
/// *user* has a name for. In that case, we'll be able to map
|
||||||
/// `fr` to a `Region<'tcx>`, and that region will be one of
|
/// `fr` to a `Region<'tcx>`, and that region will be one of
|
||||||
/// named variants.
|
/// named variants.
|
||||||
#[tracing::instrument(level = "trace", skip(self))]
|
#[instrument(level = "trace", skip(self))]
|
||||||
fn give_name_from_error_region(&self, fr: RegionVid) -> Option<RegionName> {
|
fn give_name_from_error_region(&self, fr: RegionVid) -> Option<RegionName> {
|
||||||
let error_region = self.to_error_region(fr)?;
|
let error_region = self.to_error_region(fr)?;
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
|
||||||
/// | fn foo(x: &u32) { .. }
|
/// | fn foo(x: &u32) { .. }
|
||||||
/// ------- fully elaborated type of `x` is `&'1 u32`
|
/// ------- fully elaborated type of `x` is `&'1 u32`
|
||||||
/// ```
|
/// ```
|
||||||
#[tracing::instrument(level = "trace", skip(self))]
|
#[instrument(level = "trace", skip(self))]
|
||||||
fn give_name_if_anonymous_region_appears_in_arguments(
|
fn give_name_if_anonymous_region_appears_in_arguments(
|
||||||
&self,
|
&self,
|
||||||
fr: RegionVid,
|
fr: RegionVid,
|
||||||
|
@ -662,7 +662,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
|
||||||
/// | let x = Some(&22);
|
/// | let x = Some(&22);
|
||||||
/// - fully elaborated type of `x` is `Option<&'1 u32>`
|
/// - fully elaborated type of `x` is `Option<&'1 u32>`
|
||||||
/// ```
|
/// ```
|
||||||
#[tracing::instrument(level = "trace", skip(self))]
|
#[instrument(level = "trace", skip(self))]
|
||||||
fn give_name_if_anonymous_region_appears_in_upvars(&self, fr: RegionVid) -> Option<RegionName> {
|
fn give_name_if_anonymous_region_appears_in_upvars(&self, fr: RegionVid) -> Option<RegionName> {
|
||||||
let upvar_index = self.regioncx.get_upvar_index_for_region(self.infcx.tcx, fr)?;
|
let upvar_index = self.regioncx.get_upvar_index_for_region(self.infcx.tcx, fr)?;
|
||||||
let (upvar_name, upvar_span) = self.regioncx.get_upvar_name_and_span_for_region(
|
let (upvar_name, upvar_span) = self.regioncx.get_upvar_name_and_span_for_region(
|
||||||
|
@ -682,7 +682,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
|
||||||
/// must be a closure since, in a free fn, such an argument would
|
/// must be a closure since, in a free fn, such an argument would
|
||||||
/// have to either also appear in an argument (if using elision)
|
/// have to either also appear in an argument (if using elision)
|
||||||
/// or be early bound (named, not in argument).
|
/// or be early bound (named, not in argument).
|
||||||
#[tracing::instrument(level = "trace", skip(self))]
|
#[instrument(level = "trace", skip(self))]
|
||||||
fn give_name_if_anonymous_region_appears_in_output(&self, fr: RegionVid) -> Option<RegionName> {
|
fn give_name_if_anonymous_region_appears_in_output(&self, fr: RegionVid) -> Option<RegionName> {
|
||||||
let tcx = self.infcx.tcx;
|
let tcx = self.infcx.tcx;
|
||||||
let hir = tcx.hir();
|
let hir = tcx.hir();
|
||||||
|
@ -814,7 +814,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "trace", skip(self))]
|
#[instrument(level = "trace", skip(self))]
|
||||||
fn give_name_if_anonymous_region_appears_in_yield_ty(
|
fn give_name_if_anonymous_region_appears_in_yield_ty(
|
||||||
&self,
|
&self,
|
||||||
fr: RegionVid,
|
fr: RegionVid,
|
||||||
|
|
|
@ -42,7 +42,6 @@ use rustc_span::{self, FileNameDisplayPreference, SourceFile};
|
||||||
use rustc_symbol_mangling::typeid_for_trait_ref;
|
use rustc_symbol_mangling::typeid_for_trait_ref;
|
||||||
use rustc_target::abi::{Align, Size};
|
use rustc_target::abi::{Align, Size};
|
||||||
use smallvec::smallvec;
|
use smallvec::smallvec;
|
||||||
use tracing::debug;
|
|
||||||
|
|
||||||
use libc::{c_char, c_longlong, c_uint};
|
use libc::{c_char, c_longlong, c_uint};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
@ -51,7 +50,6 @@ use std::hash::{Hash, Hasher};
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use tracing::instrument;
|
|
||||||
|
|
||||||
impl PartialEq for llvm::Metadata {
|
impl PartialEq for llvm::Metadata {
|
||||||
fn eq(&self, other: &Self) -> bool {
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rustc_macros;
|
extern crate rustc_macros;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate tracing;
|
||||||
|
|
||||||
use back::write::{create_informational_target_machine, create_target_machine};
|
use back::write::{create_informational_target_machine, create_target_machine};
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,7 @@ pub enum InternKind {
|
||||||
/// tracks where in the value we are and thus can show much better error messages.
|
/// tracks where in the value we are and thus can show much better error messages.
|
||||||
/// Any errors here would anyway be turned into `const_err` lints, whereas validation failures
|
/// Any errors here would anyway be turned into `const_err` lints, whereas validation failures
|
||||||
/// are hard errors.
|
/// are hard errors.
|
||||||
#[tracing::instrument(level = "debug", skip(ecx))]
|
#[instrument(level = "debug", skip(ecx))]
|
||||||
pub fn intern_const_alloc_recursive<
|
pub fn intern_const_alloc_recursive<
|
||||||
'mir,
|
'mir,
|
||||||
'tcx: 'mir,
|
'tcx: 'mir,
|
||||||
|
|
|
@ -856,7 +856,7 @@ impl<'tcx> TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
|
||||||
Ok(a.rebind(self.relate(a.skip_binder(), b.skip_binder())?))
|
Ok(a.rebind(self.relate(a.skip_binder(), b.skip_binder())?))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn tys(&mut self, t: Ty<'tcx>, _t: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
|
fn tys(&mut self, t: Ty<'tcx>, _t: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
|
||||||
debug_assert_eq!(t, _t);
|
debug_assert_eq!(t, _t);
|
||||||
debug!("ConstInferUnifier: t={:?}", t);
|
debug!("ConstInferUnifier: t={:?}", t);
|
||||||
|
@ -932,7 +932,7 @@ impl<'tcx> TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn consts(
|
fn consts(
|
||||||
&mut self,
|
&mut self,
|
||||||
c: ty::Const<'tcx>,
|
c: ty::Const<'tcx>,
|
||||||
|
|
|
@ -1434,7 +1434,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||||
/// the message in `secondary_span` as the primary label, and apply the message that would
|
/// the message in `secondary_span` as the primary label, and apply the message that would
|
||||||
/// otherwise be used for the primary label on the `secondary_span` `Span`. This applies on
|
/// otherwise be used for the primary label on the `secondary_span` `Span`. This applies on
|
||||||
/// E0271, like `src/test/ui/issues/issue-39970.stderr`.
|
/// E0271, like `src/test/ui/issues/issue-39970.stderr`.
|
||||||
#[tracing::instrument(
|
#[instrument(
|
||||||
level = "debug",
|
level = "debug",
|
||||||
skip(self, diag, secondary_span, swap_secondary_and_primary, prefer_label)
|
skip(self, diag, secondary_span, swap_secondary_and_primary, prefer_label)
|
||||||
)]
|
)]
|
||||||
|
|
|
@ -313,7 +313,7 @@ where
|
||||||
self.delegate.push_verify(origin, generic, region, verify_bound);
|
self.delegate.push_verify(origin, generic, region, verify_bound);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn projection_must_outlive(
|
fn projection_must_outlive(
|
||||||
&mut self,
|
&mut self,
|
||||||
origin: infer::SubregionOrigin<'tcx>,
|
origin: infer::SubregionOrigin<'tcx>,
|
||||||
|
|
|
@ -34,7 +34,7 @@ use crate::infer::region_constraints::VerifyIfEq;
|
||||||
/// like are used. This is a particular challenge since this function is invoked
|
/// like are used. This is a particular challenge since this function is invoked
|
||||||
/// very late in inference and hence cannot make use of the normal inference
|
/// very late in inference and hence cannot make use of the normal inference
|
||||||
/// machinery.
|
/// machinery.
|
||||||
#[tracing::instrument(level = "debug", skip(tcx, param_env))]
|
#[instrument(level = "debug", skip(tcx, param_env))]
|
||||||
pub fn extract_verify_if_eq<'tcx>(
|
pub fn extract_verify_if_eq<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
|
@ -71,7 +71,7 @@ pub fn extract_verify_if_eq<'tcx>(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True if a (potentially higher-ranked) outlives
|
/// True if a (potentially higher-ranked) outlives
|
||||||
#[tracing::instrument(level = "debug", skip(tcx, param_env))]
|
#[instrument(level = "debug", skip(tcx, param_env))]
|
||||||
pub(super) fn can_match_erased_ty<'tcx>(
|
pub(super) fn can_match_erased_ty<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
param_env: ty::ParamEnv<'tcx>,
|
param_env: ty::ParamEnv<'tcx>,
|
||||||
|
@ -110,7 +110,7 @@ impl<'tcx> Match<'tcx> {
|
||||||
|
|
||||||
/// Binds the pattern variable `br` to `value`; returns an `Err` if the pattern
|
/// Binds the pattern variable `br` to `value`; returns an `Err` if the pattern
|
||||||
/// is already bound to a different value.
|
/// is already bound to a different value.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn bind(
|
fn bind(
|
||||||
&mut self,
|
&mut self,
|
||||||
br: ty::BoundRegion,
|
br: ty::BoundRegion,
|
||||||
|
|
|
@ -155,7 +155,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
///
|
///
|
||||||
/// * From each pre-binding block to the next pre-binding block.
|
/// * From each pre-binding block to the next pre-binding block.
|
||||||
/// * From each otherwise block to the next pre-binding block.
|
/// * From each otherwise block to the next pre-binding block.
|
||||||
#[tracing::instrument(level = "debug", skip(self, arms))]
|
#[instrument(level = "debug", skip(self, arms))]
|
||||||
pub(crate) fn match_expr(
|
pub(crate) fn match_expr(
|
||||||
&mut self,
|
&mut self,
|
||||||
destination: Place<'tcx>,
|
destination: Place<'tcx>,
|
||||||
|
|
|
@ -77,7 +77,7 @@ impl<'tcx> Cx<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
pub(crate) fn pattern_from_hir(&mut self, p: &hir::Pat<'_>) -> Pat<'tcx> {
|
pub(crate) fn pattern_from_hir(&mut self, p: &hir::Pat<'_>) -> Pat<'tcx> {
|
||||||
let p = match self.tcx.hir().get(p.hir_id) {
|
let p = match self.tcx.hir().get(p.hir_id) {
|
||||||
Node::Pat(p) => p,
|
Node::Pat(p) => p,
|
||||||
|
|
|
@ -1573,7 +1573,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(skip(self), level = "INFO")]
|
#[instrument(skip(self), level = "INFO")]
|
||||||
fn report_unused(
|
fn report_unused(
|
||||||
&self,
|
&self,
|
||||||
hir_ids_and_spans: Vec<(HirId, Span, Span)>,
|
hir_ids_and_spans: Vec<(HirId, Span, Span)>,
|
||||||
|
|
|
@ -273,7 +273,7 @@ impl<'a> Resolver<'a> {
|
||||||
///
|
///
|
||||||
/// Invariant: This must only be called during main resolution, not during
|
/// Invariant: This must only be called during main resolution, not during
|
||||||
/// import resolution.
|
/// import resolution.
|
||||||
#[tracing::instrument(level = "debug", skip(self, ribs))]
|
#[instrument(level = "debug", skip(self, ribs))]
|
||||||
pub(crate) fn resolve_ident_in_lexical_scope(
|
pub(crate) fn resolve_ident_in_lexical_scope(
|
||||||
&mut self,
|
&mut self,
|
||||||
mut ident: Ident,
|
mut ident: Ident,
|
||||||
|
@ -367,7 +367,7 @@ impl<'a> Resolver<'a> {
|
||||||
/// 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.
|
||||||
#[tracing::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,
|
||||||
orig_ident: Ident,
|
orig_ident: Ident,
|
||||||
|
@ -708,7 +708,7 @@ impl<'a> Resolver<'a> {
|
||||||
Err(Determinacy::determined(determinacy == Determinacy::Determined || force))
|
Err(Determinacy::determined(determinacy == Determinacy::Determined || force))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
pub(crate) fn maybe_resolve_ident_in_module(
|
pub(crate) fn maybe_resolve_ident_in_module(
|
||||||
&mut self,
|
&mut self,
|
||||||
module: ModuleOrUniformRoot<'a>,
|
module: ModuleOrUniformRoot<'a>,
|
||||||
|
@ -720,7 +720,7 @@ impl<'a> Resolver<'a> {
|
||||||
.map_err(|(determinacy, _)| determinacy)
|
.map_err(|(determinacy, _)| determinacy)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
pub(crate) fn resolve_ident_in_module(
|
pub(crate) fn resolve_ident_in_module(
|
||||||
&mut self,
|
&mut self,
|
||||||
module: ModuleOrUniformRoot<'a>,
|
module: ModuleOrUniformRoot<'a>,
|
||||||
|
@ -734,7 +734,7 @@ impl<'a> Resolver<'a> {
|
||||||
.map_err(|(determinacy, _)| determinacy)
|
.map_err(|(determinacy, _)| determinacy)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_ident_in_module_ext(
|
fn resolve_ident_in_module_ext(
|
||||||
&mut self,
|
&mut self,
|
||||||
module: ModuleOrUniformRoot<'a>,
|
module: ModuleOrUniformRoot<'a>,
|
||||||
|
@ -772,7 +772,7 @@ impl<'a> Resolver<'a> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_ident_in_module_unadjusted(
|
fn resolve_ident_in_module_unadjusted(
|
||||||
&mut self,
|
&mut self,
|
||||||
module: ModuleOrUniformRoot<'a>,
|
module: ModuleOrUniformRoot<'a>,
|
||||||
|
@ -796,7 +796,7 @@ impl<'a> Resolver<'a> {
|
||||||
|
|
||||||
/// Attempts to resolve `ident` in namespaces `ns` of `module`.
|
/// Attempts to resolve `ident` in namespaces `ns` of `module`.
|
||||||
/// Invariant: if `finalize` is `Some`, expansion and import resolution must be complete.
|
/// Invariant: if `finalize` is `Some`, expansion and import resolution must be complete.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_ident_in_module_unadjusted_ext(
|
fn resolve_ident_in_module_unadjusted_ext(
|
||||||
&mut self,
|
&mut self,
|
||||||
module: ModuleOrUniformRoot<'a>,
|
module: ModuleOrUniformRoot<'a>,
|
||||||
|
@ -1059,7 +1059,7 @@ impl<'a> Resolver<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Validate a local resolution (from ribs).
|
/// Validate a local resolution (from ribs).
|
||||||
#[tracing::instrument(level = "debug", skip(self, all_ribs))]
|
#[instrument(level = "debug", skip(self, all_ribs))]
|
||||||
fn validate_res_from_ribs(
|
fn validate_res_from_ribs(
|
||||||
&mut self,
|
&mut self,
|
||||||
rib_index: usize,
|
rib_index: usize,
|
||||||
|
@ -1294,7 +1294,7 @@ impl<'a> Resolver<'a> {
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
pub(crate) fn maybe_resolve_path(
|
pub(crate) fn maybe_resolve_path(
|
||||||
&mut self,
|
&mut self,
|
||||||
path: &[Segment],
|
path: &[Segment],
|
||||||
|
@ -1304,7 +1304,7 @@ impl<'a> Resolver<'a> {
|
||||||
self.resolve_path_with_ribs(path, opt_ns, parent_scope, None, None, None)
|
self.resolve_path_with_ribs(path, opt_ns, parent_scope, None, None, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
pub(crate) fn resolve_path(
|
pub(crate) fn resolve_path(
|
||||||
&mut self,
|
&mut self,
|
||||||
path: &[Segment],
|
path: &[Segment],
|
||||||
|
|
|
@ -1390,7 +1390,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self, work))]
|
#[instrument(level = "debug", skip(self, work))]
|
||||||
fn with_lifetime_rib<T>(
|
fn with_lifetime_rib<T>(
|
||||||
&mut self,
|
&mut self,
|
||||||
kind: LifetimeRibKind,
|
kind: LifetimeRibKind,
|
||||||
|
@ -1404,7 +1404,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_lifetime(&mut self, lifetime: &'ast Lifetime, use_ctxt: visit::LifetimeCtxt) {
|
fn resolve_lifetime(&mut self, lifetime: &'ast Lifetime, use_ctxt: visit::LifetimeCtxt) {
|
||||||
let ident = lifetime.ident;
|
let ident = lifetime.ident;
|
||||||
|
|
||||||
|
@ -1508,7 +1508,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
self.record_lifetime_res(lifetime.id, LifetimeRes::Error, LifetimeElisionCandidate::Named);
|
self.record_lifetime_res(lifetime.id, LifetimeRes::Error, LifetimeElisionCandidate::Named);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_anonymous_lifetime(&mut self, lifetime: &Lifetime, elided: bool) {
|
fn resolve_anonymous_lifetime(&mut self, lifetime: &Lifetime, elided: bool) {
|
||||||
debug_assert_eq!(lifetime.ident.name, kw::UnderscoreLifetime);
|
debug_assert_eq!(lifetime.ident.name, kw::UnderscoreLifetime);
|
||||||
|
|
||||||
|
@ -1573,7 +1573,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
self.report_missing_lifetime_specifiers(vec![missing_lifetime], None);
|
self.report_missing_lifetime_specifiers(vec![missing_lifetime], None);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_elided_lifetime(&mut self, anchor_id: NodeId, span: Span) {
|
fn resolve_elided_lifetime(&mut self, anchor_id: NodeId, span: Span) {
|
||||||
let id = self.r.next_node_id();
|
let id = self.r.next_node_id();
|
||||||
let lt = Lifetime { id, ident: Ident::new(kw::UnderscoreLifetime, span) };
|
let lt = Lifetime { id, ident: Ident::new(kw::UnderscoreLifetime, span) };
|
||||||
|
@ -1586,7 +1586,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
self.resolve_anonymous_lifetime(<, true);
|
self.resolve_anonymous_lifetime(<, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn create_fresh_lifetime(&mut self, id: NodeId, ident: Ident, binder: NodeId) -> LifetimeRes {
|
fn create_fresh_lifetime(&mut self, id: NodeId, ident: Ident, binder: NodeId) -> LifetimeRes {
|
||||||
debug_assert_eq!(ident.name, kw::UnderscoreLifetime);
|
debug_assert_eq!(ident.name, kw::UnderscoreLifetime);
|
||||||
debug!(?ident.span);
|
debug!(?ident.span);
|
||||||
|
@ -1604,7 +1604,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_elided_lifetimes_in_path(
|
fn resolve_elided_lifetimes_in_path(
|
||||||
&mut self,
|
&mut self,
|
||||||
path_id: NodeId,
|
path_id: NodeId,
|
||||||
|
@ -1804,7 +1804,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn record_lifetime_res(
|
fn record_lifetime_res(
|
||||||
&mut self,
|
&mut self,
|
||||||
id: NodeId,
|
id: NodeId,
|
||||||
|
@ -1827,7 +1827,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn record_lifetime_param(&mut self, id: NodeId, res: LifetimeRes) {
|
fn record_lifetime_param(&mut self, id: NodeId, res: LifetimeRes) {
|
||||||
if let Some(prev_res) = self.r.lifetimes_res_map.insert(id, res) {
|
if let Some(prev_res) = self.r.lifetimes_res_map.insert(id, res) {
|
||||||
panic!(
|
panic!(
|
||||||
|
@ -1838,7 +1838,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Perform resolution of a function signature, accounting for lifetime elision.
|
/// Perform resolution of a function signature, accounting for lifetime elision.
|
||||||
#[tracing::instrument(level = "debug", skip(self, inputs))]
|
#[instrument(level = "debug", skip(self, inputs))]
|
||||||
fn resolve_fn_signature(
|
fn resolve_fn_signature(
|
||||||
&mut self,
|
&mut self,
|
||||||
fn_id: NodeId,
|
fn_id: NodeId,
|
||||||
|
|
|
@ -278,7 +278,7 @@ pub fn provide(providers: &mut ty::query::Providers) {
|
||||||
/// lifetimes into a single binder.) This requires us to resolve the
|
/// lifetimes into a single binder.) This requires us to resolve the
|
||||||
/// *trait definition* of `Sub`; basically just enough lifetime information
|
/// *trait definition* of `Sub`; basically just enough lifetime information
|
||||||
/// to look at the supertraits.
|
/// to look at the supertraits.
|
||||||
#[tracing::instrument(level = "debug", skip(tcx))]
|
#[instrument(level = "debug", skip(tcx))]
|
||||||
fn resolve_lifetimes_trait_definition(
|
fn resolve_lifetimes_trait_definition(
|
||||||
tcx: TyCtxt<'_>,
|
tcx: TyCtxt<'_>,
|
||||||
local_def_id: LocalDefId,
|
local_def_id: LocalDefId,
|
||||||
|
@ -289,7 +289,7 @@ fn resolve_lifetimes_trait_definition(
|
||||||
/// Computes the `ResolveLifetimes` map that contains data for an entire `Item`.
|
/// Computes the `ResolveLifetimes` map that contains data for an entire `Item`.
|
||||||
/// You should not read the result of this query directly, but rather use
|
/// You should not read the result of this query directly, but rather use
|
||||||
/// `named_region_map`, `is_late_bound_map`, etc.
|
/// `named_region_map`, `is_late_bound_map`, etc.
|
||||||
#[tracing::instrument(level = "debug", skip(tcx))]
|
#[instrument(level = "debug", skip(tcx))]
|
||||||
fn resolve_lifetimes(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> ResolveLifetimes {
|
fn resolve_lifetimes(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> ResolveLifetimes {
|
||||||
convert_named_region_map(do_resolve(tcx, local_def_id, false))
|
convert_named_region_map(do_resolve(tcx, local_def_id, false))
|
||||||
}
|
}
|
||||||
|
@ -647,7 +647,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) {
|
fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) {
|
||||||
match ty.kind {
|
match ty.kind {
|
||||||
hir::TyKind::BareFn(ref c) => {
|
hir::TyKind::BareFn(ref c) => {
|
||||||
|
@ -930,7 +930,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_lifetime(&mut self, lifetime_ref: &'tcx hir::Lifetime) {
|
fn visit_lifetime(&mut self, lifetime_ref: &'tcx hir::Lifetime) {
|
||||||
match lifetime_ref.name {
|
match lifetime_ref.name {
|
||||||
hir::LifetimeName::Static => self.insert_lifetime(lifetime_ref, Region::Static),
|
hir::LifetimeName::Static => self.insert_lifetime(lifetime_ref, Region::Static),
|
||||||
|
@ -1287,7 +1287,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||||
self.with(scope, walk);
|
self.with(scope, walk);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn resolve_lifetime_ref(
|
fn resolve_lifetime_ref(
|
||||||
&mut self,
|
&mut self,
|
||||||
region_def_id: LocalDefId,
|
region_def_id: LocalDefId,
|
||||||
|
@ -1409,7 +1409,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_segment_args(
|
fn visit_segment_args(
|
||||||
&mut self,
|
&mut self,
|
||||||
res: Res,
|
res: Res,
|
||||||
|
@ -1659,7 +1659,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn visit_fn_like_elision(
|
fn visit_fn_like_elision(
|
||||||
&mut self,
|
&mut self,
|
||||||
inputs: &'tcx [hir::Ty<'tcx>],
|
inputs: &'tcx [hir::Ty<'tcx>],
|
||||||
|
@ -1707,7 +1707,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||||
self.insert_lifetime(lifetime_ref, lifetime.shifted(late_depth));
|
self.insert_lifetime(lifetime_ref, lifetime.shifted(late_depth));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn insert_lifetime(&mut self, lifetime_ref: &'tcx hir::Lifetime, def: Region) {
|
fn insert_lifetime(&mut self, lifetime_ref: &'tcx hir::Lifetime, def: Region) {
|
||||||
debug!(
|
debug!(
|
||||||
node = ?self.tcx.hir().node_to_string(lifetime_ref.hir_id),
|
node = ?self.tcx.hir().node_to_string(lifetime_ref.hir_id),
|
||||||
|
|
|
@ -135,7 +135,7 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
|
||||||
/// `SomeTrait` or a where-clause that lets us unify `$0` with
|
/// `SomeTrait` or a where-clause that lets us unify `$0` with
|
||||||
/// something concrete. If this fails, we'll unify `$0` with
|
/// something concrete. If this fails, we'll unify `$0` with
|
||||||
/// `projection_ty` again.
|
/// `projection_ty` again.
|
||||||
#[tracing::instrument(level = "debug", skip(self, infcx, param_env, cause))]
|
#[instrument(level = "debug", skip(self, infcx, param_env, cause))]
|
||||||
fn normalize_projection_type(
|
fn normalize_projection_type(
|
||||||
&mut self,
|
&mut self,
|
||||||
infcx: &InferCtxt<'_, 'tcx>,
|
infcx: &InferCtxt<'_, 'tcx>,
|
||||||
|
|
|
@ -231,7 +231,7 @@ pub(super) fn poly_project_and_unify_type<'cx, 'tcx>(
|
||||||
/// If successful, this may result in additional obligations.
|
/// If successful, this may result in additional obligations.
|
||||||
///
|
///
|
||||||
/// See [poly_project_and_unify_type] for an explanation of the return value.
|
/// See [poly_project_and_unify_type] for an explanation of the return value.
|
||||||
#[tracing::instrument(level = "debug", skip(selcx))]
|
#[instrument(level = "debug", skip(selcx))]
|
||||||
fn project_and_unify_type<'cx, 'tcx>(
|
fn project_and_unify_type<'cx, 'tcx>(
|
||||||
selcx: &mut SelectionContext<'cx, 'tcx>,
|
selcx: &mut SelectionContext<'cx, 'tcx>,
|
||||||
obligation: &ProjectionObligation<'tcx>,
|
obligation: &ProjectionObligation<'tcx>,
|
||||||
|
@ -1206,7 +1206,7 @@ impl<'tcx> Progress<'tcx> {
|
||||||
///
|
///
|
||||||
/// IMPORTANT:
|
/// IMPORTANT:
|
||||||
/// - `obligation` must be fully normalized
|
/// - `obligation` must be fully normalized
|
||||||
#[tracing::instrument(level = "info", skip(selcx))]
|
#[instrument(level = "info", skip(selcx))]
|
||||||
fn project<'cx, 'tcx>(
|
fn project<'cx, 'tcx>(
|
||||||
selcx: &mut SelectionContext<'cx, 'tcx>,
|
selcx: &mut SelectionContext<'cx, 'tcx>,
|
||||||
obligation: &ProjectionTyObligation<'tcx>,
|
obligation: &ProjectionTyObligation<'tcx>,
|
||||||
|
@ -1368,7 +1368,7 @@ fn assemble_candidates_from_object_ty<'cx, 'tcx>(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(
|
#[instrument(
|
||||||
level = "debug",
|
level = "debug",
|
||||||
skip(selcx, candidate_set, ctor, env_predicates, potentially_unnormalized_candidates)
|
skip(selcx, candidate_set, ctor, env_predicates, potentially_unnormalized_candidates)
|
||||||
)]
|
)]
|
||||||
|
@ -1419,7 +1419,7 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(selcx, obligation, candidate_set))]
|
#[instrument(level = "debug", skip(selcx, obligation, candidate_set))]
|
||||||
fn assemble_candidates_from_impls<'cx, 'tcx>(
|
fn assemble_candidates_from_impls<'cx, 'tcx>(
|
||||||
selcx: &mut SelectionContext<'cx, 'tcx>,
|
selcx: &mut SelectionContext<'cx, 'tcx>,
|
||||||
obligation: &ProjectionTyObligation<'tcx>,
|
obligation: &ProjectionTyObligation<'tcx>,
|
||||||
|
|
|
@ -337,7 +337,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
Ok(candidates)
|
Ok(candidates)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self, candidates))]
|
#[instrument(level = "debug", skip(self, candidates))]
|
||||||
fn assemble_candidates_from_projected_tys(
|
fn assemble_candidates_from_projected_tys(
|
||||||
&mut self,
|
&mut self,
|
||||||
obligation: &TraitObligation<'tcx>,
|
obligation: &TraitObligation<'tcx>,
|
||||||
|
@ -367,7 +367,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
/// supplied to find out whether it is listed among them.
|
/// supplied to find out whether it is listed among them.
|
||||||
///
|
///
|
||||||
/// Never affects the inference environment.
|
/// Never affects the inference environment.
|
||||||
#[tracing::instrument(level = "debug", skip(self, stack, candidates))]
|
#[instrument(level = "debug", skip(self, stack, candidates))]
|
||||||
fn assemble_candidates_from_caller_bounds<'o>(
|
fn assemble_candidates_from_caller_bounds<'o>(
|
||||||
&mut self,
|
&mut self,
|
||||||
stack: &TraitObligationStack<'o, 'tcx>,
|
stack: &TraitObligationStack<'o, 'tcx>,
|
||||||
|
@ -880,7 +880,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self, obligation, candidates))]
|
#[instrument(level = "debug", skip(self, obligation, candidates))]
|
||||||
fn assemble_candidates_for_transmutability(
|
fn assemble_candidates_for_transmutability(
|
||||||
&mut self,
|
&mut self,
|
||||||
obligation: &TraitObligation<'tcx>,
|
obligation: &TraitObligation<'tcx>,
|
||||||
|
@ -898,7 +898,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
candidates.vec.push(TransmutabilityCandidate);
|
candidates.vec.push(TransmutabilityCandidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self, obligation, candidates))]
|
#[instrument(level = "debug", skip(self, obligation, candidates))]
|
||||||
fn assemble_candidates_for_trait_alias(
|
fn assemble_candidates_for_trait_alias(
|
||||||
&mut self,
|
&mut self,
|
||||||
obligation: &TraitObligation<'tcx>,
|
obligation: &TraitObligation<'tcx>,
|
||||||
|
@ -917,7 +917,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
|
|
||||||
/// Assembles the trait which are built-in to the language itself:
|
/// Assembles the trait which are built-in to the language itself:
|
||||||
/// `Copy`, `Clone` and `Sized`.
|
/// `Copy`, `Clone` and `Sized`.
|
||||||
#[tracing::instrument(level = "debug", skip(self, candidates))]
|
#[instrument(level = "debug", skip(self, candidates))]
|
||||||
fn assemble_builtin_bound_candidates(
|
fn assemble_builtin_bound_candidates(
|
||||||
&mut self,
|
&mut self,
|
||||||
conditions: BuiltinImplConditions<'tcx>,
|
conditions: BuiltinImplConditions<'tcx>,
|
||||||
|
|
|
@ -2153,7 +2153,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn match_impl(
|
fn match_impl(
|
||||||
&mut self,
|
&mut self,
|
||||||
impl_def_id: DefId,
|
impl_def_id: DefId,
|
||||||
|
@ -2335,7 +2335,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||||
/// impl or trait. The obligations are substituted and fully
|
/// impl or trait. The obligations are substituted and fully
|
||||||
/// normalized. This is used when confirming an impl or default
|
/// normalized. This is used when confirming an impl or default
|
||||||
/// impl.
|
/// impl.
|
||||||
#[tracing::instrument(level = "debug", skip(self, cause, param_env))]
|
#[instrument(level = "debug", skip(self, cause, param_env))]
|
||||||
fn impl_or_trait_obligations(
|
fn impl_or_trait_obligations(
|
||||||
&mut self,
|
&mut self,
|
||||||
cause: &ObligationCause<'tcx>,
|
cause: &ObligationCause<'tcx>,
|
||||||
|
|
|
@ -201,7 +201,7 @@ pub trait CreateSubstsForGenericArgsCtxt<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
pub fn ast_region_to_region(
|
pub fn ast_region_to_region(
|
||||||
&self,
|
&self,
|
||||||
lifetime: &hir::Lifetime,
|
lifetime: &hir::Lifetime,
|
||||||
|
@ -317,7 +317,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||||
/// `[Vec<u8>, u8]` and `generic_args` are the arguments for the associated
|
/// `[Vec<u8>, u8]` and `generic_args` are the arguments for the associated
|
||||||
/// type itself: `['a]`. The returned `SubstsRef` concatenates these two
|
/// type itself: `['a]`. The returned `SubstsRef` concatenates these two
|
||||||
/// lists: `[Vec<u8>, u8, 'a]`.
|
/// lists: `[Vec<u8>, u8, 'a]`.
|
||||||
#[tracing::instrument(level = "debug", skip(self, span))]
|
#[instrument(level = "debug", skip(self, span))]
|
||||||
fn create_substs_for_ast_path<'a>(
|
fn create_substs_for_ast_path<'a>(
|
||||||
&self,
|
&self,
|
||||||
span: Span,
|
span: Span,
|
||||||
|
@ -716,7 +716,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||||
/// where `'a` is a bound region at depth 0. Similarly, the `poly_trait_ref` would be
|
/// where `'a` is a bound region at depth 0. Similarly, the `poly_trait_ref` would be
|
||||||
/// `Bar<'a>`. The returned poly-trait-ref will have this binder instantiated explicitly,
|
/// `Bar<'a>`. The returned poly-trait-ref will have this binder instantiated explicitly,
|
||||||
/// however.
|
/// however.
|
||||||
#[tracing::instrument(level = "debug", skip(self, span, constness, bounds, speculative))]
|
#[instrument(level = "debug", skip(self, span, constness, bounds, speculative))]
|
||||||
pub(crate) fn instantiate_poly_trait_ref(
|
pub(crate) fn instantiate_poly_trait_ref(
|
||||||
&self,
|
&self,
|
||||||
trait_ref: &hir::TraitRef<'_>,
|
trait_ref: &hir::TraitRef<'_>,
|
||||||
|
@ -808,7 +808,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||||
ty::TraitRef::new(trait_def_id, substs)
|
ty::TraitRef::new(trait_def_id, substs)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self, span))]
|
#[instrument(level = "debug", skip(self, span))]
|
||||||
fn create_substs_for_ast_trait_ref<'a>(
|
fn create_substs_for_ast_trait_ref<'a>(
|
||||||
&self,
|
&self,
|
||||||
span: Span,
|
span: Span,
|
||||||
|
@ -922,7 +922,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||||
/// **A note on binders:** there is an implied binder around
|
/// **A note on binders:** there is an implied binder around
|
||||||
/// `param_ty` and `ast_bounds`. See `instantiate_poly_trait_ref`
|
/// `param_ty` and `ast_bounds`. See `instantiate_poly_trait_ref`
|
||||||
/// for more details.
|
/// for more details.
|
||||||
#[tracing::instrument(level = "debug", skip(self, ast_bounds, bounds))]
|
#[instrument(level = "debug", skip(self, ast_bounds, bounds))]
|
||||||
pub(crate) fn add_bounds<'hir, I: Iterator<Item = &'hir hir::GenericBound<'hir>>>(
|
pub(crate) fn add_bounds<'hir, I: Iterator<Item = &'hir hir::GenericBound<'hir>>>(
|
||||||
&self,
|
&self,
|
||||||
param_ty: Ty<'tcx>,
|
param_ty: Ty<'tcx>,
|
||||||
|
@ -1028,10 +1028,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||||
/// **A note on binders:** given something like `T: for<'a> Iterator<Item = &'a u32>`, the
|
/// **A note on binders:** given something like `T: for<'a> Iterator<Item = &'a u32>`, the
|
||||||
/// `trait_ref` here will be `for<'a> T: Iterator`. The `binding` data however is from *inside*
|
/// `trait_ref` here will be `for<'a> T: Iterator`. The `binding` data however is from *inside*
|
||||||
/// the binder (e.g., `&'a u32`) and hence may reference bound regions.
|
/// the binder (e.g., `&'a u32`) and hence may reference bound regions.
|
||||||
#[tracing::instrument(
|
#[instrument(level = "debug", skip(self, bounds, speculative, dup_bindings, path_span))]
|
||||||
level = "debug",
|
|
||||||
skip(self, bounds, speculative, dup_bindings, path_span)
|
|
||||||
)]
|
|
||||||
fn add_predicates_for_ast_type_binding(
|
fn add_predicates_for_ast_type_binding(
|
||||||
&self,
|
&self,
|
||||||
hir_ref_id: hir::HirId,
|
hir_ref_id: hir::HirId,
|
||||||
|
@ -2599,7 +2596,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||||
|
|
||||||
/// Turns a `hir::Ty` into a `Ty`. For diagnostics' purposes we keep track of whether trait
|
/// Turns a `hir::Ty` into a `Ty`. For diagnostics' purposes we keep track of whether trait
|
||||||
/// objects are borrowed like `&dyn Trait` to avoid emitting redundant errors.
|
/// objects are borrowed like `&dyn Trait` to avoid emitting redundant errors.
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
fn ast_ty_to_ty_inner(&self, ast_ty: &hir::Ty<'_>, borrowed: bool, in_path: bool) -> Ty<'tcx> {
|
fn ast_ty_to_ty_inner(&self, ast_ty: &hir::Ty<'_>, borrowed: bool, in_path: bool) -> Ty<'tcx> {
|
||||||
let tcx = self.tcx();
|
let tcx = self.tcx();
|
||||||
|
|
||||||
|
|
|
@ -1308,7 +1308,7 @@ fn compare_type_predicate_entailment<'tcx>(
|
||||||
/// For default associated types the normalization is not possible (the value
|
/// For default associated types the normalization is not possible (the value
|
||||||
/// from the impl could be overridden). We also can't normalize generic
|
/// from the impl could be overridden). We also can't normalize generic
|
||||||
/// associated types (yet) because they contain bound parameters.
|
/// associated types (yet) because they contain bound parameters.
|
||||||
#[tracing::instrument(level = "debug", skip(tcx))]
|
#[instrument(level = "debug", skip(tcx))]
|
||||||
pub fn check_type_bounds<'tcx>(
|
pub fn check_type_bounds<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
trait_ty: &ty::AssocItem,
|
trait_ty: &ty::AssocItem,
|
||||||
|
|
|
@ -130,7 +130,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
///
|
///
|
||||||
/// N.B., this code relies on `self.diverges` to be accurate. In particular, assignments to `!`
|
/// N.B., this code relies on `self.diverges` to be accurate. In particular, assignments to `!`
|
||||||
/// will be permitted if the diverges flag is currently "always".
|
/// will be permitted if the diverges flag is currently "always".
|
||||||
#[tracing::instrument(level = "debug", skip(self, expr, expected_ty_expr, allow_two_phase))]
|
#[instrument(level = "debug", skip(self, expr, expected_ty_expr, allow_two_phase))]
|
||||||
pub fn demand_coerce_diag(
|
pub fn demand_coerce_diag(
|
||||||
&self,
|
&self,
|
||||||
expr: &hir::Expr<'tcx>,
|
expr: &hir::Expr<'tcx>,
|
||||||
|
|
|
@ -1405,7 +1405,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(self, code, span, def_id, substs))]
|
#[instrument(level = "debug", skip(self, code, span, def_id, substs))]
|
||||||
fn add_required_obligations_with_code(
|
fn add_required_obligations_with_code(
|
||||||
&self,
|
&self,
|
||||||
span: Span,
|
span: Span,
|
||||||
|
|
|
@ -972,7 +972,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(tcx, span, sig_if_method))]
|
#[instrument(level = "debug", skip(tcx, span, sig_if_method))]
|
||||||
fn check_associated_item(
|
fn check_associated_item(
|
||||||
tcx: TyCtxt<'_>,
|
tcx: TyCtxt<'_>,
|
||||||
item_id: LocalDefId,
|
item_id: LocalDefId,
|
||||||
|
@ -1225,7 +1225,7 @@ fn check_item_type(tcx: TyCtxt<'_>, item_id: LocalDefId, ty_span: Span, allow_fo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(tcx, ast_self_ty, ast_trait_ref))]
|
#[instrument(level = "debug", skip(tcx, ast_self_ty, ast_trait_ref))]
|
||||||
fn check_impl<'tcx>(
|
fn check_impl<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
item: &'tcx hir::Item<'tcx>,
|
item: &'tcx hir::Item<'tcx>,
|
||||||
|
@ -1472,7 +1472,7 @@ fn check_where_clauses<'tcx>(wfcx: &WfCheckingCtxt<'_, 'tcx>, span: Span, def_id
|
||||||
wfcx.register_obligations(obligations);
|
wfcx.register_obligations(obligations);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(wfcx, span, hir_decl))]
|
#[instrument(level = "debug", skip(wfcx, span, hir_decl))]
|
||||||
fn check_fn_or_method<'tcx>(
|
fn check_fn_or_method<'tcx>(
|
||||||
wfcx: &WfCheckingCtxt<'_, 'tcx>,
|
wfcx: &WfCheckingCtxt<'_, 'tcx>,
|
||||||
span: Span,
|
span: Span,
|
||||||
|
@ -1536,7 +1536,7 @@ const HELP_FOR_SELF_TYPE: &str = "consider changing to `self`, `&self`, `&mut se
|
||||||
`self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one \
|
`self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one \
|
||||||
of the previous types except `Self`)";
|
of the previous types except `Self`)";
|
||||||
|
|
||||||
#[tracing::instrument(level = "debug", skip(wfcx))]
|
#[instrument(level = "debug", skip(wfcx))]
|
||||||
fn check_method_receiver<'tcx>(
|
fn check_method_receiver<'tcx>(
|
||||||
wfcx: &WfCheckingCtxt<'_, 'tcx>,
|
wfcx: &WfCheckingCtxt<'_, 'tcx>,
|
||||||
fn_sig: &hir::FnSig<'_>,
|
fn_sig: &hir::FnSig<'_>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue