1//! This module reexports the primitive types to allow usage that is not
2//! possibly shadowed by other declared types.
3//!
4//! This is normally only useful in macro generated code.
5//!
6//! An example of this is when generating a new struct and an impl for it:
7//!
8//! ```rust,compile_fail
9//! pub struct bool;
10//!
11//! impl QueryId for bool {
12//! const SOME_PROPERTY: bool = true;
13//! }
14//!
15//! # trait QueryId { const SOME_PROPERTY: core::primitive::bool; }
16//! ```
17//!
18//! Note that the `SOME_PROPERTY` associated constant would not compile, as its
19//! type `bool` refers to the struct, rather than to the primitive bool type.
20//!
21//! A correct implementation could look like:
22//!
23//! ```rust
24//! # #[allow(non_camel_case_types)]
25//! pub struct bool;
26//!
27//! impl QueryId for bool {
28//! const SOME_PROPERTY: core::primitive::bool = true;
29//! }
30//!
31//! # trait QueryId { const SOME_PROPERTY: core::primitive::bool; }
32//! ```
33
34#[stable(feature = "core_primitive", since = "1.43.0")]
35pub use bool;
36#[stable(feature = "core_primitive", since = "1.43.0")]
37pub use char;
38#[stable(feature = "core_primitive", since = "1.43.0")]
39pub use f32;
40#[stable(feature = "core_primitive", since = "1.43.0")]
41pub use f64;
42#[stable(feature = "core_primitive", since = "1.43.0")]
43pub use i128;
44#[stable(feature = "core_primitive", since = "1.43.0")]
45pub use i16;
46#[stable(feature = "core_primitive", since = "1.43.0")]
47pub use i32;
48#[stable(feature = "core_primitive", since = "1.43.0")]
49pub use i64;
50#[stable(feature = "core_primitive", since = "1.43.0")]
51pub use i8;
52#[stable(feature = "core_primitive", since = "1.43.0")]
53pub use isize;
54#[stable(feature = "core_primitive", since = "1.43.0")]
55pub use str;
56#[stable(feature = "core_primitive", since = "1.43.0")]
57pub use u128;
58#[stable(feature = "core_primitive", since = "1.43.0")]
59pub use u16;
60#[stable(feature = "core_primitive", since = "1.43.0")]
61pub use u32;
62#[stable(feature = "core_primitive", since = "1.43.0")]
63pub use u64;
64#[stable(feature = "core_primitive", since = "1.43.0")]
65pub use u8;
66#[stable(feature = "core_primitive", since = "1.43.0")]
67pub use usize;
68