File tree Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -568,7 +568,13 @@ define_dep_nodes!( <'tcx>
568
568
569
569
[ ] ParamEnv ( DefId ) ,
570
570
[ ] DescribeDef ( DefId ) ,
571
- [ ] DefSpan ( DefId ) ,
571
+
572
+ // FIXME(mw): DefSpans are not really inputs since they are derived from
573
+ // HIR. But at the moment HIR hashing still contains some hacks that allow
574
+ // to make type debuginfo to be source location independent. Declaring
575
+ // DefSpan an input makes sure that changes to these are always detected
576
+ // regardless of HIR hashing.
577
+ [ input] DefSpan ( DefId ) ,
572
578
[ ] LookupStability ( DefId ) ,
573
579
[ ] LookupDeprecationEntry ( DefId ) ,
574
580
[ ] ItemBodyNestedBodies ( DefId ) ,
Original file line number Diff line number Diff line change @@ -789,6 +789,9 @@ impl CurrentDepGraph {
789
789
// node.
790
790
if cfg ! ( debug_assertions) {
791
791
if node. kind . is_input ( ) && reads. len ( ) > 0 &&
792
+ // FIXME(mw): Special case for DefSpan until Spans are handled
793
+ // better in general.
794
+ node. kind != DepKind :: DefSpan &&
792
795
reads. iter ( ) . any ( |& i| {
793
796
!( self . nodes [ i] . kind == DepKind :: CrateMetadata ||
794
797
self . nodes [ i] . kind == DepKind :: Krate )
Original file line number Diff line number Diff line change 11
11
// This test case makes sure that the compiler doesn't crash due to a failing
12
12
// table lookup when a source file is removed.
13
13
14
- // revisions:rpass1 rpass2
14
+ // revisions:cfail1 cfail2
15
15
16
16
// Note that we specify -g so that the FileMaps actually get referenced by the
17
17
// incr. comp. cache:
18
18
// compile-flags: -Z query-dep-graph -g
19
+ // must-compile-successfully
19
20
20
- #[ cfg( rpass1) ]
21
+ #![ crate_type= "rlib" ]
22
+
23
+ #[ cfg( cfail1) ]
21
24
mod auxiliary;
22
25
23
- #[ cfg( rpass1 ) ]
24
- fn main ( ) {
26
+ #[ cfg( cfail1 ) ]
27
+ pub fn foo ( ) {
25
28
auxiliary:: print_hello ( ) ;
26
29
}
27
30
28
- #[ cfg( rpass2 ) ]
29
- fn main ( ) {
31
+ #[ cfg( cfail2 ) ]
32
+ pub fn foo ( ) {
30
33
println ! ( "hello" ) ;
31
34
}
Original file line number Diff line number Diff line change 14
14
// revisions:rpass1 rpass2
15
15
// compile-flags: -Z query-dep-graph -g
16
16
17
- #![ rustc_partition_reused( module="spans_in_type_debuginfo" , cfg="rpass2" ) ]
18
17
#![ rustc_partition_reused( module="spans_in_type_debuginfo-structs" , cfg="rpass2" ) ]
19
18
#![ rustc_partition_reused( module="spans_in_type_debuginfo-enums" , cfg="rpass2" ) ]
20
19
You can’t perform that action at this time.
0 commit comments