diff options
| author | Urgau <urgau@numericable.fr> | 2024-09-06 12:20:36 +0200 | 
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2024-09-06 12:20:36 +0200 | 
| commit | 7dd1be1d0d2911b16aa1347efa47e7c43c507ade (patch) | |
| tree | fa2b745a24e69246a6e80c96b439064ca3f16387 /tests/ui/lint/lint-missing-doc-expect.rs | |
| parent | eb33b43bab08223fa6b46abacc1e95e859fe375d (diff) | |
| download | rust-7dd1be1d0d2911b16aa1347efa47e7c43c507ade.tar.gz rust-7dd1be1d0d2911b16aa1347efa47e7c43c507ade.zip | |
Also emit `missing_docs` lint with `--test` to fulfill expectations
Diffstat (limited to 'tests/ui/lint/lint-missing-doc-expect.rs')
| -rw-r--r-- | tests/ui/lint/lint-missing-doc-expect.rs | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/tests/ui/lint/lint-missing-doc-expect.rs b/tests/ui/lint/lint-missing-doc-expect.rs new file mode 100644 index 00000000000..991f65003dc --- /dev/null +++ b/tests/ui/lint/lint-missing-doc-expect.rs @@ -0,0 +1,13 @@ +// Make sure that `#[expect(missing_docs)]` is always correctly fulfilled. + +//@ check-pass +//@ revisions: lib bin test +//@ [lib]compile-flags: --crate-type lib +//@ [bin]compile-flags: --crate-type bin +//@ [test]compile-flags: --test + +#[expect(missing_docs)] +pub fn foo() {} + +#[cfg(bin)] +fn main() {} | 
