Skip to content

Commit 0d7349f

Browse files
committed
Resolve ambiguous core import on rustc 1.64 through 1.71
In 1.72+, this is fixed by rust-lang/rust#112086. error[E0659]: `core` is ambiguous --> serde/src/lib.rs:227:13 | 227 | pub use core::ffi::CStr; | ^^^^ ambiguous name | = note: ambiguous because of multiple potential import sources = note: `core` could refer to a built-in crate = help: use `::core` to refer to this crate unambiguously note: `core` could also refer to the module defined here --> serde/src/lib.rs:166:5 | 166 | / mod core { 167 | | #[cfg(not(feature = "std"))] 168 | | pub use core::*; 169 | | #[cfg(feature = "std")] 170 | | pub use std::*; 171 | | } | |_____^ = help: use `self::core` to refer to this module unambiguously
1 parent 830528d commit 0d7349f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serde/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ mod lib {
224224
pub use std::collections::{BTreeMap, BTreeSet, BinaryHeap, LinkedList, VecDeque};
225225

226226
#[cfg(all(not(no_core_cstr), not(feature = "std")))]
227-
pub use core::ffi::CStr;
227+
pub use self::core::ffi::CStr;
228228
#[cfg(feature = "std")]
229229
pub use std::ffi::CStr;
230230

0 commit comments

Comments
 (0)