diff options
author | Jonas Schievink <jonasschievink@gmail.com> | 2017-07-25 23:41:58 +0200 |
---|---|---|
committer | Jonas Schievink <jonasschievink@gmail.com> | 2017-07-25 23:41:58 +0200 |
commit | 4e52544bd1989884b2ac6c42ab785c45167e1d6b (patch) | |
tree | b153b526615d35b668ab6795d4e49166d077def1 /src | |
parent | df5c8fa4b04db978397529c248b8743fbbf7743e (diff) | |
download | mlua-4e52544bd1989884b2ac6c42ab785c45167e1d6b.zip |
Deny warnings in doc tests
This magical attribute is grossly underdocumented, but it works. And
it's literally the only thing that makes this work the way I want it to.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 3 | ||||
-rw-r--r-- | src/lua.rs | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,6 @@ +// Deny warnings inside doc tests / examples +#![doc(test(attr(deny(warnings))))] + #[cfg_attr(test, macro_use)] extern crate hlist_macro; @@ -436,6 +436,7 @@ impl<'lua> Table<'lua> { /// /// for pair in globals.pairs::<Value, Value>() { /// let (key, value) = pair?; + /// # let _ = (key, value); // used /// // ... /// } /// # Ok(()) |