Rollup merge of #69740 - mark-i-m:describe-it-3, r=eddyb
Replace some desc logic in librustc_lint with article_and_desc r? @eddyb @Centril @matthewjasper Followup to https://github.com/rust-lang/rust/pull/69674 Blocked on #69498
This commit is contained in:
commit
ee9094869c
10 changed files with 50 additions and 46 deletions
|
|
@ -1,3 +1,3 @@
|
|||
#![deny(missing_docs)]
|
||||
#![crate_type="lib"]
|
||||
//~^^ ERROR missing documentation for crate
|
||||
//~^^ ERROR missing documentation for the crate
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: missing documentation for crate
|
||||
error: missing documentation for the crate
|
||||
--> $DIR/issue-10656.rs:1:1
|
||||
|
|
||||
LL | / #![deny(missing_docs)]
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// aux-build:lints-in-foreign-macros.rs
|
||||
// check-pass
|
||||
|
||||
#![warn(unused_imports)] //~ missing documentation for crate [missing_docs]
|
||||
#![warn(unused_imports)] //~ missing documentation for the crate [missing_docs]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ warning: unused import: `std::string::ToString`
|
|||
LL | mod d { baz2!(use std::string::ToString;); }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: missing documentation for crate
|
||||
warning: missing documentation for the crate
|
||||
--> $DIR/lints-in-foreign-macros.rs:4:1
|
||||
|
|
||||
LL | / #![warn(unused_imports)]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue