]>
git.proxmox.com Git - rustc.git/blob - tests/ui/dep-graph/dep-graph-type-alias.rs
1 // Test that changing what a `type` points to does not go unnoticed.
4 // compile-flags: -Z query-dep-graph
6 #![feature(rustc_attrs)]
8 #![allow(unused_variables)]
13 #[rustc_if_this_changed]
16 // The type alias directly affects the type of the field,
17 // not the enclosing struct:
18 #[rustc_then_this_would_need(type_of)] //~ ERROR no path
20 #[rustc_then_this_would_need(type_of)] //~ ERROR OK
25 #[rustc_then_this_would_need(type_of)] //~ ERROR no path
28 #[rustc_then_this_would_need(type_of)] //~ ERROR OK
34 #[rustc_then_this_would_need(type_of)] //~ ERROR no path
36 #[rustc_then_this_would_need(fn_sig)] //~ ERROR OK
37 fn method(&self, _
: TypeAlias
);
42 #[rustc_then_this_would_need(type_of)] //~ ERROR no path
44 #[rustc_then_this_would_need(fn_sig)] //~ ERROR OK
45 #[rustc_then_this_would_need(typeck)] //~ ERROR OK
46 fn method(&self, _
: TypeAlias
) {}
49 #[rustc_then_this_would_need(type_of)] //~ ERROR OK
50 type TypeAlias2
= TypeAlias
;
52 #[rustc_then_this_would_need(fn_sig)] //~ ERROR OK
53 #[rustc_then_this_would_need(typeck)] //~ ERROR OK
54 fn function(_
: TypeAlias
) {