Skip to content

Commit 3ae0a42

Browse files
committed
fix span
1 parent 5d05b82 commit 3ae0a42

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/librustc/ty/maps/plumbing.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@ macro_rules! define_maps {
276276
)
277277
);
278278

279+
// FIXME(eddyb) Get more valid Span's on queries.
280+
// def_span guard is necessary to prevent a recursive loop,
281+
// default_span calls def_span query internally.
282+
if span == DUMMY_SP && stringify!($name) != "def_span" {
283+
span = key.default_span(tcx)
284+
}
285+
279286
loop {
280287
let job = if let Some(value) = tcx.maps.$name.borrow().map.get(&key) {
281288
match *value {
@@ -340,13 +347,6 @@ macro_rules! define_maps {
340347
//job.await();
341348
}
342349
*/
343-
// FIXME(eddyb) Get more valid Span's on queries.
344-
// def_span guard is necessary to prevent a recursive loop,
345-
// default_span calls def_span query internally.
346-
if span == DUMMY_SP && stringify!($name) != "def_span" {
347-
span = key.default_span(tcx)
348-
}
349-
350350
// Fast path for when incr. comp. is off. `to_dep_node` is
351351
// expensive for some DepKinds.
352352
if !tcx.dep_graph.is_fully_enabled() {

0 commit comments

Comments
 (0)