Skip to content

Commit 876f800

Browse files
committed
CStr is available in core since Rust 1.64
1 parent 4321369 commit 876f800

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/fallback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use core::cell::RefCell;
1313
use core::cmp;
1414
#[cfg(all(span_locations, not(fuzzing)))]
1515
use core::cmp::Ordering;
16+
use core::ffi::CStr;
1617
use core::fmt::{self, Debug, Display, Write};
1718
use core::mem::ManuallyDrop;
1819
#[cfg(span_locations)]
@@ -22,7 +23,6 @@ use core::ptr;
2223
use core::str;
2324
#[cfg(feature = "proc-macro")]
2425
use core::str::FromStr;
25-
use std::ffi::CStr;
2626
#[cfg(wrap_proc_macro)]
2727
use std::panic;
2828
#[cfg(span_locations)]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,14 @@ use crate::marker::{ProcMacroAutoTraits, MARKER};
175175
#[cfg(procmacro2_semver_exempt)]
176176
use crate::rustc_literal_escaper::MixedUnit;
177177
use core::cmp::Ordering;
178+
use core::ffi::CStr;
178179
use core::fmt::{self, Debug, Display};
179180
use core::hash::{Hash, Hasher};
180181
#[cfg(span_locations)]
181182
use core::ops::Range;
182183
use core::ops::RangeBounds;
183184
use core::str::FromStr;
184185
use std::error::Error;
185-
use std::ffi::CStr;
186186
#[cfg(span_locations)]
187187
use std::path::PathBuf;
188188

src/rustc_literal_escaper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! turning escape sequences into the values they represent.
66
77
use crate::num::NonZeroChar;
8-
use std::ffi::CStr;
8+
use core::ffi::CStr;
99
use std::num::NonZeroU8;
1010
use std::ops::Range;
1111
use std::str::Chars;

src/wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ use crate::probe::proc_macro_span_file;
99
#[cfg(all(span_locations, proc_macro_span_location))]
1010
use crate::probe::proc_macro_span_location;
1111
use crate::{Delimiter, Punct, Spacing, TokenTree};
12+
use core::ffi::CStr;
1213
use core::fmt::{self, Debug, Display};
1314
#[cfg(span_locations)]
1415
use core::ops::Range;
1516
use core::ops::RangeBounds;
16-
use std::ffi::CStr;
1717
#[cfg(span_locations)]
1818
use std::path::PathBuf;
1919

0 commit comments

Comments
 (0)