|
108 | 108 | doc(html_root_url = "https://rust-lang.github.io/libc/sparc64-unknown-linux-gnu")
|
109 | 109 | )]
|
110 | 110 | // Attributes needed when building as part of the standard library
|
111 |
| -#![cfg_attr(feature = "stdbuild", feature(staged_api, cfg_target_vendor))] |
112 |
| -#![cfg_attr(feature = "stdbuild", feature(link_cfg, repr_packed))] |
113 |
| -#![cfg_attr(feature = "stdbuild", allow(warnings))] |
| 111 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(staged_api, cfg_target_vendor))] |
| 112 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, repr_packed))] |
| 113 | +#![cfg_attr(feature = "rustc-dep-of-std", feature(no_core))] |
| 114 | +#![cfg_attr(feature = "rustc-dep-of-std", no_core)] |
114 | 115 | #![cfg_attr(
|
115 |
| - feature = "stdbuild", |
| 116 | + feature = "rustc-dep-of-std", |
116 | 117 | unstable(
|
117 | 118 | feature = "libc",
|
118 | 119 | reason = "use `libc` from crates.io",
|
119 | 120 | issue = "27783"
|
120 | 121 | )
|
121 | 122 | )]
|
122 |
| -#![cfg_attr(not(feature = "use_std"), no_std)] |
| 123 | +#![cfg_attr(not(any(feature = "use_std", feature = "rustc-dep-of-std")), no_std)] |
| 124 | + |
123 | 125 | // FIXME: this crate is empty for wasm32-unknown-unknown
|
124 | 126 | #![cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
125 | 127 |
|
126 | 128 | #[cfg(all(not(cross_platform_docs), feature = "use_std"))]
|
127 | 129 | extern crate std as core;
|
128 | 130 |
|
| 131 | +#[cfg(feature = "rustc-dep-of-std")] |
| 132 | +extern crate rustc_std_workspace_core as core; |
| 133 | +#[cfg(feature = "rustc-dep-of-std")] |
| 134 | +#[allow(unused_imports)] |
| 135 | +use core::iter; |
| 136 | +#[cfg(feature = "rustc-dep-of-std")] |
| 137 | +#[allow(unused_imports)] |
| 138 | +use core::option; |
| 139 | + |
129 | 140 | #[macro_use]
|
130 | 141 | mod macros;
|
131 | 142 |
|
|
0 commit comments