|
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))] |
156 | | -#![cfg_attr( |
157 | | - feature = "stdbuild", |
158 | | - unstable( |
159 | | - feature = "libc", |
160 | | - reason = "use `libc` from crates.io", |
161 | | - issue = "27783" |
162 | | - ) |
163 | | -)] |
164 | | -#![cfg_attr(not(feature = "use_std"), no_std)] |
| 153 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(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))] |
| 158 | +#![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)] |
165 | 159 |
|
166 | 160 | #[cfg(all(not(cross_platform_docs), feature = "use_std"))] |
167 | 161 | extern crate std as core; |
168 | 162 |
|
| 163 | +#[cfg(feature = "rustc-dep-of-std")] |
| 164 | +extern crate rustc_std_workspace_core as core; |
| 165 | +#[cfg(feature = "rustc-dep-of-std")] |
| 166 | +#[allow(unused_imports)] |
| 167 | +use core::iter; |
| 168 | +#[cfg(feature = "rustc-dep-of-std")] |
| 169 | +#[allow(unused_imports)] |
| 170 | +use core::option; |
| 171 | + |
169 | 172 | #[macro_use] |
170 | 173 | mod macros; |
171 | 174 |
|
|
0 commit comments