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.
This commit is contained in:
parent
df5c8fa4b0
commit
4e52544bd1
|
@ -1,3 +1,6 @@
|
||||||
|
// Deny warnings inside doc tests / examples
|
||||||
|
#![doc(test(attr(deny(warnings))))]
|
||||||
|
|
||||||
#[cfg_attr(test, macro_use)]
|
#[cfg_attr(test, macro_use)]
|
||||||
extern crate hlist_macro;
|
extern crate hlist_macro;
|
||||||
|
|
||||||
|
|
|
@ -436,6 +436,7 @@ impl<'lua> Table<'lua> {
|
||||||
///
|
///
|
||||||
/// for pair in globals.pairs::<Value, Value>() {
|
/// for pair in globals.pairs::<Value, Value>() {
|
||||||
/// let (key, value) = pair?;
|
/// let (key, value) = pair?;
|
||||||
|
/// # let _ = (key, value); // used
|
||||||
/// // ...
|
/// // ...
|
||||||
/// }
|
/// }
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
|
|
Loading…
Reference in New Issue