Skip to content

Commit 5bb397d

Browse files
committed
fix: doctests
1 parent 7b4bdc0 commit 5bb397d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

library/std/src/ffi/os_str.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,10 @@ impl OsStr {
637637
/// # Examples
638638
///
639639
/// ```
640+
/// #![feature(const_path)]
640641
/// use std::ffi::OsStr;
641642
///
642-
/// const OS_STR: OsStr = OsStr::from_str("foo");
643+
/// const OS_STR: &OsStr = OsStr::from_str("foo");
643644
/// ```
644645
#[inline]
645646
#[unstable(feature = "const_path", reason = "TBD", issue = "none")]

library/std/src/path.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1959,10 +1959,11 @@ impl Path {
19591959
/// # Examples
19601960
///
19611961
/// ```
1962+
/// #![feature(const_path)]
19621963
/// use std::ffi::OsStr;
19631964
/// use std::path::Path;
19641965
///
1965-
/// const PATH: Path = Path::from_os_str(OsStr::from_str("/foo/bar"));
1966+
/// const PATH: &Path = Path::from_os_str(OsStr::from_str("/foo/bar"));
19661967
/// ```
19671968
#[inline]
19681969
#[unstable(feature = "const_path", reason = "TBD", issue = "none")]

0 commit comments

Comments
 (0)