-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Improved handling for cycles within the query system itself #154387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
193126a
bcb2621
4d128c0
95308ca
f336213
c1fa3f2
55ee14a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -432,11 +432,12 @@ macro_rules! define_callbacks { | |
| } | ||
|
|
||
| /// Returns the default span for this query if `span` is a dummy span. | ||
| #[tracing::instrument(level = "debug", skip(tcx, span))] | ||
| pub fn default_span(&self, tcx: TyCtxt<'tcx>, span: Span) -> Span { | ||
| if !span.is_dummy() { | ||
| return span | ||
| } | ||
| if let TaggedQueryKey::def_span(..) = self { | ||
| if let TaggedQueryKey::def_span(..) | TaggedQueryKey::local_def_id_to_hir_id(..) = self { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm, I think this fix is incomplete.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we could check if HIR lowering is done for the |
||
| // The `def_span` query is used to calculate `default_span`, | ||
| // so exit to avoid infinite recursion. | ||
| return DUMMY_SP | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.