Skip to content

Commit

Permalink
Update spans
Browse files Browse the repository at this point in the history
  • Loading branch information
wcampbell0x2a committed Sep 4, 2024
1 parent 2e68652 commit 9986fb3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion deku-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ impl FieldData {
> 1
{
return Err(cerror(
data.bits.span(),
data.ident.span(),
"conflicting: only one `seek` attribute can be used at one time",
));
}
Expand Down
6 changes: 3 additions & 3 deletions tests/test_compile/cases/count_read_conflict.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ error: conflicting: both `count` and `bytes_read` specified on field
23 | #[deku(count = "1", bytes_read = "2")]
| ^^^

error: conflicting: `read_all` cannot be used with `until`, count`, `bits_read`, or `bytes_read`
--> $DIR/count_read_conflict.rs:27:10
error: conflicting: `read_all` cannot be used with `until`, `count`, `bits_read`, or `bytes_read`
|
27 | #[derive(DekuRead)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `DekuRead` (in Nightly builds, run with -Z macro-backtrace for more info)

error: conflicting: `read_all` cannot be used with `until`, count`, `bits_read`, or `bytes_read`
--> $DIR/count_read_conflict.rs:33:10
error: conflicting: `read_all` cannot be used with `until`, `count`, `bits_read`, or `bytes_read`
|
33 | #[derive(DekuRead)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `DekuRead` (in Nightly builds, run with -Z macro-backtrace for more info)

error: conflicting: `read_all` cannot be used with `until`, count`, `bits_read`, or `bytes_read`
--> $DIR/count_read_conflict.rs:39:10
error: conflicting: `read_all` cannot be used with `until`, `count`, `bits_read`, or `bytes_read`
|
39 | #[derive(DekuRead)]
| ^^^^^^^^
Expand Down
8 changes: 3 additions & 5 deletions tests/test_compile/cases/seek_conflict.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
error: conflicting: only one `seek` attribute can be used at one time
--> tests/test_compile/cases/seek_conflict.rs:3:10
--> tests/test_compile/cases/seek_conflict.rs:6:5
|
3 | #[derive(DekuRead, Debug, PartialEq, Eq)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `DekuRead` (in Nightly builds, run with -Z macro-backtrace for more info)
6 | byte_a: u8,
| ^^^^^^

0 comments on commit 9986fb3

Please sign in to comment.