Skip to content

Commit 3455abf

Browse files
committed
treewide: silence mock structs unused warning
With a new version of Rust toolchain, our never constructed structs used for testing macros began to trigger rustc warnings. They are silenced explicitly using #[allow(unused)].
1 parent e68adf5 commit 3455abf

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

scylla-cql/src/types/serialize/row.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@ mod tests {
11411141
// Do not remove. It's not used in tests but we keep it here to check that
11421142
// we properly ignore warnings about unused variables, unnecessary `mut`s
11431143
// etc. that usually pop up when generating code for empty structs.
1144+
#[allow(unused)]
11441145
#[derive(SerializeRow)]
11451146
#[scylla(crate = crate)]
11461147
struct TestRowWithNoColumns {}

scylla-cql/src/types/serialize/value.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,6 +2038,7 @@ mod tests {
20382038
// Do not remove. It's not used in tests but we keep it here to check that
20392039
// we properly ignore warnings about unused variables, unnecessary `mut`s
20402040
// etc. that usually pop up when generating code for empty structs.
2041+
#[allow(unused)]
20412042
#[derive(SerializeCql)]
20422043
#[scylla(crate = crate)]
20432044
struct TestUdtWithNoFields {}
@@ -2596,6 +2597,7 @@ mod tests {
25962597
assert_eq!(reference, udt);
25972598
}
25982599

2600+
#[allow(unused)]
25992601
#[derive(SerializeCql, Debug)]
26002602
#[scylla(crate = crate, flavor = "enforce_order", skip_name_checks)]
26012603
struct TestUdtWithSkippedNameChecks {

scylla/tests/integration/hygiene.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ macro_rules! test_crate {
6464
assert_eq!(sv, sv2);
6565
}
6666

67+
#[allow(unused)]
6768
#[derive(_scylla::macros::SerializeCql, _scylla::macros::SerializeRow)]
6869
#[scylla(crate = _scylla)]
6970
struct TestStructNew {

0 commit comments

Comments
 (0)