-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alloc, core, std, and a quite expansive prelude?
- Loading branch information
Showing
6 changed files
with
119 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,103 @@ | ||
//! Prelude module, exporting commonly-used items | ||
|
||
use crate::rust_std; | ||
|
||
pub use rust_std::{ | ||
assert, | ||
assert_eq, | ||
assert_ne, | ||
debug_assert, | ||
debug_assert_eq, | ||
debug_assert_ne, | ||
print, | ||
println, | ||
eprint, | ||
eprintln, | ||
cfg, | ||
dbg, | ||
unreachable, | ||
concat, | ||
compile_error, | ||
file, | ||
line, | ||
column, | ||
format, | ||
format_args, | ||
stringify | ||
}; | ||
pub use rust_std::borrow::{ | ||
Cow, | ||
ToOwned | ||
}; | ||
pub use rust_std::convert::{ | ||
From, | ||
Into, | ||
TryFrom, | ||
TryInto, | ||
AsMut, | ||
AsRef, | ||
identity | ||
}; | ||
pub use rust_std::future::{ | ||
Future, | ||
IntoFuture | ||
}; | ||
pub use rust_std::iter::{ | ||
Iterator, | ||
FromIterator, | ||
IntoIterator, | ||
DoubleEndedIterator, | ||
ExactSizeIterator, | ||
Extend | ||
}; | ||
pub use rust_std::marker::{ | ||
Send, | ||
Sync, | ||
Sized, | ||
Unpin, | ||
PhantomData, | ||
PhantomPinned | ||
}; | ||
pub use rust_std::mem::{ | ||
size_of, | ||
size_of_val, | ||
align_of, | ||
align_of_val, | ||
drop, | ||
forget, | ||
replace, | ||
swap, | ||
take, | ||
transmute, | ||
transmute_copy, | ||
zeroed | ||
}; | ||
pub use rust_std::ops::{ | ||
Drop, | ||
Fn, | ||
FnMut, | ||
FnOnce | ||
}; | ||
pub use rust_std::option::{ | ||
Option, | ||
Option::Some, | ||
Option::None | ||
}; | ||
pub use rust_std::result::{ | ||
Result, | ||
Result::Ok, | ||
Result::Err | ||
}; | ||
pub use rust_std::string::{ | ||
String, | ||
ToString | ||
}; | ||
pub use rust_std::vec::Vec; | ||
|
||
#[macro_export] | ||
macro_rules! panic { | ||
($($stuff:tt)*) => { | ||
$crate::rust_std::panic!($($stuff)*) | ||
} | ||
} | ||
pub use panic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extern crate alloc as _alloc; | ||
|
||
#[doc(inline)] | ||
pub use _alloc::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extern crate core as _core; | ||
|
||
#[doc(inline)] | ||
pub use _core::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extern crate std as _std; | ||
|
||
#[doc(inline)] | ||
pub use _std::*; |