diff options
| author | bors <bors@rust-lang.org> | 2020-12-29 00:16:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-29 00:16:54 +0000 |
| commit | d75f48e04d7923b44ec45fec5203a0ca749deb32 (patch) | |
| tree | beed754390860bc1b49cbcd0cf50140cf9704c0d /library/std/src | |
| parent | 2987785df3d46d5ff144a5c67fbb8f5cca798d78 (diff) | |
| parent | e3d26e007c9499f4c6a1f19cefba5006bb10f975 (diff) | |
| download | rust-d75f48e04d7923b44ec45fec5203a0ca749deb32.tar.gz rust-d75f48e04d7923b44ec45fec5203a0ca749deb32.zip | |
Auto merge of #80449 - m-ou-se:rollup-kp2e5n8, r=m-ou-se
Rollup of 11 pull requests Successful merges: - #80383 (clarify wrapping ptr arithmetic docs) - #80390 (BTreeMap: rename the area access methods) - #80393 (Add links to the source for the rustc and rustdoc books.) - #80398 (Use raw version of align_of in rc data_offset) - #80402 (Document `InferTy` & co.) - #80403 (fix: small typo error in chalk/mod.rs) - #80410 (rustdoc book: fix example) - #80419 (Add regression test for #80375) - #80430 (Add "length" as doc alias to len methods) - #80431 (Add "chr" as doc alias to char::from_u32) - #80448 (Fix stabilization version of deque_range feature.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/collections/hash/map.rs | 1 | ||||
| -rw-r--r-- | library/std/src/collections/hash/set.rs | 1 | ||||
| -rw-r--r-- | library/std/src/ffi/os_str.rs | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index 4f24a8bb75a..0680b1fc329 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -448,6 +448,7 @@ impl<K, V, S> HashMap<K, V, S> { /// a.insert(1, "a"); /// assert_eq!(a.len(), 1); /// ``` + #[doc(alias = "length")] #[stable(feature = "rust1", since = "1.0.0")] pub fn len(&self) -> usize { self.base.len() diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index 27093c1a077..f49e5801c35 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -199,6 +199,7 @@ impl<T, S> HashSet<T, S> { /// v.insert(1); /// assert_eq!(v.len(), 1); /// ``` + #[doc(alias = "length")] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn len(&self) -> usize { diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs index 5d93016cadb..2eef4d58507 100644 --- a/library/std/src/ffi/os_str.rs +++ b/library/std/src/ffi/os_str.rs @@ -653,6 +653,7 @@ impl OsStr { /// let os_str = OsStr::new("foo"); /// assert_eq!(os_str.len(), 3); /// ``` + #[doc(alias = "length")] #[stable(feature = "osstring_simple_functions", since = "1.9.0")] pub fn len(&self) -> usize { self.inner.inner.len() |
