Ancestors

Toot

Written by Jan :rust: :ferris: on 2025-01-25 at 20:04

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

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113890786806765661
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
240.708368 milliseconds
Gemini-to-HTML Time
0.842636 milliseconds

This content has been proxied by September (3851b).