summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/zero_offset.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/zero_offset.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/zero_offset.stderr')
-rw-r--r--src/tools/clippy/tests/ui/zero_offset.stderr52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/zero_offset.stderr b/src/tools/clippy/tests/ui/zero_offset.stderr
new file mode 100644
index 000000000..481a44657
--- /dev/null
+++ b/src/tools/clippy/tests/ui/zero_offset.stderr
@@ -0,0 +1,52 @@
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:5:9
+ |
+LL | m.offset(0);
+ | ^^^^^^^^^^^
+ |
+ = note: `#[deny(clippy::zst_offset)]` on by default
+
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:6:9
+ |
+LL | m.wrapping_add(0);
+ | ^^^^^^^^^^^^^^^^^
+
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:7:9
+ |
+LL | m.sub(0);
+ | ^^^^^^^^
+
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:8:9
+ |
+LL | m.wrapping_sub(0);
+ | ^^^^^^^^^^^^^^^^^
+
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:11:9
+ |
+LL | c.offset(0);
+ | ^^^^^^^^^^^
+
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:12:9
+ |
+LL | c.wrapping_add(0);
+ | ^^^^^^^^^^^^^^^^^
+
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:13:9
+ |
+LL | c.sub(0);
+ | ^^^^^^^^
+
+error: offset calculation on zero-sized value
+ --> $DIR/zero_offset.rs:14:9
+ |
+LL | c.wrapping_sub(0);
+ | ^^^^^^^^^^^^^^^^^
+
+error: aborting due to 8 previous errors
+