Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc doc for deprecated doesn't contain hint about what use instead #48271

Closed
Dushistov opened this issue Feb 16, 2018 · 1 comment · Fixed by #58166
Closed

rustdoc doc for deprecated doesn't contain hint about what use instead #48271

Dushistov opened this issue Feb 16, 2018 · 1 comment · Fixed by #58166
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Dushistov
Copy link
Contributor

Look for example to bindgen hide_type method

It is deprecated, and in source code there is hint what should be used instead:

/// Hide the given type from the generated bindings. Regular expressions are
    /// supported.
    #[deprecated = "Use blacklist_type instead"]
    pub fn hide_type<T: AsRef<str>>(self, arg: T) -> Builder {
        self.blacklist_type(arg)
    }

but in generated html documentation there is no hint about Use blacklist_type instead

@Dushistov Dushistov changed the title rustdoc for deprecated show what use instead rustdoc doc for deprecated doesn't contain hint about what use instead Feb 16, 2018
@pietroalbini pietroalbini added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools-rustdoc labels Feb 16, 2018
@ollie27
Copy link
Member

ollie27 commented Feb 16, 2018

#[deprecated = "Use blacklist_type instead"] isn't the correct syntax for the #[deprecated] attribute. It should be #[deprecated(note = "Use blacklist_type instead")]. You can see it work: unstable_rust src.

This isn't a rustdoc issue. It's an issue with rustc that it doesn't reject #[deprecated = "Use blacklist_type instead"].

Centril added a commit to Centril/rust that referenced this issue Feb 13, 2019
…rochenkov

allow shorthand syntax for deprecation reason

Fixes rust-lang#48271.

Created based on discussion in rust-lang#56896.
Centril added a commit to Centril/rust that referenced this issue Feb 13, 2019
…rochenkov

allow shorthand syntax for deprecation reason

Fixes rust-lang#48271.

Created based on discussion in rust-lang#56896.
Centril added a commit to Centril/rust that referenced this issue Feb 13, 2019
…rochenkov

allow shorthand syntax for deprecation reason

Fixes rust-lang#48271.

Created based on discussion in rust-lang#56896.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants