diff options
Diffstat (limited to 'crates/test_utils')
-rw-r--r-- | crates/test_utils/src/minicore.rs | 19 |
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 | ||
21 | pub mod marker { | 22 | pub 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 | ||
132 | pub 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 |
131 | pub mod pin { | 143 | pub mod pin { |
132 | #[lang = "pin"] | 144 | #[lang = "pin"] |
@@ -167,8 +179,11 @@ pub mod task { | |||
167 | 179 | ||
168 | pub mod prelude { | 180 | pub 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 { |