From c9fbcc1f39f2c37a6d0a40ca8c2462d934a9fc60 Mon Sep 17 00:00:00 2001 From: Aaron Stillwell Date: Mon, 18 Feb 2019 17:42:07 +0000 Subject: [PATCH] Fixed doc example for Path::with_capacity --- src/libstd/path.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 735714aca104c..dcaa65a8fa78e 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1151,9 +1151,10 @@ impl PathBuf { /// # Examples /// /// ``` + /// #![feature(path_buf_capacity)] /// use std::path::PathBuf; /// - /// let path = PathBuf::with_capacity(10); + /// let mut path = PathBuf::with_capacity(10); /// let capacity = path.capacity(); /// /// // This push is done without reallocating