MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / new_static

Method new_static

aiscript-arena/src/gc.rs:119–123  ·  view source on GitHub ↗
(mc: &Mutation<'gc>, t: T)

Source from the content-addressed store, hash-verified

117 /// ```
118 #[inline]
119 pub fn new_static(mc: &Mutation<'gc>, t: T) -> Gc<'gc, T> {
120 let p = Gc::new(mc, Static(t));
121 // SAFETY: `Static` is `#[repr(transparent)]`.
122 unsafe { Gc::cast::<T>(p) }
123 }
124}
125
126impl<'gc, T: ?Sized + 'gc> Gc<'gc, T> {

Callers

nothing calls this directly

Calls 1

StaticClass · 0.85

Tested by

no test coverage detected