File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,10 @@ made workable in static expressions through a compiler plugin.
113
113
In cases when an FFI function returns a pointer to a non-owned C string,
114
114
it might be preferable to wrap the returned string safely as a 'thin'
115
115
` &CStr ` rather than scan it into a slice up front. To facilitate this,
116
- conversion from a raw pointer should be added (using the
117
- [ lifetime anchor] ( https://github.com/rust-lang/rfcs/pull/556 ) convention):
116
+ conversion from a raw pointer should be added:
118
117
``` rust
119
118
impl CStr {
120
- pub unsafe fn from_raw_ptr <'a , T : ? Sized >(ptr : * const libc :: c_char ,
121
- life_anchor : & 'a T )
122
- -> & 'a CStr
119
+ pub unsafe fn from_raw_ptr <'a >(ptr : * const libc :: c_char ) -> & 'a CStr
123
120
{ ... }
124
121
}
125
122
```
You can’t perform that action at this time.
0 commit comments