lib.rs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #![doc = include_str!("../README.md")]
  2. #![feature(c_unwind)]
  3. #![feature(naked_functions)]
  4. // lang_items is an internal feature. `internal_features` lint is added recently
  5. // so also allow unknown lints to prevent warning in older nightly versions.
  6. #![cfg_attr(
  7. any(feature = "personality", feature = "personality-dummy"),
  8. allow(internal_features)
  9. )]
  10. #![cfg_attr(
  11. any(feature = "personality", feature = "personality-dummy"),
  12. feature(lang_items)
  13. )]
  14. #![cfg_attr(
  15. any(feature = "panicking", feature = "panic-handler-dummy"),
  16. feature(core_intrinsics)
  17. )]
  18. #![cfg_attr(feature = "panic-handler", feature(thread_local))]
  19. #![warn(rust_2018_idioms)]
  20. #![warn(unsafe_op_in_unsafe_fn)]
  21. #![no_std]
  22. #[cfg(feature = "alloc")]
  23. extern crate alloc;
  24. #[cfg(feature = "unwinder")]
  25. mod unwinder;
  26. #[cfg(all(feature = "unwinder", feature = "fde-custom"))]
  27. pub use unwinder::custom_eh_frame_finder;
  28. pub mod abi;
  29. mod arch;
  30. mod util;
  31. #[cfg(feature = "print")]
  32. pub mod print;
  33. #[cfg(feature = "personality")]
  34. mod personality;
  35. #[cfg(all(not(feature = "personality"), feature = "personality-dummy"))]
  36. mod personality_dummy;
  37. #[cfg(feature = "panic")]
  38. pub mod panic;
  39. #[cfg(feature = "panicking")]
  40. pub mod panicking;
  41. #[cfg(feature = "panic-handler")]
  42. mod panic_handler;
  43. #[cfg(all(not(feature = "panic-handler"), feature = "panic-handler-dummy"))]
  44. mod panic_handler_dummy;
  45. #[cfg(feature = "system-alloc")]
  46. mod system_alloc;