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

Comments

Projects
None yet
4 participants
@Dushistov
Copy link
Contributor

Dushistov commented Feb 16, 2018

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

@ollie27

This comment has been minimized.

Copy link
Contributor

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"].

bors added a commit that referenced this issue Dec 17, 2018

Auto merge of #56896 - euclio:deprecated-note-suggestion, r=<try>
provide suggestion for incorrect deprecated syntax

Fixes #48271.

r? @estebank

bors added a commit that referenced this issue Feb 11, 2019

Auto merge of #58166 - euclio:deprecation-shorthand, r=petrochenkov
allow shorthand syntax for deprecation reason

Fixes #48271.

Created based on discussion in #56896.

bors added a commit that referenced this issue Feb 11, 2019

Auto merge of #58166 - euclio:deprecation-shorthand, r=petrochenkov
allow shorthand syntax for deprecation reason

Fixes #48271.

Created based on discussion in #56896.

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

Rollup merge of rust-lang#58166 - euclio:deprecation-shorthand, r=pet…
…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

Rollup merge of rust-lang#58166 - euclio:deprecation-shorthand, r=pet…
…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

Rollup merge of rust-lang#58166 - euclio:deprecation-shorthand, r=pet…
…rochenkov

allow shorthand syntax for deprecation reason

Fixes rust-lang#48271.

Created based on discussion in rust-lang#56896.

@bors bors closed this in #58166 Feb 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.