diff options
| -rw-r--r-- | library/alloc/src/collections/btree/map.rs | 1 | ||||
| -rw-r--r-- | library/alloc/src/collections/btree/set.rs | 1 | ||||
| -rw-r--r-- | library/core/src/mem/mod.rs | 1 | ||||
| -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/fs.rs | 3 |
6 files changed, 8 insertions, 0 deletions
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 79dc694e6be..5554a448b5c 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -823,6 +823,7 @@ impl<K: Ord, V> BTreeMap<K, V> { /// assert_eq!(map.remove(&1), Some("a")); /// assert_eq!(map.remove(&1), None); /// ``` + #[doc(alias = "delete")] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<V> where diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index c2a96dd8ef4..d39eb1fd4f9 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -770,6 +770,7 @@ impl<T: Ord> BTreeSet<T> { /// assert_eq!(set.remove(&2), true); /// assert_eq!(set.remove(&2), false); /// ``` + #[doc(alias = "delete")] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool where diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 64cf5286eb1..778e34e634f 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -889,6 +889,7 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T { /// ``` /// /// [`RefCell`]: crate::cell::RefCell +#[doc(alias = "delete")] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn drop<T>(_x: T) {} diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index 28a25572dd8..27f7191831d 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -859,6 +859,7 @@ where /// assert_eq!(map.remove(&1), Some("a")); /// assert_eq!(map.remove(&1), None); /// ``` + #[doc(alias = "delete")] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove<Q: ?Sized>(&mut self, k: &Q) -> Option<V> diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index b08510d6b01..912e975aa0a 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -874,6 +874,7 @@ where /// assert_eq!(set.remove(&2), true); /// assert_eq!(set.remove(&2), false); /// ``` + #[doc(alias = "delete")] #[inline] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove<Q: ?Sized>(&mut self, value: &Q) -> bool diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index e2d4f2e6a56..43119c36cfe 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -1524,6 +1524,7 @@ impl AsInner<fs_imp::DirEntry> for DirEntry { /// Ok(()) /// } /// ``` +#[doc(alias = "delete")] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> { fs_imp::unlink(path.as_ref()) @@ -1958,6 +1959,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> { /// Ok(()) /// } /// ``` +#[doc(alias = "delete")] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> { fs_imp::rmdir(path.as_ref()) @@ -1995,6 +1997,7 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> { /// Ok(()) /// } /// ``` +#[doc(alias = "delete")] #[stable(feature = "rust1", since = "1.0.0")] pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> { fs_imp::remove_dir_all(path.as_ref()) |
