about summary refs log tree commit diff
path: root/src/test/compile-fail/lint-missing-doc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/lint-missing-doc.rs')
-rw-r--r--src/test/compile-fail/lint-missing-doc.rs20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/test/compile-fail/lint-missing-doc.rs b/src/test/compile-fail/lint-missing-doc.rs
index 3b96fd64fa2..73a58741bbb 100644
--- a/src/test/compile-fail/lint-missing-doc.rs
+++ b/src/test/compile-fail/lint-missing-doc.rs
@@ -47,20 +47,26 @@ fn foo3() {}
 /// dox
 pub trait A {
     /// dox
-    fn foo();
+    fn foo(&self);
     /// dox
-    fn foo_with_impl() {}
+    fn foo_with_impl(&self) {}
 }
+
 #[allow(missing_docs)]
 trait B {
-    fn foo();
-    fn foo_with_impl() {}
+    fn foo(&self);
+    fn foo_with_impl(&self) {}
 }
+
 pub trait C { //~ ERROR: missing documentation
-    fn foo(); //~ ERROR: missing documentation
-    fn foo_with_impl() {} //~ ERROR: missing documentation
+    fn foo(&self); //~ ERROR: missing documentation
+    fn foo_with_impl(&self) {} //~ ERROR: missing documentation
+}
+
+#[allow(missing_docs)]
+pub trait D {
+    fn dummy(&self) { }
 }
-#[allow(missing_docs)] pub trait D {}
 
 impl Foo {
     pub fn foo() {}