Merge pull request #26 from jonas-schievink/strict-examples
Deny warnings in doc tests / doc examples
This commit is contained in:
commit
a5ea303c22
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,6 @@ impl<'lua> String<'lua> {
|
||||||
/// # use rlua::{Lua, String};
|
/// # use rlua::{Lua, String};
|
||||||
/// # fn main() {
|
/// # fn main() {
|
||||||
/// let lua = Lua::new();
|
/// let lua = Lua::new();
|
||||||
/// let globals = lua.globals();
|
|
||||||
///
|
///
|
||||||
/// let non_utf8: String = lua.eval(r#" "test\xff" "#, None).unwrap();
|
/// let non_utf8: String = lua.eval(r#" "test\xff" "#, None).unwrap();
|
||||||
/// assert!(non_utf8.to_str().is_err()); // oh no :(
|
/// assert!(non_utf8.to_str().is_err()); // oh no :(
|
||||||
|
@ -437,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