Methods sometimes need access to the Arc managing self. This is easy: fn f(self: Arc) (to own the reference count) or fn f(self: &Arc) (to borrow it with the possibility of owning a count later by clone()). The former has the issue that every method call consumes self so many calls need o.clone().f() which is very unergonomically and it's slower because of the forced atomic inc/dec. But the &Arc version works, so whatever. However, if I want to pass around an Arc, then...| The Rust Programming Language Forum
I want to emphasize here that an uninhabited type isn't quite a zero sized type; it's generally fine to treat them as such, but ideally size_of() would be returning that it has no size at all, not even a size of 0. There's a related situation with dynamically sized types like dyn Foo and [Bar] (without a wrapping reference) - it's not documented, but IIRC size_of() panics for those as 0 is not a reasonable fallback? Logically, it should probably return an enum itself!| The Rust Programming Language Forum
How can I correctly declare type inside declarative macro by separating type's name itself and it's generics ? Consider this example: struct RectangleA; struct RectangleB; I want to separate type declaration (and possibly it's genercics) between few macroses to match on different parameters. I see it like this: macro_rules! get_type { (false) => { RectangleA } (true) => { RectangleB ...| The Rust Programming Language Forum