Skip to main content

rewrite_external_ptr_receivers

Function rewrite_external_ptr_receivers 

Source
fn rewrite_external_ptr_receivers(item_impl: ItemImpl) -> ItemImpl
Expand description

Rewrite methods with handle receivers so they compile on stable Rust (which lacks arbitrary_self_types).

Handles:

  • self: ExternalPtrRef<'_, Self> → __miniextendr_self: ExternalPtrRef<'_, Self>
  • self: ExternalPtrMut<'_, Self> → __miniextendr_self: ExternalPtrMut<'_, Self>
  • self: ExternalPtr<Self> → __miniextendr_self: ExternalPtr<Self>

Also replaces all self references in the method body with __miniextendr_self.