Skip to content

Commit

Permalink
the crate and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed Mar 22, 2020
1 parent cdb2c3c commit d40dff9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc {
}

fn check_crate(&mut self, cx: &LateContext<'_, '_>, krate: &hir::Crate<'_>) {
self.check_missing_docs_attrs(cx, None, &krate.item.attrs, krate.item.span, "a", "crate");
self.check_missing_docs_attrs(cx, None, &krate.item.attrs, krate.item.span, "the", "crate");

for macro_def in krate.exported_macros {
let has_doc = macro_def.attrs.iter().any(|a| has_doc(a));
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-10656.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#![deny(missing_docs)]
#![crate_type="lib"]
//~^^ ERROR missing documentation for crate
//~^^ ERROR missing documentation for the crate
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-10656.stderr
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/lints-in-foreign-macros.rs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/lint/lints-in-foreign-macros.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit d40dff9

Please sign in to comment.