]> git.lizzy.rs Git - rust.git/commitdiff
add comment
authorRalf Jung <post@ralfj.de>
Wed, 1 Aug 2018 06:39:30 +0000 (08:39 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 1 Aug 2018 06:39:30 +0000 (08:39 +0200)
src/librustc_lint/builtin.rs

index 223edd16c635a40f405f48b970fda7cc4b982dd5..cf3a5449b0395f75c3583e519566c8a8a45ce16d 100644 (file)
@@ -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)