mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Fix rustdoc examples
This commit is contained in:
parent
1e3b24de43
commit
aa2381d9d0
1 changed files with 2 additions and 0 deletions
|
@ -168,6 +168,7 @@ enum Slice<'a> {
|
||||||
/// ## Example
|
/// ## Example
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
/// # let mut a = vec![0, 1];
|
||||||
/// let t = a[1];
|
/// let t = a[1];
|
||||||
/// a[1] = a[0];
|
/// a[1] = a[0];
|
||||||
/// a[0] = t;
|
/// a[0] = t;
|
||||||
|
@ -180,6 +181,7 @@ enum Slice<'a> {
|
||||||
/// ## Example
|
/// ## Example
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
/// # let mut a = [vec![1, 2], vec![3, 4]];
|
||||||
/// let t = a[0][1];
|
/// let t = a[0][1];
|
||||||
/// a[0][1] = a[1][0];
|
/// a[0][1] = a[1][0];
|
||||||
/// a[1][0] = t;
|
/// a[1][0] = t;
|
||||||
|
|
Loading…
Reference in a new issue