]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/missing_panics_doc.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / missing_panics_doc.rs
index 3fe35c75799bf36eb29f710615d67f5725a06dd6..7dc44529206d551a423dbfea3762038b3b610074 100644 (file)
@@ -1,6 +1,5 @@
 #![warn(clippy::missing_panics_doc)]
 #![allow(clippy::option_map_unit_fn)]
-
 fn main() {}
 
 /// This needs to be documented
@@ -33,6 +32,18 @@ pub fn unreachable_and_panic() {
     if true { unreachable!() } else { panic!() }
 }
 
+/// This needs to be documented
+pub fn assert_eq() {
+    let x = 0;
+    assert_eq!(x, 0);
+}
+
+/// This needs to be documented
+pub fn assert_ne() {
+    let x = 0;
+    assert_ne!(x, 0);
+}
+
 /// This is documented
 ///
 /// # Panics
@@ -83,6 +94,26 @@ pub fn unreachable_amd_panic_documented() {
     if true { unreachable!() } else { panic!() }
 }
 
+/// This is documented
+///
+/// # Panics
+///
+/// Panics if `x` is not 0.
+pub fn assert_eq_documented() {
+    let x = 0;
+    assert_eq!(x, 0);
+}
+
+/// This is documented
+///
+/// # Panics
+///
+/// Panics if `x` is 0.
+pub fn assert_ne_documented() {
+    let x = 0;
+    assert_ne!(x, 0);
+}
+
 /// This is okay because it is private
 fn unwrap_private() {
     let result = Err("Hi");