MCPcopy Create free account
hub / github.com/Rust-API/Rust-API-Bypass-Checker / new_static

Method new_static

src/analysis/memory/path.rs:332–343  ·  view source on GitHub ↗
(tcx: TyCtxt<'_>, def_id: DefId)

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls 1

summary_key_strFunction · 0.85

Tested by

no test coverage detected