convert a couple more errors

This commit is contained in:
mark 2020-03-21 19:47:23 -05:00
parent 2daaf2b252
commit 1661a0a99b
5 changed files with 14 additions and 21 deletions

View file

@ -50,8 +50,8 @@ trait B {
}
pub trait C { //~ ERROR: missing documentation for a trait
fn foo(&self); //~ ERROR: missing documentation for a trait method
fn foo_with_impl(&self) {} //~ ERROR: missing documentation for a trait method
fn foo(&self); //~ ERROR: missing documentation for an associated function
fn foo_with_impl(&self) {} //~ ERROR: missing documentation for an associated function
}
#[allow(missing_docs)]
@ -78,7 +78,7 @@ impl Foo {
}
impl PubFoo {
pub fn foo() {} //~ ERROR: missing documentation for a method
pub fn foo() {} //~ ERROR: missing documentation for an associated function
/// dox
pub fn foo1() {}
fn foo2() {}

View file

@ -40,13 +40,13 @@ error: missing documentation for a trait
LL | pub trait C {
| ^^^^^^^^^^^
error: missing documentation for a trait method
error: missing documentation for an associated function
--> $DIR/lint-missing-doc.rs:53:5
|
LL | fn foo(&self);
| ^^^^^^^^^^^^^^
error: missing documentation for a trait method
error: missing documentation for an associated function
--> $DIR/lint-missing-doc.rs:54:5
|
LL | fn foo_with_impl(&self) {}
@ -64,7 +64,7 @@ error: missing documentation for an associated type
LL | type AssociatedTypeDef = Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a method
error: missing documentation for an associated function
--> $DIR/lint-missing-doc.rs:81:5
|
LL | pub fn foo() {}

View file

@ -10,7 +10,7 @@ pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loo
#[deny(missing_docs)]
fn container() {
impl dyn PubPrincipal {
pub fn check_doc_lint() {} //~ ERROR missing documentation for a method
pub fn check_doc_lint() {} //~ ERROR missing documentation for an associated function
}
impl dyn PubPrincipal + PrivNonPrincipal {
pub fn check_doc_lint() {} // OK, no missing doc lint

View file

@ -8,7 +8,7 @@ LL | pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal>
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
error: missing documentation for a method
error: missing documentation for an associated function
--> $DIR/private-in-public-non-principal.rs:13:9
|
LL | pub fn check_doc_lint() {}