Oh look, there's a stabilization PR for Arbitrary Self Types V2
over at #RustLang :awesome: 🎉
https://github.com/rust-lang/rust/pull/135881
It allows you to do stuff like this (taken from the PR):
struct MySmartPtr(T);
impl core::ops::Receiver for MySmartPtr {
type Target = T;
}
struct Content;
impl Content {
fn method(self: MySmartPtr) { // note self type
}
}
The #RustForLinux project heavily relies on this feature.
[#]Rust
=> More informations about this toot | More toots from janriemer@floss.social
text/gemini
This content has been proxied by September (3851b).