Rollup merge of #86852 - Amanieu:remove_doc_aliases, r=joshtriplett
Remove some doc aliases As per the new doc alias policy in https://github.com/rust-lang/std-dev-guide/pull/25, this removes some controversial doc aliases: - `malloc`, `alloc`, `realloc`, etc. - `length` (alias for `len`) - `delete` (alias for `remove` in collections and also file/directory deletion) r? `@joshtriplett`
This commit is contained in:
@@ -454,7 +454,6 @@ 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()
|
||||
@@ -893,7 +892,6 @@ 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>
|
||||
|
||||
@@ -202,7 +202,6 @@ 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 {
|
||||
@@ -875,7 +874,6 @@ 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
|
||||
|
||||
@@ -694,7 +694,6 @@ 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")]
|
||||
#[inline]
|
||||
pub fn len(&self) -> usize {
|
||||
|
||||
@@ -1551,7 +1551,6 @@ 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())
|
||||
@@ -1986,7 +1985,6 @@ 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())
|
||||
@@ -2024,7 +2022,6 @@ 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())
|
||||
|
||||
Reference in New Issue
Block a user