(Now that variances are not part of signature.)
fn method(&self, x: u32) { }
}
fn method(&self, x: u32) { }
}
- #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+ #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+ #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
- #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+ // The fields change, not the type itself.
+ #[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
fn indirect(x: WillChanges) { }
}
fn indirect(x: WillChanges) { }
}
#[rustc_if_this_changed]
type TypeAlias = u32;
#[rustc_if_this_changed]
type TypeAlias = u32;
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+// The type alias directly affects the type of the field,
+// not the enclosing struct:
+#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
+ #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
-#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
+ Variant1 {
+ #[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
+ t: TypeAlias
+ },