From 9e779986aa2aaa6d28b48020f9da8f37b95959ee Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Mon, 28 Dec 2020 09:13:46 +0100 Subject: Add "length" as doc alias to len methods --- library/alloc/src/string.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'library/alloc/src/string.rs') diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 27b32b69502..91988928593 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -1388,6 +1388,7 @@ impl String { /// assert_eq!(fancy_f.len(), 4); /// assert_eq!(fancy_f.chars().count(), 3); /// ``` + #[doc(alias = "length")] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn len(&self) -> usize { -- cgit 1.4.1-3-g733a5