diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-08-06 11:21:36 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-06 11:21:36 +0900 |
| commit | b98c388352f711f160af94a446c4d4bb3ade7aad (patch) | |
| tree | 98bde5c4e8b232d79ee8587fb7c1fb724408c5a8 /library/std/src | |
| parent | 8bad35095b3dcd424fd2d1802f77f3923c8a5487 (diff) | |
| parent | 1db8737f658325994026ae103e6952db9bc36780 (diff) | |
| download | rust-b98c388352f711f160af94a446c4d4bb3ade7aad.tar.gz rust-b98c388352f711f160af94a446c4d4bb3ade7aad.zip | |
Rollup merge of #87780 - est31:intra_doc_links, r=jyn514
alloc: Use intra doc links for the reserve function The sentence exists to highlight the existence of a performance footgun of repeated calls of the reserve_exact function.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/ffi/os_str.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 2a85f375ae2..84735345ac3 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -271,7 +271,9 @@ impl OsString { /// /// Note that the allocator may give the collection more space than it /// requests. Therefore, capacity can not be relied upon to be precisely - /// minimal. Prefer reserve if future insertions are expected. + /// minimal. Prefer [`reserve`] if future insertions are expected. + /// + /// [`reserve`]: OsString::reserve /// /// # Examples /// |
