File tree 2 files changed +4
-1
lines changed
compiler/rustc_expand/src/mbe
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ pub(super) fn parse(
72
72
// this with just `span.edition()`. A
73
73
// `SyntaxContext::root()` from the current crate will
74
74
// have the edition of the current crate, and a
75
- // `SyntaxxContext ::root()` from a foreign crate will
75
+ // `SyntaxContext ::root()` from a foreign crate will
76
76
// have the edition of that crate (which we manually
77
77
// retrieve via the `edition` parameter).
78
78
if span. ctxt ( ) == SyntaxContext :: root ( ) {
Original file line number Diff line number Diff line change @@ -915,6 +915,7 @@ impl From<CString> for Box<CStr> {
915
915
916
916
#[ stable( feature = "cow_from_cstr" , since = "1.28.0" ) ]
917
917
impl < ' a > From < CString > for Cow < ' a , CStr > {
918
+ /// Converts a [`CString`] into an owned [`Cow`] without copying or allocating.
918
919
#[ inline]
919
920
fn from ( s : CString ) -> Cow < ' a , CStr > {
920
921
Cow :: Owned ( s)
@@ -923,6 +924,7 @@ impl<'a> From<CString> for Cow<'a, CStr> {
923
924
924
925
#[ stable( feature = "cow_from_cstr" , since = "1.28.0" ) ]
925
926
impl < ' a > From < & ' a CStr > for Cow < ' a , CStr > {
927
+ /// Converts a [`CStr`] into a borrowed [`Cow`] without copying or allocating.
926
928
#[ inline]
927
929
fn from ( s : & ' a CStr ) -> Cow < ' a , CStr > {
928
930
Cow :: Borrowed ( s)
@@ -931,6 +933,7 @@ impl<'a> From<&'a CStr> for Cow<'a, CStr> {
931
933
932
934
#[ stable( feature = "cow_from_cstr" , since = "1.28.0" ) ]
933
935
impl < ' a > From < & ' a CString > for Cow < ' a , CStr > {
936
+ /// Converts a `&`[`CString`] into a borrowed [`Cow`] without copying or allocating.
934
937
#[ inline]
935
938
fn from ( s : & ' a CString ) -> Cow < ' a , CStr > {
936
939
Cow :: Borrowed ( s. as_c_str ( ) )
You can’t perform that action at this time.
0 commit comments