Verified Commit 13d58c3c authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Add std re-exports and prelude

parent d2b01200
/* This section was addapted from the Rust Standard Library, and is licensed accordingly
* {
// Explicitly import the prelude. The compiler uses this same unstable attribute
// to import the prelude implicitly when building crates that depend on std.
use prelude::*;
// Re-export a few macros from core
pub use core::{assert_eq, assert_ne, debug_assert, debug_assert_eq, debug_assert_ne};
pub use core::{unreachable, unimplemented, write, writeln, r#try};
extern crate alloc as alloc_crate;
// The standard macros that are not built-in to the compiler.
mod macros;
// The Rust prelude
pub mod prelude;
// Public module declarations and re-exports
pub use core::any;
pub use core::arch;
pub use core::cell;
pub use core::clone;
pub use core::cmp;
pub use core::convert;
pub use core::default;
pub use core::hash;
pub use core::intrinsics;
pub use core::iter;
pub use core::marker;
pub use core::mem;
pub use core::ops;
pub use core::ptr;
pub use core::raw;
pub use core::result;
pub use core::option;
pub use core::isize;
pub use core::i8;
pub use core::i16;
pub use core::i32;
pub use core::i64;
pub use core::i128;
pub use core::usize;
pub use core::u8;
pub use core::u16;
pub use core::u32;
pub use core::u64;
pub use alloc_crate::boxed;
pub use alloc_crate::rc;
pub use alloc_crate::borrow;
pub use alloc_crate::fmt;
pub use alloc_crate::format;
pub use core::pin;
pub use alloc_crate::slice;
pub use alloc_crate::str;
pub use alloc_crate::string;
pub use alloc_crate::vec;
pub use core::char;
pub use core::u128;
pub use core::hint;
/* } */
pub use uefi;
pub use uefi_alloc;
pub mod io;
pub mod math;
pub mod rt;
/* This section was addapted from the Rust Standard Library, and is licensed accordingly
* {
// Re-exported core operators
pub use crate::marker::{Copy, Send, Sized, Sync, Unpin};
pub use crate::ops::{Drop, Fn, FnMut, FnOnce};
// Re-exported functions
pub use crate::mem::drop;
// Re-exported types and traits
pub use crate::clone::Clone;
pub use crate::cmp::{PartialEq, PartialOrd, Eq, Ord};
pub use crate::convert::{AsRef, AsMut, Into, From};
pub use crate::default::Default;
pub use crate::iter::{Iterator, Extend, IntoIterator};
pub use crate::iter::{DoubleEndedIterator, ExactSizeIterator};
pub use crate::option::Option::{self, Some, None};
pub use crate::result::Result::{self, Ok, Err};
// The file so far is equivalent to src/libcore/prelude/,
// and below to src/liballoc/
// Those files are duplicated rather than using glob imports
// because we want docs to show these re-exports as pointing to within `std`.
pub use crate::boxed::Box;
pub use crate::borrow::ToOwned;
pub use crate::slice::SliceConcatExt;
pub use crate::string::{String, ToString};
pub use crate::vec::Vec;
/* } */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment