F-pattern_types : Subsets enums using as
Rust Internals [Unofficial]
March 3, 2026
DidingasLushis:
Based on the syntax supported by pattern types (when they emerge) would my example be re-worked to be like:
type MyErrorSubset = MyError is MyError::NotFound | MyError::PermissionDenied;
// or in an even brighter future...
type MyErrorSubset = MyError is _::NotFound | _::PermissionDenied;
Discussion in the ATmosphere