Skip to content

Commit

Permalink
Forcibly inline vtable access
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 17, 2024
1 parent a94b336 commit 0ec7a77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ impl Hash for ConstTypeId {
}

#[must_use]
#[inline(always)]
pub fn of<T>() -> TypeId
where
T: ?Sized,
Expand All @@ -205,6 +206,7 @@ where
}

impl<T: ?Sized> NonStaticAny for PhantomData<T> {
#[inline(always)]
fn get_type_id(&self) -> TypeId
where
Self: 'static,
Expand Down

0 comments on commit 0ec7a77

Please sign in to comment.