diff options
Diffstat (limited to 'src/tools/clippy/src/docs/redundant_allocation.txt')
-rw-r--r-- | src/tools/clippy/src/docs/redundant_allocation.txt | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/tools/clippy/src/docs/redundant_allocation.txt b/src/tools/clippy/src/docs/redundant_allocation.txt deleted file mode 100644 index 86bf51e8d..000000000 --- a/src/tools/clippy/src/docs/redundant_allocation.txt +++ /dev/null @@ -1,17 +0,0 @@ -### What it does -Checks for use of redundant allocations anywhere in the code. - -### Why is this bad? -Expressions such as `Rc<&T>`, `Rc<Rc<T>>`, `Rc<Arc<T>>`, `Rc<Box<T>>`, `Arc<&T>`, `Arc<Rc<T>>`, -`Arc<Arc<T>>`, `Arc<Box<T>>`, `Box<&T>`, `Box<Rc<T>>`, `Box<Arc<T>>`, `Box<Box<T>>`, add an unnecessary level of indirection. - -### Example -``` -fn foo(bar: Rc<&usize>) {} -``` - -Better: - -``` -fn foo(bar: &usize) {} -```
\ No newline at end of file |