1#![no_std]
2#![cfg_attr(all(not(feature = "std"), feature = "unstable"),
3 feature(core_intrinsics, core_panic, raw, unicode_internals))]
4#![cfg_attr(all(not(feature = "std"), feature = "alloc", feature = "unstable"),
5 feature(alloc_prelude, raw_vec_internals, wake_trait))]
6
7#[cfg(feature = "std")]
14 extern crate std;
15 #[cfg(feature = "std")]
16 pub mod prelude {
17 pub mod v1 {
18 pub use std::prelude::v1::*;
19 pub use std::{
21 format, vec,
22 print, println, eprint, eprintln, dbg
23 };
24 }
25 }
26 #[cfg(feature = "std")]
27 pub use std::*;
28#[cfg(all(not(feature = "std"), feature = "alloc"))]
36 extern crate alloc as __alloc;
37 #[cfg(not(feature = "std"))]
40 extern crate core as __core;
41
42 #[cfg(not(feature = "std"))]
43 mod generated;
44
45 #[cfg(not(feature = "std"))]
46 pub use self::generated::*;
47
48 #[cfg(all(not(feature = "std"), feature = "compat_macros"))]
50 #[macro_export]
51 macro_rules! print {
52 () => {{}};
53 ($($arg:tt)+) => {{
54 let _ = format_args!($($arg)+);
57 }};
58 }
59 #[cfg(all(not(feature = "std"), feature = "compat_macros"))]
60 #[macro_export]
61 macro_rules! println {
62 ($($arg:tt)*) => { print!($($arg)*) }
63 }
64 #[cfg(all(not(feature = "std"), feature = "compat_macros"))]
65 #[macro_export]
66 macro_rules! eprint {
67 ($($arg:tt)*) => { print!($($arg)*) }
68 }
69 #[cfg(all(not(feature = "std"), feature = "compat_macros"))]
70 #[macro_export]
71 macro_rules! eprintln {
72 ($($arg:tt)*) => { print!($($arg)*) }
73 }
74
75 #[cfg(all(not(feature = "std"), feature = "compat_macros"))]
76 #[macro_export]
77 macro_rules! dbg {
78 () => {};
79 ($($val:expr),+) => { ($($val),+) }
80 }
81