Skip to content

Commit 50df5f8

Browse files
committed
correct the new graphs resulting from various tests
(Now that variances are not part of signature.)
1 parent e8f6fbb commit 50df5f8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/test/compile-fail/dep-graph-struct-signature.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ mod signatures {
5858
fn method(&self, x: u32) { }
5959
}
6060

61-
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
6261
struct WillChanges {
62+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
6363
x: WillChange,
64+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
6465
y: WillChange
6566
}
6667

67-
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
68+
// The fields change, not the type itself.
69+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
6870
fn indirect(x: WillChanges) { }
6971
}
7072

src/test/compile-fail/dep-graph-type-alias.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,21 @@ fn main() { }
2323
#[rustc_if_this_changed]
2424
type TypeAlias = u32;
2525

26-
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
26+
// The type alias directly affects the type of the field,
27+
// not the enclosing struct:
28+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
2729
struct Struct {
30+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
2831
x: TypeAlias,
2932
y: u32
3033
}
3134

32-
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
35+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
3336
enum Enum {
34-
Variant1(TypeAlias),
37+
Variant1 {
38+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
39+
t: TypeAlias
40+
},
3541
Variant2(i32)
3642
}
3743

0 commit comments

Comments
 (0)