File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 146
146
#![ feature( slice_ptr_len) ]
147
147
#![ feature( slice_range) ]
148
148
#![ feature( str_internals) ]
149
- #![ feature( string_leak) ]
150
149
#![ feature( strict_provenance) ]
151
150
#![ feature( trusted_len) ]
152
151
#![ feature( trusted_random_access) ]
Original file line number Diff line number Diff line change @@ -1862,9 +1862,13 @@ impl String {
1862
1862
/// Simple usage:
1863
1863
///
1864
1864
/// ```
1865
- /// let x = String::from("bucket");
1866
- /// let static_ref: &'static mut str = x.leak();
1867
- /// assert_eq!(static_ref, "bucket");
1865
+ /// #![feature(string_leak)]
1866
+ ///
1867
+ /// pub fn main() {
1868
+ /// let x = String::from("bucket");
1869
+ /// let static_ref: &'static mut str = x.leak();
1870
+ /// assert_eq!(static_ref, "bucket");
1871
+ /// }
1868
1872
/// ```
1869
1873
#[ cfg( not( no_global_oom_handling) ) ]
1870
1874
#[ unstable( feature = "string_leak" , issue = "102929" ) ]
You can’t perform that action at this time.
0 commit comments