From aa2381d9d0c83ce4a2c0a6de6ac472d3fef4c7a1 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 3 Dec 2019 16:29:05 +0100 Subject: [PATCH] Fix rustdoc examples --- clippy_lints/src/swap.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clippy_lints/src/swap.rs b/clippy_lints/src/swap.rs index 77288869c..b79242391 100644 --- a/clippy_lints/src/swap.rs +++ b/clippy_lints/src/swap.rs @@ -168,6 +168,7 @@ enum Slice<'a> { /// ## Example /// /// ```rust + /// # let mut a = vec![0, 1]; /// let t = a[1]; /// a[1] = a[0]; /// a[0] = t; @@ -180,6 +181,7 @@ enum Slice<'a> { /// ## Example /// /// ```rust + /// # let mut a = [vec![1, 2], vec![3, 4]]; /// let t = a[0][1]; /// a[0][1] = a[1][0]; /// a[1][0] = t;