|
86 | 86 | ))]
|
87 | 87 |
|
88 | 88 | // Attributes needed when building as part of the standard library
|
89 |
| -#![cfg_attr(feature = "stdbuild", feature(staged_api, cfg_target_vendor))] |
90 |
| -#![cfg_attr(feature = "stdbuild", feature(link_cfg, repr_packed))] |
91 |
| -#![cfg_attr(feature = "stdbuild", allow(warnings))] |
| 89 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(cfg_target_vendor))] |
| 90 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg))] |
| 91 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(no_core))] |
| 92 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(staged_api))] |
| 93 | +#![cfg_attr(feature = "rustc-dep-of-std", no_core)] |
92 | 94 | #![cfg_attr(feature = "stdbuild", unstable(feature = "libc",
|
93 |
| - reason = "use `libc` from crates.io", |
94 |
| - issue = "27783"))] |
| 95 | + reason = "use `libc` from crates.io", |
| 96 | + issue = "27783"))] |
95 | 97 |
|
96 |
| -#![cfg_attr(not(feature = "use_std"), no_std)] |
| 98 | + |
| 99 | +#![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)] |
97 | 100 |
|
98 | 101 | #[cfg(all(not(cross_platform_docs), feature = "use_std"))]
|
99 | 102 | extern crate std as core;
|
100 | 103 |
|
| 104 | +#[cfg(feature = "rustc-dep-of-std")] |
| 105 | +extern crate rustc_std_workspace_core as core; |
| 106 | +#[cfg(feature = "rustc-dep-of-std")] |
| 107 | +#[allow(unused_imports)] |
| 108 | +use core::iter; |
| 109 | +#[cfg(feature = "rustc-dep-of-std")] |
| 110 | +#[allow(unused_imports)] |
| 111 | +use core::option; |
| 112 | + |
101 | 113 | #[macro_use] mod macros;
|
102 | 114 | mod dox;
|
103 | 115 |
|
|
0 commit comments