mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 10:33:27 +00:00
3298de7f66
Closes: #6995 Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com> Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
52 lines
1.2 KiB
Text
52 lines
1.2 KiB
Text
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
|
|
|