]> git.lizzy.rs Git - rust.git/commitdiff
add note to `opt_const_param_of`
authorBastian Kauschke <bastian_kauschke@hotmail.de>
Sat, 18 Jul 2020 17:22:12 +0000 (19:22 +0200)
committerBastian Kauschke <bastian_kauschke@hotmail.de>
Sat, 18 Jul 2020 17:23:35 +0000 (19:23 +0200)
src/librustc_middle/query/mod.rs

index 40ff25cf3b134194e3c24a406ad11e38096e1c85..06136a82e7b469bd4460742f49ecfffb3b1b8c95 100644 (file)
@@ -103,9 +103,13 @@ fn describe_as_module(def_id: LocalDefId, tcx: TyCtxt<'_>) -> String {
         /// // ^ While calling `opt_const_param_of` for other bodies returns `None`.
         /// }
         /// ```
+        // It looks like caching this query on disk actually slightly
+        // worsened performance in #74376.
+        //
+        // Once const generics are more prevalently used, we might want to
+        // consider only caching calls returning `Some`.
         query opt_const_param_of(key: LocalDefId) -> Option<DefId> {
             desc { |tcx| "computing the optional const parameter of `{}`", tcx.def_path_str(key.to_def_id()) }
-            // FIXME(#74113): consider storing this query on disk.
         }
 
         /// Records the type of every item.