@@ -236,8 +236,10 @@ impl<A: Allocator> String<A> {
236
236
/// Basic usage:
237
237
///
238
238
/// ```
239
+ /// #![feature(string_allocator_api)]
239
240
/// #![feature(allocator_api)]
240
241
///
242
+ /// use std::string::string::String;
241
243
/// use std::alloc::System;
242
244
///
243
245
/// let s = String::new_in(System);
@@ -270,8 +272,10 @@ impl<A: Allocator> String<A> {
270
272
/// Basic usage:
271
273
///
272
274
/// ```
275
+ /// #![feature(string_allocator_api)]
273
276
/// #![feature(allocator_api)]
274
277
///
278
+ /// use std::string::string::String;
275
279
/// use std::alloc::System;
276
280
///
277
281
/// let mut s = String::with_capacity_in(10, System);
@@ -397,7 +401,9 @@ impl<A: Allocator> String<A> {
397
401
///
398
402
/// ```
399
403
/// #![feature(vec_into_raw_parts)]
404
+ /// #![feature(string_allocator_api)]
400
405
/// #![feature(allocator_api)]
406
+ /// use std::string::string::String;
401
407
/// use std::alloc::System;
402
408
/// let mut s = String::new_in(System);
403
409
/// s.push_str("hello");
@@ -443,8 +449,10 @@ impl<A: Allocator> String<A> {
443
449
/// Basic usage:
444
450
///
445
451
/// ```
452
+ /// #![feature(string_allocator_api)]
446
453
/// #![feature(allocator_api)]
447
454
///
455
+ /// use std::string::string::String;
448
456
/// use std::mem;
449
457
/// use std::alloc::System;
450
458
///
0 commit comments