Commit Graph

10 Commits

Author SHA1 Message Date
Olivier Goffart cc34d64c51 Use `doc(hidden)` instead of `allow(missing_docs)` in the test harness
So that it doesn't fail with `forbid(missing_docs)`

Fixes #130218
2024-09-11 12:14:35 +02:00
Olivier Goffart 5d456dfaa1 Use `#[doc(hidden)]` instead of `#[allow(missing_docs)]` on the const generated for `#[test]` 2024-09-11 11:49:27 +02:00
Olivier Goffart 6eddbb704e Fix false positive with `missing_docs` and `#[test]`
Since #130025, the compiler don't ignore missing_docs when compiling the tests.
But there is now a false positive warning for every `#[test]`

For example, this code
```rust
//! Crate docs

fn just_a_test() {}
```

Would emit this warning when running `cargo test`

```
warning: missing documentation for a constant
 --> src/lib.rs:5:1
  |
4 | #[test]
  | ------- in this procedural macro expansion
5 | fn just_a_test() {}
  | ^^^^^^^^^^^^^^^^^^^
```
2024-09-11 11:33:10 +02:00
Urgau a1a8627dd7 Allow `missing_docs` lint on the generated test harness 2024-09-09 14:51:39 +02:00
许杰友 Jieyou Xu (Joe) cd25009469
Re-bless tests/pretty 2024-02-22 16:04:05 +00:00
Zalathar 6d7e80c5bc Add `#[coverage(off)]` to closures introduced by `#[test]`/`#[bench]` 2024-01-21 23:17:00 +11:00
Andy Caldwell 8e03371fc3
Rework no_coverage to coverage(off) 2023-09-08 12:46:06 +01:00
Zalathar 77af67ab64 Add `#[no_coverage]` to the test harness's `fn main` 2023-05-01 11:01:12 +10:00
Partha P. Das 3720753632
Implementing "<test_binary> --list --format json" #107307 #49359 2023-03-15 14:20:20 -04:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00