summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/suspicious_doc_comments.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/suspicious_doc_comments.fixed')
-rw-r--r--src/tools/clippy/tests/ui/suspicious_doc_comments.fixed81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/suspicious_doc_comments.fixed b/src/tools/clippy/tests/ui/suspicious_doc_comments.fixed
new file mode 100644
index 000000000..b404df94d
--- /dev/null
+++ b/src/tools/clippy/tests/ui/suspicious_doc_comments.fixed
@@ -0,0 +1,81 @@
+// run-rustfix
+#![allow(unused)]
+#![warn(clippy::suspicious_doc_comments)]
+
+//! Real module documentation.
+//! Fake module documentation.
+fn baz() {}
+
+pub mod singleline_outer_doc {
+ //! This module contains useful functions.
+
+ pub fn bar() {}
+}
+
+pub mod singleline_inner_doc {
+ //! This module contains useful functions.
+
+ pub fn bar() {}
+}
+
+pub mod multiline_outer_doc {
+ /*! This module contains useful functions.
+ */
+
+ pub fn bar() {}
+}
+
+pub mod multiline_inner_doc {
+ /*! This module contains useful functions.
+ */
+
+ pub fn bar() {}
+}
+
+pub mod multiline_outer_doc2 {
+ //! This module
+ //! contains
+ //! useful functions.
+
+ pub fn bar() {}
+}
+
+pub mod multiline_outer_doc3 {
+ //! a
+ //! b
+
+ /// c
+ pub fn bar() {}
+}
+
+pub mod multiline_outer_doc4 {
+ //! a
+ /// b
+ pub fn bar() {}
+}
+
+pub mod multiline_outer_doc_gap {
+ //! a
+
+ //! b
+ pub fn bar() {}
+}
+
+pub mod multiline_outer_doc_commented {
+ /////! This outer doc comment was commented out.
+ pub fn bar() {}
+}
+
+pub mod outer_doc_macro {
+ //! Very cool macro
+ macro_rules! x {
+ () => {};
+ }
+}
+
+pub mod useless_outer_doc {
+ //! Huh.
+ use std::mem;
+}
+
+fn main() {}