1 // Test that using rustc_clean/dirty/if_this_changed/then_this_would_need 2 // are forbidden when `-Z query-dep-graph` is not enabled. 3 4 #![feature(rustc_attrs)] 5 #![allow(dead_code)] 6 #![allow(unused_variables)] 7 8 #[rustc_clean(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph main()9fn main() {} 10 11 #[rustc_if_this_changed(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph 12 struct Foo<T> { 13 f: T, 14 } 15 16 #[rustc_clean(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph 17 type TypeAlias<T> = Foo<T>; 18 19 #[rustc_then_this_would_need(variances_of)] //~ ERROR attribute requires -Z query-dep-graph 20 trait Use<T> {} 21