this post was submitted on 10 Sep 2023
9 points (100.0% liked)
Rust Programming
8191 readers
22 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What you are looking for is called specialization.
It is currently unstable and incomplete, which means you can activate it by adding the macros
#![feature(specialization)]
and#![allow(incomplete_features)]
at the beginning of the file. But you have no guarantee that it will work the same way on the next version of rust.Yeah, that seems like it would work! Unfortunately I can't use unstable features. I'll keep it in mind for other projects though.