summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/ref_binding_to_reference.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:32 +0000
commit4547b622d8d29df964fa2914213088b148c498fc (patch)
tree9fc6b25f3c3add6b745be9a2400a6e96140046e9 /src/tools/clippy/src/docs/ref_binding_to_reference.txt
parentReleasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz
rustc-4547b622d8d29df964fa2914213088b148c498fc.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/src/docs/ref_binding_to_reference.txt')
-rw-r--r--src/tools/clippy/src/docs/ref_binding_to_reference.txt21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/tools/clippy/src/docs/ref_binding_to_reference.txt b/src/tools/clippy/src/docs/ref_binding_to_reference.txt
deleted file mode 100644
index dc391cd98..000000000
--- a/src/tools/clippy/src/docs/ref_binding_to_reference.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-### What it does
-Checks for `ref` bindings which create a reference to a reference.
-
-### Why is this bad?
-The address-of operator at the use site is clearer about the need for a reference.
-
-### Example
-```
-let x = Some("");
-if let Some(ref x) = x {
- // use `x` here
-}
-```
-
-Use instead:
-```
-let x = Some("");
-if let Some(x) = x {
- // use `&x` here
-}
-``` \ No newline at end of file