diff options
| author | bors <bors@rust-lang.org> | 2021-03-05 09:28:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-05 09:28:07 +0000 |
| commit | 8ccc89bc312caa65ca46b55b47492abdd5b6910a (patch) | |
| tree | 21aae974b62d722b3d7f25fc325231a4fe863792 /src/test/rustdoc-ui/lint-missing-doc-code-example.rs | |
| parent | a0d66b54fb3acc2125972b88ff543a2c04d14af5 (diff) | |
| parent | f74231fd27b6eced577d6e53e955b50754006ae9 (diff) | |
| download | rust-8ccc89bc312caa65ca46b55b47492abdd5b6910a.tar.gz rust-8ccc89bc312caa65ca46b55b47492abdd5b6910a.zip | |
Auto merge of #82777 - GuillaumeGomez:rollup-etcsupl, r=GuillaumeGomez
Rollup of 5 pull requests Successful merges: - #76716 (Don't warn for `missing_doc_examples` when item is #[doc(hidden)]) - #82088 (Shorten html::render) - #82690 (Update rustdoc documentation) - #82752 (Add a regression test for issue-81712) - #82765 (Fix polymorphization ICE on associated types in trait decls using const generics in bounds) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc-ui/lint-missing-doc-code-example.rs')
| -rw-r--r-- | src/test/rustdoc-ui/lint-missing-doc-code-example.rs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/test/rustdoc-ui/lint-missing-doc-code-example.rs b/src/test/rustdoc-ui/lint-missing-doc-code-example.rs index 8d727b0d0b5..41e88477926 100644 --- a/src/test/rustdoc-ui/lint-missing-doc-code-example.rs +++ b/src/test/rustdoc-ui/lint-missing-doc-code-example.rs @@ -12,16 +12,16 @@ /// ``` /// println!("hello"); /// ``` -fn test() { +pub fn test() { } #[allow(missing_docs)] -mod module1 { //~ ERROR +pub mod module1 { //~ ERROR } #[allow(rustdoc::missing_doc_code_examples)] /// doc -mod module2 { +pub mod module2 { /// doc pub fn test() {} @@ -63,9 +63,22 @@ pub enum Enum { /// Doc //~^ ERROR #[repr(C)] -union Union { +pub union Union { /// Doc, but no code example and it's fine! a: i32, /// Doc, but no code example and it's fine! b: f32, } + + +#[doc(hidden)] +pub mod foo { + pub fn bar() {} +} + +fn babar() {} + + +mod fofoo { + pub fn tadam() {} +} |
