Constructs a name for the crate that contains the given def_id.
(tcx: TyCtxt<'_>, def_id: DefId)
| 212 | |
| 213 | /// Constructs a name for the crate that contains the given def_id. |
| 214 | fn crate_name(tcx: TyCtxt<'_>, def_id: DefId) -> String { |
| 215 | tcx.crate_name(def_id.krate).as_str().to_string() |
| 216 | } |
| 217 | |
| 218 | /// Constructs a string that uniquely identifies a definition to serve as a key to |
| 219 | /// the summary cache, which is a key value store. The string will always be the same as |
no outgoing calls
no test coverage detected