|
187 | 187 | //! [rust-discord]: https://discord.gg/rust-lang
|
188 | 188 | //! [array]: prim@array
|
189 | 189 | //! [slice]: prim@slice
|
| 190 | +
|
190 | 191 | #![cfg_attr(not(feature = "restricted-std"), stable(feature = "rust1", since = "1.0.0"))]
|
191 | 192 | #![cfg_attr(feature = "restricted-std", unstable(feature = "restricted_std", issue = "none"))]
|
192 | 193 | #![doc(
|
|
201 | 202 | no_global_oom_handling,
|
202 | 203 | not(no_global_oom_handling)
|
203 | 204 | ))]
|
| 205 | +// To run libstd tests without x.py without ending up with two copies of libstd, Miri needs to be |
| 206 | +// able to "empty" this crate. See <https://github.com/rust-lang/miri-test-libstd/issues/4>. |
| 207 | +// rustc itself never sets the feature, so this line has no affect there. |
| 208 | +#![cfg(any(not(feature = "miri-test-libstd"), test, doctest))] |
| 209 | +// miri-test-libstd also prefers to make std use the sysroot versions of the dependencies. |
| 210 | +#![cfg_attr(feature = "miri-test-libstd", feature(rustc_private))] |
204 | 211 | // Don't link to std. We are std.
|
205 | 212 | #![no_std]
|
| 213 | +// Tell the compiler to link to either panic_abort or panic_unwind |
| 214 | +#![needs_panic_runtime] |
| 215 | +// |
| 216 | +// Lints: |
206 | 217 | #![warn(deprecated_in_future)]
|
207 | 218 | #![warn(missing_docs)]
|
208 | 219 | #![warn(missing_debug_implementations)]
|
209 | 220 | #![allow(explicit_outlives_requirements)]
|
210 | 221 | #![allow(unused_lifetimes)]
|
211 |
| -// Tell the compiler to link to either panic_abort or panic_unwind |
212 |
| -#![needs_panic_runtime] |
| 222 | +#![deny(rustc::existing_doc_keyword)] |
213 | 223 | // Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
|
214 | 224 | #![deny(ffi_unwind_calls)]
|
215 | 225 | // std may use features in a platform-specific way
|
216 | 226 | #![allow(unused_features)]
|
| 227 | +// |
| 228 | +// Features: |
217 | 229 | #![cfg_attr(test, feature(internal_output_capture, print_internals, update_panic_count, rt))]
|
218 | 230 | #![cfg_attr(
|
219 | 231 | all(target_vendor = "fortanix", target_env = "sgx"),
|
220 | 232 | feature(slice_index_methods, coerce_unsized, sgx_platform)
|
221 | 233 | )]
|
222 |
| -#![deny(rustc::existing_doc_keyword)] |
223 | 234 | //
|
224 | 235 | // Language features:
|
225 | 236 | #![feature(alloc_error_handler)]
|
|
0 commit comments