1
Fork 0

Add an internal lint that warns when accessing untracked data

This commit is contained in:
Nadrieril 2024-08-09 09:52:12 +02:00
parent 6199b69c53
commit 040239465a
11 changed files with 82 additions and 35 deletions

View file

@ -57,6 +57,7 @@ impl<T> Steal<T> {
///
/// This should not be used within rustc as it leaks information not tracked
/// by the query system, breaking incremental compilation.
#[cfg_attr(not(bootstrap), rustc_lint_untracked_query_information)]
pub fn is_stolen(&self) -> bool {
self.value.borrow().is_none()
}