|
150 | 150 | ) |
151 | 151 | )] |
152 | 152 | // Attributes needed when building as part of the standard library |
153 | | -#![cfg_attr(feature = "stdbuild", feature(staged_api, cfg_target_vendor))] |
154 | | -#![cfg_attr(feature = "stdbuild", feature(link_cfg, repr_packed))] |
155 | | -#![cfg_attr(feature = "stdbuild", allow(warnings))] |
| 153 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(staged_api, cfg_target_vendor))] |
| 154 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, repr_packed))] |
| 155 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(no_core))] |
| 156 | +#![cfg_attr(feature = "rustc-dep-of-std", no_core)] |
| 157 | +#![cfg_attr(feature = "rustc-dep-of-std", allow(warnings))] |
156 | 158 | #![cfg_attr( |
157 | | - feature = "stdbuild", |
| 159 | + feature = "rustc-dep-of-std", |
158 | 160 | unstable( |
159 | 161 | feature = "libc", |
160 | 162 | reason = "use `libc` from crates.io", |
161 | 163 | issue = "27783" |
162 | 164 | ) |
163 | 165 | )] |
164 | | -#![cfg_attr(not(feature = "use_std"), no_std)] |
| 166 | +#![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)] |
165 | 167 |
|
166 | 168 | #[cfg(all(not(cross_platform_docs), feature = "use_std"))] |
167 | 169 | extern crate std as core; |
168 | 170 |
|
| 171 | +#[cfg(feature = "rustc-dep-of-std")] |
| 172 | +extern crate rustc_std_workspace_core as core; |
| 173 | +#[cfg(feature = "rustc-dep-of-std")] |
| 174 | +#[allow(unused_imports)] |
| 175 | +use core::iter; |
| 176 | +#[cfg(feature = "rustc-dep-of-std")] |
| 177 | +#[allow(unused_imports)] |
| 178 | +use core::option; |
| 179 | + |
169 | 180 | #[macro_use] |
170 | 181 | mod macros; |
171 | 182 |
|
|
0 commit comments