File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,15 @@ mod signatures {
58
58
fn method ( & self , x : u32 ) { }
59
59
}
60
60
61
- #[ rustc_then_this_would_need( ItemSignature ) ] //~ ERROR OK
62
61
struct WillChanges {
62
+ #[ rustc_then_this_would_need( ItemSignature ) ] //~ ERROR OK
63
63
x : WillChange ,
64
+ #[ rustc_then_this_would_need( ItemSignature ) ] //~ ERROR OK
64
65
y : WillChange
65
66
}
66
67
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
68
70
fn indirect ( x : WillChanges ) { }
69
71
}
70
72
Original file line number Diff line number Diff line change @@ -23,15 +23,21 @@ fn main() { }
23
23
#[ rustc_if_this_changed]
24
24
type TypeAlias = u32 ;
25
25
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
27
29
struct Struct {
30
+ #[ rustc_then_this_would_need( ItemSignature ) ] //~ ERROR OK
28
31
x : TypeAlias ,
29
32
y : u32
30
33
}
31
34
32
- #[ rustc_then_this_would_need( ItemSignature ) ] //~ ERROR OK
35
+ #[ rustc_then_this_would_need( ItemSignature ) ] //~ ERROR no path
33
36
enum Enum {
34
- Variant1 ( TypeAlias ) ,
37
+ Variant1 {
38
+ #[ rustc_then_this_would_need( ItemSignature ) ] //~ ERROR OK
39
+ t : TypeAlias
40
+ } ,
35
41
Variant2 ( i32 )
36
42
}
37
43
You can’t perform that action at this time.
0 commit comments