(tcx: TyCtxt<'_>, def_id: DefId)
| 330 | } |
| 331 | |
| 332 | pub fn new_static(tcx: TyCtxt<'_>, def_id: DefId) -> Rc<Path> { |
| 333 | let ty = tcx.type_of(def_id).skip_binder(); |
| 334 | let name = utils::summary_key_str(tcx, def_id); |
| 335 | Rc::new( |
| 336 | PathEnum::StaticVariable { |
| 337 | def_id: Some(def_id), |
| 338 | summary_cache_key: name, |
| 339 | expression_type: ExpressionType::from(ty.kind()), |
| 340 | } |
| 341 | .into(), |
| 342 | ) |
| 343 | } |
| 344 | |
| 345 | /// Creates a path to the local variable corresponding to the ordinal. |
| 346 | pub fn new_local(ordinal: usize, offset: usize) -> Rc<Path> { |
nothing calls this directly
no test coverage detected