]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/missing-doc-impl.rs
Auto merge of #8374 - Alexendoo:bless-revisions, r=camsteffen
[rust.git] / tests / ui / missing-doc-impl.rs
index 1317521f7366fb444a685180b45e669703605b56..d5724bf661c634ec89f3d83ac580a5c75facd6c6 100644 (file)
@@ -46,7 +46,7 @@ fn dummy(&self) {}
 }
 
 /// dox
-pub trait E {
+pub trait E: Sized {
     type AssociatedType;
     type AssociatedTypeDef = Self;
 
@@ -59,7 +59,9 @@ fn dummy(&self) {}
 }
 
 impl Foo {
-    pub fn foo() {}
+    pub fn new() -> Self {
+        Foo { a: 0, b: 0 }
+    }
     fn bar() {}
 }
 
@@ -67,7 +69,10 @@ impl PubFoo {
     pub fn foo() {}
     /// dox
     pub fn foo1() {}
-    fn foo2() {}
+    #[must_use = "yep"]
+    fn foo2() -> u32 {
+        1
+    }
     #[allow(clippy::missing_docs_in_private_items)]
     pub fn foo3() {}
 }