mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Better places for spans
This commit is contained in:
parent
3390e73816
commit
75a2605361
@ -24,10 +24,8 @@ pub fn autoderef<'a>(
|
||||
krate: Option<CrateId>,
|
||||
ty: InEnvironment<Canonical<Ty>>,
|
||||
) -> impl Iterator<Item = Canonical<Ty>> + 'a {
|
||||
let _p = profile::span("autoderef");
|
||||
let InEnvironment { goal: ty, environment } = ty;
|
||||
successors(Some(ty), move |ty| {
|
||||
let _p = profile::span("autoderef.step");
|
||||
deref(db, krate?, InEnvironment { goal: ty, environment: environment.clone() })
|
||||
})
|
||||
.take(AUTODEREF_RECURSION_LIMIT)
|
||||
@ -38,6 +36,7 @@ pub(crate) fn deref(
|
||||
krate: CrateId,
|
||||
ty: InEnvironment<&Canonical<Ty>>,
|
||||
) -> Option<Canonical<Ty>> {
|
||||
let _p = profile::span("deref");
|
||||
if let Some(derefed) = builtin_deref(&ty.goal.value) {
|
||||
Some(Canonical { value: derefed, binders: ty.goal.binders.clone() })
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user