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