File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -426,12 +426,6 @@ impl MissingDoc {
426
426
article : & ' static str ,
427
427
desc : & ' static str ,
428
428
) {
429
- // If we're building a test harness, then warning about
430
- // documentation is probably not really relevant right now.
431
- if cx. sess ( ) . opts . test {
432
- return ;
433
- }
434
-
435
429
// Only check publicly-visible items, using the result from the privacy pass.
436
430
// It's an option so the crate root can also use this function (it doesn't
437
431
// have a `NodeId`).
Original file line number Diff line number Diff line change
1
+ // Make sure that `#[expect(missing_docs)]` is always correctly fulfilled.
2
+
3
+ //@ check-pass
4
+ //@ revisions: lib bin test
5
+ //@ [lib]compile-flags: --crate-type lib
6
+ //@ [bin]compile-flags: --crate-type bin
7
+ //@ [test]compile-flags: --test
8
+
9
+ #[ expect( missing_docs) ]
10
+ pub fn foo ( ) { }
11
+
12
+ #[ cfg( bin) ]
13
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments