pattern_wishcast/
lib.rs

1// SPDX-FileCopyrightText: 2025 LunNova
2//
3// SPDX-License-Identifier: MIT
4#![doc = include_str!("../README.md")]
5#![cfg_attr(feature = "never_type", feature(never_type))]
6
7pub use pattern_wishcast_macros::pattern_wishcast;
8
9/// An uninhabited type for use in pattern-wishcast generated code.
10///
11/// When the `never_type` feature is enabled, this is an alias to the unstable never type (`!`).
12/// Otherwise, this is a stable equivalent enum that works on stable Rust.
13#[cfg(feature = "never_type")]
14pub type Never = !;
15
16/// An uninhabited type for use in pattern-wishcast generated code.
17///
18/// When the `never_type` feature is enabled, this is an alias to the unstable never type (`!`).
19/// Otherwise, this is a stable equivalent enum that works on stable Rust.
20#[cfg(not(feature = "never_type"))]
21#[derive(Debug, Clone, Copy)]
22pub enum Never {}