about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-07-24 19:42:21 +0200
committerRalf Jung <post@ralfj.de>2023-07-25 14:30:58 +0200
commit4ea2bd1c8f6fc5aba40af7b0421f2eea201ba147 (patch)
treee240b502496cc377834248de236c087f287a4212 /src
parent14a674c88cde2465905d1657919242c1a3bd9d10 (diff)
downloadrust-4ea2bd1c8f6fc5aba40af7b0421f2eea201ba147.tar.gz
rust-4ea2bd1c8f6fc5aba40af7b0421f2eea201ba147.zip
bless more
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/tests/ui/self_assignment.rs2
-rw-r--r--src/tools/clippy/tests/ui/self_assignment.stderr6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/clippy/tests/ui/self_assignment.rs b/src/tools/clippy/tests/ui/self_assignment.rs
index d6682cc63dc..a7f9fbaae7c 100644
--- a/src/tools/clippy/tests/ui/self_assignment.rs
+++ b/src/tools/clippy/tests/ui/self_assignment.rs
@@ -14,7 +14,7 @@ pub fn positives(mut a: usize, b: &mut u32, mut s: S) {
     *b = *b;
     s = s;
     s.a = s.a;
-    s.b[10] = s.b[5 + 5];
+    s.b[9] = s.b[5 + 4];
     s.c[0][1] = s.c[0][1];
     s.b[a] = s.b[a];
     *s.e = *s.e;
diff --git a/src/tools/clippy/tests/ui/self_assignment.stderr b/src/tools/clippy/tests/ui/self_assignment.stderr
index bed88244eea..25b8569fa3d 100644
--- a/src/tools/clippy/tests/ui/self_assignment.stderr
+++ b/src/tools/clippy/tests/ui/self_assignment.stderr
@@ -24,11 +24,11 @@ error: self-assignment of `s.a` to `s.a`
 LL |     s.a = s.a;
    |     ^^^^^^^^^
 
-error: self-assignment of `s.b[5 + 5]` to `s.b[10]`
+error: self-assignment of `s.b[5 + 4]` to `s.b[9]`
   --> $DIR/self_assignment.rs:17:5
    |
-LL |     s.b[10] = s.b[5 + 5];
-   |     ^^^^^^^^^^^^^^^^^^^^
+LL |     s.b[9] = s.b[5 + 4];
+   |     ^^^^^^^^^^^^^^^^^^^
 
 error: self-assignment of `s.c[0][1]` to `s.c[0][1]`
   --> $DIR/self_assignment.rs:18:5