forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#83313 - cjgillot:assert, r=michaelwoerister
Only enable assert_dep_graph when query-dep-graph is enabled. This is a debugging option. The only effect should be on rustc tests. r? `@michaelwoerister`
- Loading branch information
Showing
8 changed files
with
77 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
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 | ||
|