Skip to content

Commit 9191a78

Browse files
committed
Revert "Fix missing_docs lint for const and static."
This reverts commit 00130cf. As mentioned in a regression report[1], this caused a notable amount of breakage. Because there's a plan to mitigate[2] this type of breakage, I'm reverting this until then. [1]: https://internals.rust-lang.org/t/new-crater-reports-1-1-stable-vs-beta-2015-07-10-and-nightly-2015-07-10/2358 [2]: rust-lang/rfcs#1193
1 parent 39d4faf commit 9191a78

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/librustc_lint/builtin.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1610,8 +1610,6 @@ impl LintPass for MissingDoc {
16101610
}
16111611
return
16121612
},
1613-
ast::ItemConst(..) => "a constant",
1614-
ast::ItemStatic(..) => "a static",
16151613
_ => return
16161614
};
16171615

src/test/compile-fail/lint-missing-doc.rs

-21
Original file line numberDiff line numberDiff line change
@@ -149,27 +149,6 @@ pub enum PubBaz3 {
149149
#[doc(hidden)]
150150
pub fn baz() {}
151151

152-
153-
const FOO: u32 = 0;
154-
/// dox
155-
pub const FOO1: u32 = 0;
156-
#[allow(missing_docs)]
157-
pub const FOO2: u32 = 0;
158-
#[doc(hidden)]
159-
pub const FOO3: u32 = 0;
160-
pub const FOO4: u32 = 0; //~ ERROR: missing documentation for a const
161-
162-
163-
static BAR: u32 = 0;
164-
/// dox
165-
pub static BAR1: u32 = 0;
166-
#[allow(missing_docs)]
167-
pub static BAR2: u32 = 0;
168-
#[doc(hidden)]
169-
pub static BAR3: u32 = 0;
170-
pub static BAR4: u32 = 0; //~ ERROR: missing documentation for a static
171-
172-
173152
mod internal_impl {
174153
/// dox
175154
pub fn documented() {}

0 commit comments

Comments
 (0)