File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff 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" ) ]
Original file line number Diff line number Diff 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" ) ]
You can’t perform that action at this time.
0 commit comments