-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Err if the debugging options are not passed.
- Loading branch information
Showing
6 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Test that using rustc_clean/dirty/if_this_changed/then_this_would_need | ||
// are forbidden when `-Z query-dep-graph` is not enabled. | ||
|
||
#![feature(rustc_attrs)] | ||
#![allow(dead_code)] | ||
#![allow(unused_variables)] | ||
|
||
#[rustc_dirty(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph | ||
fn main() {} | ||
|
||
#[rustc_if_this_changed(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph | ||
struct Foo<T> { | ||
f: T, | ||
} | ||
|
||
#[rustc_clean(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph | ||
type TypeAlias<T> = Foo<T>; | ||
|
||
#[rustc_then_this_would_need(variances_of)] //~ ERROR attribute requires -Z query-dep-graph | ||
trait Use<T> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error: attribute requires -Z query-dep-graph to be enabled | ||
--> $DIR/dep-graph-check-attr.rs:8:1 | ||
| | ||
LL | #[rustc_dirty(hir_owner)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: attribute requires -Z query-dep-graph to be enabled | ||
--> $DIR/dep-graph-check-attr.rs:11:1 | ||
| | ||
LL | #[rustc_if_this_changed(hir_owner)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: attribute requires -Z query-dep-graph to be enabled | ||
--> $DIR/dep-graph-check-attr.rs:16:1 | ||
| | ||
LL | #[rustc_clean(hir_owner)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: attribute requires -Z query-dep-graph to be enabled | ||
--> $DIR/dep-graph-check-attr.rs:19:1 | ||
| | ||
LL | #[rustc_then_this_would_need(variances_of)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 4 previous errors | ||
|