Fix build with nightly rust

Nightly rust complains about `cfg(..)` tests against undeclared
features and other unknown cfgs. They need to be explicitly declared
now.

The nightly/stable features don't exist, so I removed them and
substitutes the currently correct number for the single test where they
were used.

The `xmpprs_doc_build` cfg flag is now declared as expectable.
This commit is contained in:
Jonas Schäfer 2024-06-16 10:45:09 +02:00 committed by Link Mauve
parent 44029c90bb
commit 079379a178
2 changed files with 4 additions and 5 deletions

View file

@ -703,11 +703,7 @@ mod tests {
assert_size!(Senders, 1);
assert_size!(Disposition, 1);
assert_size!(ContentId, 24);
// TODO: Remove conditional
#[cfg(feature = "nightly")]
assert_size!(Content, 448);
#[cfg(feature = "stable")]
assert_size!(Content, 440);
assert_size!(Content, 432);
assert_size!(Reason, 1);
assert_size!(ReasonElement, 32);
assert_size!(SessionId, 24);

View file

@ -50,3 +50,6 @@ insecure-tcp = []
syntax-highlighting = ["syntect"]
# Enable serde support in jid crate
serde = [ "xmpp-parsers/serde" ]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(xmpprs_doc_build)'] }