Skip to content

Rustdoc improperly showing pub use ... as functions #23054

Closed

Description

@theemathas

The documentation of std::ptr displays copy_memory and copy_nonoverlapping_memory two times each, once labelled as deprecated, and once labelled as stable.

Both the links of copy_memory leads to a deprecated function. Hovering over the purple bar tells me that the function is renamed to copy, except that it doesn't seem to exist.

Activity

  1. steveklabnik commented on Mar 8, 2015

    @steveklabnik
    Contributor
    #[stable(feature = "rust1", since = "1.0.0")]
    pub use intrinsics::copy_memory as copy;
    
    #[unstable(feature = "core")]
    #[deprecated(since = "1.0.0", reason = "renamed to `copy`")]
    pub fn copy_memory<T>(dst: *mut T, src: *const T, count: usize);
    

    Basically, there's both of these lines. So rustdoc is showing that first one as copy_memory rather than copy.

  2. changed the title [-]Duplicate functions displayed in std::ptr by rustdoc[/-] [+]Rustdoc improperly showing `pub use ... as` functions[/+] on Mar 8, 2015
  3. tomjakubowski commented on Mar 27, 2015

    @tomjakubowski
    Contributor

    The originally reported issue in std::ptr docs has since been resolved (the deprecated functions were removed, and pub use doesn't involve a rename anymore). I'm not sure if the underlying issue was fixed, although docs for this crate:

    #![crate_type="lib"]
    
    pub use inner::blah as testing;
    
    mod inner {
        pub fn blah() {}
    }

    Correctly name the exported function testing.

  4. steveklabnik commented on Nov 15, 2016

    @steveklabnik
    Contributor

    Yes, it looks like this has somehow been fixed. If not, please let us know with an updated test case, thank you!

  5. added a commit that references this issue on Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdoc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions