add impossible type

master
Avril 4 years ago
parent f486c061ed
commit 80bc839221
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -5,10 +5,12 @@ use super::*;
pub use types::{Handle,GhostHandle};
#[cfg(not(nightly))] enum HandleInner{}
macro_rules! handle {
($name:ident, $inner_name:ident) => {
#[cfg(nightly)] pub struct $inner_name(!);
#[cfg(not(nightly))] pub struct $inner_name(());
#[cfg(not(nightly))] pub struct $inner_name(HandleInner);
impl private::Sealed for $inner_name{}
impl GhostHandle for $inner_name{}
pub type $name = *mut Handle<$inner_name>;

@ -5,7 +5,7 @@
//! I've attempted to provide more Rust-idiomatic API variants as well, which have non-prefixed names.
//!
//! # Namespace polution and interface stablility
//! Eventually I intend to have /most/ (if not all) C compatable types either reimplemented or aliased to non-prefixed Rust types.
//! Eventually I think we should have *most* (if not all) C compatable types either reimplemented or aliased to non-prefixed Rust types.
//! At present though this is not the case, and prefixed names that can double as ergonomic Rust types are not aliased to them, so you'll have to use both often.
//! The reimplementation is undergoing, the aliasing not yet.

Loading…
Cancel
Save