File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -637,9 +637,10 @@ impl OsStr {
637
637
/// # Examples
638
638
///
639
639
/// ```
640
+ /// #![feature(const_path)]
640
641
/// use std::ffi::OsStr;
641
642
///
642
- /// const OS_STR: OsStr = OsStr::from_str("foo");
643
+ /// const OS_STR: & OsStr = OsStr::from_str("foo");
643
644
/// ```
644
645
#[ inline]
645
646
#[ unstable( feature = "const_path" , reason = "TBD" , issue = "none" ) ]
Original file line number Diff line number Diff line change @@ -1959,10 +1959,11 @@ impl Path {
1959
1959
/// # Examples
1960
1960
///
1961
1961
/// ```
1962
+ /// #![feature(const_path)]
1962
1963
/// use std::ffi::OsStr;
1963
1964
/// use std::path::Path;
1964
1965
///
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"));
1966
1967
/// ```
1967
1968
#[ inline]
1968
1969
#[ unstable( feature = "const_path" , reason = "TBD" , issue = "none" ) ]
You can’t perform that action at this time.
0 commit comments