Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for CString, OsString, PathBuf extra methods #40380
Comments
This comment has been minimized.
This comment has been minimized.
|
ping @brson / @alexcrichton to tag this, also ping @jonhoo because you were specifically interested in stabilising these for something for serde. |
This comment has been minimized.
This comment has been minimized.
|
Oh it looks like in #39594 we forgot to update the tracking issue. @clarcharr could you update those tracking issues to point here? |
alexcrichton
added
B-unstable
T-libs
labels
Mar 9, 2017
This comment has been minimized.
This comment has been minimized.
|
I included that as part of the second PR, so, already covered. If for some reason that PR isn't accepted, I'll make a separate PR for just updating the tracking issues. |
clarfon
changed the title
Tracking issue for CString, OsString, PathBuf to Box methods
Tracking issue for CString, OsString, PathBuf extra methods
Apr 5, 2017
clarfon
referenced this issue
Apr 5, 2017
Merged
Reduce str transmutes, add mut versions of methods. #41096
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Apr 10, 2017
bors
added a commit
that referenced
this issue
Apr 11, 2017
bors
added a commit
that referenced
this issue
Apr 11, 2017
bors
added a commit
that referenced
this issue
Apr 11, 2017
bors
added a commit
that referenced
this issue
Apr 11, 2017
clarfon
referenced this issue
Apr 14, 2017
Open
Warn on transmutes that could use pre-defined methods instead #1675
This comment has been minimized.
This comment has been minimized.
|
The into_boxed_* methods do not have associated tracking issue set. Also, I really dislike the |
This comment has been minimized.
This comment has been minimized.
|
Currently this is to be consistent with methods that already exist, like |
This comment has been minimized.
This comment has been minimized.
|
Also I'm confused on what you mean about them lacking a tracking issue; all of them link to here. |
This comment has been minimized.
This comment has been minimized.
There’s no tracking issue linked in the stable docs, which is why I was confused. |
This comment has been minimized.
This comment has been minimized.
|
I initially forgot to add a tracking issue before the cut, so, they're probably on the beta docs but not stable. I thought that I had gotten it in before the changes were merged but I guess not. |
This comment has been minimized.
This comment has been minimized.
|
Is there a way we could get this on track for stabilisation? This is necessary to make some (I am not sure how to tag the libs team in general) |
This comment has been minimized.
This comment has been minimized.
|
Sure yeah, let's see what others think: @rfcbot fcp merge |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
May 11, 2017
•
|
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
This comment has been minimized.
This comment has been minimized.
|
So far I have only looked at It looks like the implementation could be simpler: pub fn as_c_str(&self) -> &CStr {
self
}This is what Also I noticed there is What are the reasons that people use |
This comment has been minimized.
This comment has been minimized.
|
I personally use it a lot via map, e.g. There's no |
This comment has been minimized.
This comment has been minimized.
|
This was in the insta-stable part of #40009 but this impl has a stray lifetime that should be removed. EDIT: also this impl. The attribute on that impl says I'm sure this has been discussed but there is no way to do any of the Changing them to These are the very first |
This comment has been minimized.
This comment has been minimized.
|
@dtolnay First, thank you for looking into this so much! So, sort-of in order:
|
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
May 31, 2017
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jun 6, 2017
|
|
rfcbot
added
the
final-comment-period
label
Jun 6, 2017
clarfon
referenced this issue
Jun 16, 2017
Closed
Tracking issue for `From<&[T]> for Rc` & co #40475
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jun 16, 2017
|
The final comment period is now complete. |

clarfon commentedMar 9, 2017
•
edited
This includes the methods:
CString::into_boxed_c_strOsString::into_boxed_os_strPathBuf::into_boxed_path<Box<CStr>>::into_c_string<Box<OsStr>>::into_os_string<Box<Path>>::into_path_bufCString::as_c_strThe
into_boxed_*methods coming from #39594, the otherinto_*methods from #40009, and theas_c_strmethod from #41095.The features for the methods are
into_boxed_c_str,into_boxed_os_str,into_boxed_path, andas_c_str.