aboutsummaryrefslogtreecommitdiff
path: root/crates/test_utils
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-15 21:07:25 +0100
committerAleksey Kladov <[email protected]>2021-06-15 21:07:25 +0100
commit0798cce9e564774b663fd965aaf2ef7e5778cb3f (patch)
treea8e7906bb91b157ffaf71dd5daa3ed9f6ff84212 /crates/test_utils
parentae92057df6608f6ab48317198a9d13a97f07f004 (diff)
internal: add result to minicore
Diffstat (limited to 'crates/test_utils')
-rw-r--r--crates/test_utils/src/minicore.rs19
1 files changed, 17 insertions, 2 deletions
diff --git a/crates/test_utils/src/minicore.rs b/crates/test_utils/src/minicore.rs
index cb18c8796..5ff60178c 100644
--- a/crates/test_utils/src/minicore.rs
+++ b/crates/test_utils/src/minicore.rs
@@ -17,6 +17,7 @@
17//! pin: 17//! pin:
18//! future: pin 18//! future: pin
19//! option: 19//! option:
20//! result:
20 21
21pub mod marker { 22pub mod marker {
22 // region:sized 23 // region:sized
@@ -127,6 +128,17 @@ pub mod option {
127} 128}
128// endregion:option 129// endregion:option
129 130
131// region:result
132pub mod result {
133 pub enum Result<T, E> {
134 #[lang = "Ok"]
135 Ok(T),
136 #[lang = "Err"]
137 Err(E),
138 }
139}
140// endregion:result
141
130// region:pin 142// region:pin
131pub mod pin { 143pub mod pin {
132 #[lang = "pin"] 144 #[lang = "pin"]
@@ -167,8 +179,11 @@ pub mod task {
167 179
168pub mod prelude { 180pub mod prelude {
169 pub mod v1 { 181 pub mod v1 {
170 pub use crate::marker::Sized; // :sized 182 pub use crate::{
171 pub use crate::option::Option::{self, None, Some}; // :option 183 marker::Sized, // :sized
184 option::Option::{self, None, Some}, // :option
185 result::Result::{self, Err, Ok}, // :result
186 };
172 } 187 }
173 188
174 pub mod rust_2015 { 189 pub mod rust_2015 {