Add more `std` prelude items to `crate::prelude`
authorMatt Corallo <git@bluematt.me>
Thu, 21 Mar 2024 14:22:52 +0000 (14:22 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 5 Apr 2024 09:05:26 +0000 (09:05 +0000)
New rustc beta now warns on duplicate imports when one of the
imports is from a wildcard import or the default prelude. Thus, for
simplicity, we need to make our `crate::prelude` mostly identical
to the `std` one, allowing us to always simply use the
`crate::prelude` and let it decide if we need to import anything.

lightning/src/lib.rs

index 1adf3786b76d48a571665e73e2e8a551276a73f8..29fe76b49adb2ffb8a7e3d7ffc945c6575f06cbf 100644 (file)
@@ -170,6 +170,9 @@ mod prelude {
        pub use alloc::borrow::ToOwned;
        pub use alloc::string::ToString;
 
+       pub use core::convert::{TryFrom, TryInto};
+       pub use core::marker::Sized;
+
        pub(crate) use crate::util::hash_tables::*;
 }