Skip to content

Commit

Permalink
Fix doctests.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachs18 committed Jan 19, 2024
1 parent 098a7ed commit 6b3f64c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions library/alloc/src/string/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,10 @@ impl<A: Allocator> String<A> {
/// Basic usage:
///
/// ```
/// #![feature(string_allocator_api)]
/// #![feature(allocator_api)]
///
/// use std::string::string::String;
/// use std::alloc::System;
///
/// let s = String::new_in(System);
Expand Down Expand Up @@ -541,8 +543,10 @@ impl<A: Allocator> String<A> {
/// Basic usage:
///
/// ```
/// #![feature(string_allocator_api)]
/// #![feature(allocator_api)]
///
/// use std::string::string::String;
/// use std::alloc::System;
///
/// let mut s = String::with_capacity_in(10, System);
Expand Down Expand Up @@ -653,7 +657,9 @@ impl<A: Allocator> String<A> {
///
/// ```
/// #![feature(vec_into_raw_parts)]
/// #![feature(string_allocator_api)]
/// #![feature(allocator_api)]
/// use std::string::string::String;
/// use std::alloc::System;
/// let mut s = String::new_in(System);
/// s.push_str("hello");
Expand Down Expand Up @@ -699,8 +705,10 @@ impl<A: Allocator> String<A> {
/// Basic usage:
///
/// ```
/// #![feature(string_allocator_api)]
/// #![feature(allocator_api)]
///
/// use std::string::string::String;
/// use std::mem;
/// use std::alloc::System;
///
Expand Down

0 comments on commit 6b3f64c

Please sign in to comment.