-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an internal lint that warns when accessing untracked data
- Loading branch information
Showing
11 changed files
with
80 additions
and
35 deletions.
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
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,14 @@ | ||
//@ compile-flags: -Z unstable-options | ||
#![feature(rustc_private)] | ||
#![deny(rustc::untracked_query_information)] | ||
|
||
extern crate rustc_data_structures; | ||
|
||
use rustc_data_structures::steal::Steal; | ||
|
||
fn use_steal(x: Steal<()>) { | ||
let _ = x.is_stolen(); | ||
//~^ ERROR `is_stolen` accesses information that is not tracked by the query system | ||
} | ||
|
||
fn main() {} |
15 changes: 15 additions & 0 deletions
15
tests/ui-fulldeps/internal-lints/query_completeness.stderr
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,15 @@ | ||
error: `is_stolen` accesses information that is not tracked by the query system | ||
--> $DIR/query_completeness.rs:10:15 | ||
| | ||
LL | let _ = x.is_stolen(); | ||
| ^^^^^^^^^ | ||
| | ||
= note: if you believe this case to be fine, allow this lint and add a comment explaining your rationale | ||
note: the lint level is defined here | ||
--> $DIR/query_completeness.rs:3:9 | ||
| | ||
LL | #![deny(rustc::untracked_query_information)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|