Skip to content

Commit a248ad1

Browse files
committed
not cache def_ident_span from disk
1 parent c872a14 commit a248ad1

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,6 @@ rustc_queries! {
11941194
/// Gets the span for the identifier of the definition.
11951195
query def_ident_span(def_id: DefId) -> Option<Span> {
11961196
desc { |tcx| "looking up span for `{}`'s identifier", tcx.def_path_str(def_id) }
1197-
cache_on_disk_if { def_id.is_local() }
11981197
separate_provide_extern
11991198
feedable
12001199
}

tests/incremental/decl_macro.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//@ revisions: rpass1 rpass2
2+
3+
// issue#112680
4+
5+
#![feature(decl_macro)]
6+
7+
pub trait T {
8+
type Key;
9+
fn index_from_key(key: Self::Key) -> usize;
10+
}
11+
12+
pub macro m($key_ty:ident, $val_ty:ident) {
13+
struct $key_ty {
14+
inner: usize,
15+
}
16+
17+
impl T for $val_ty {
18+
type Key = $key_ty;
19+
20+
fn index_from_key(key: Self::Key) -> usize {
21+
key.inner
22+
}
23+
}
24+
}
25+
26+
m!(TestId, Test);
27+
28+
#[cfg(rpass1)]
29+
struct Test(u32);
30+
31+
#[cfg(rpass2)]
32+
struct Test;
33+
34+
fn main() {}

0 commit comments

Comments
 (0)