Skip to content

Methods of private traits require documentation according to the missing_doc lint #10069

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

Closed
huonw opened this issue Oct 25, 2013 · 0 comments
Closed
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@huonw
Copy link
Member

huonw commented Oct 25, 2013

This is incorrect, it shouldn't complain since the trait is private.

#[deny(missing_doc)];
trait PrivateTrait {
    fn method(&self);
}
$ rustc --lib private-trait.rs
private-trait.rs:3:4: 3:20 error: missing documentation for a method
private-trait.rs:3     fn method(&self);
                       ^~~~~~~~~~~~~~~~
private-trait.rs:1:7: 1:18 note: lint level defined here
private-trait.rs:1 #[deny(missing_doc)];
                          ^~~~~~~~~~~
error: aborting due to previous error
task '<unnamed>' failed at 'explicit failure', /home/huon/rust/src/libsyntax/diagnostic.rs:98
task '<unnamed>' failed at 'explicit failure', /home/huon/rust/src/librustc/rustc.rs:395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant