diff options
Diffstat (limited to 'src/docs/clone_double_ref.txt')
| -rw-r--r-- | src/docs/clone_double_ref.txt | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/docs/clone_double_ref.txt b/src/docs/clone_double_ref.txt deleted file mode 100644 index 2729635bd24..00000000000 --- a/src/docs/clone_double_ref.txt +++ /dev/null @@ -1,16 +0,0 @@ -### What it does -Checks for usage of `.clone()` on an `&&T`. - -### Why is this bad? -Cloning an `&&T` copies the inner `&T`, instead of -cloning the underlying `T`. - -### Example -``` -fn main() { - let x = vec![1]; - let y = &&x; - let z = y.clone(); - println!("{:p} {:p}", *y, z); // prints out the same pointer -} -``` \ No newline at end of file |
