Mark has_global_allocator
query as eval_always
Fixes #84252 This query reads from untracked global state in `CStore`.
This commit is contained in:
parent
0cc00c48d2
commit
169a221618
@ -1055,6 +1055,8 @@ rustc_queries! {
|
||||
desc { "checking if the crate is_compiler_builtins" }
|
||||
}
|
||||
query has_global_allocator(_: CrateNum) -> bool {
|
||||
// This query depends on untracked global state in CStore
|
||||
eval_always
|
||||
fatal_cycle
|
||||
desc { "checking if the crate has_global_allocator" }
|
||||
}
|
||||
|
12
src/test/incremental/issue-84252-global-alloc.rs
Normal file
12
src/test/incremental/issue-84252-global-alloc.rs
Normal file
@ -0,0 +1,12 @@
|
||||
// revisions: cfail1 cfail2
|
||||
// build-pass
|
||||
|
||||
#![crate_type="lib"]
|
||||
#![crate_type="cdylib"]
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use std::alloc::System;
|
||||
|
||||
#[cfg(cfail1)]
|
||||
#[global_allocator]
|
||||
static ALLOC: System = System;
|
Loading…
x
Reference in New Issue
Block a user