pub fn rewrite_self_type(item: &mut Item)
Expand description

Rewrite Self type alias usage in an impl block to the type itself.

For example,

impl some::module::Foo {
    fn method(
        self: Arc<Self>,
        arg: Option<Bar<(), Self>>,
    ) -> Result<Self, Error> {
        todo!()
    }
}

will be rewritten to

impl some::module::Foo {
   fn method(
       self: Arc<some::module::Foo>,
       arg: Option<Bar<(), some::module::Foo>>,
   ) -> Result<some::module::Foo, Error> {
       todo!()
   }
}