// This definition works for current file.
// Everywhere.
#![allow(dead_code)]

// Doc tests. Looks fine.
use std::ops::Range;
/// Return true if two ranges overlap.
///
///     assert_eq!(ranges::overlap(0..7, 3..10), true);
///     assert_eq!(ranges::overlap(1..5, 101..105), false);
///
/// If either range is empty, they don't count as overlapping.
///
/// assert_eq!(ranges::overlap(0..0, 0..10), false); ///
pub fn overlap(r1: Range<usize>, r2: Range<usize>) -> bool {
    r1.start < r1.end && r2.start < r2.end &&
        r1.start < r2.end && r2.start < r1.end
}

// This definition works for current file.
// Everywhere.
#![allow(dead_code)]

--- 
+++ 
@@ -1,3 +1,18 @@
 // This definition works for current file.
 // Everywhere.
 #![allow(dead_code)]
+
+// Doc tests. Looks fine.
+use std::ops::Range;
+/// Return true if two ranges overlap.
+///
+///     assert_eq!(ranges::overlap(0..7, 3..10), true);
+///     assert_eq!(ranges::overlap(1..5, 101..105), false);
+///
+/// If either range is empty, they don't count as overlapping.
+///
+/// assert_eq!(ranges::overlap(0..0, 0..10), false); ///
+pub fn overlap(r1: Range<usize>, r2: Range<usize>) -> bool {
+    r1.start < r1.end && r2.start < r2.end &&
+        r1.start < r2.end && r2.start < r1.end
+}
Add doctest, just for example sake, it does not work
