add comment
This commit is contained in:
parent
5ce5f310cc
commit
222dd17944
@ -1632,6 +1632,7 @@ fn check_const(cx: &LateContext, body_id: hir::BodyId, what: &str) {
|
||||
let def_id = cx.tcx.hir.body_owner_def_id(body_id);
|
||||
let is_static = cx.tcx.is_static(def_id).is_some();
|
||||
let param_env = if is_static {
|
||||
// Use the same param_env as `codegen_static_initializer`, to reuse the cache.
|
||||
ty::ParamEnv::reveal_all()
|
||||
} else {
|
||||
cx.tcx.param_env(def_id)
|
||||
|
Loading…
Reference in New Issue
Block a user