Fix build with nightly rust

Jonas Schäfer created

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.

Change summary

parsers/src/jingle.rs | 6 +-----
tokio-xmpp/Cargo.toml | 3 +++
2 files changed, 4 insertions(+), 5 deletions(-)

Detailed changes

parsers/src/jingle.rs 🔗

@@ -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);

tokio-xmpp/Cargo.toml 🔗

@@ -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)'] }