liblog: deny warnings in doctests

This commit is contained in:
Kevin Butler 2015-11-03 16:03:06 +00:00
parent ac36e10e2f
commit d28d000ef9
3 changed files with 12 additions and 3 deletions

View File

@ -25,7 +25,8 @@ $(eval $(call RUST_CRATE,collectionstest))
TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system libc \ TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system libc \
alloc_jemalloc,$(TARGET_CRATES)) \ alloc_jemalloc,$(TARGET_CRATES)) \
collectionstest coretest collectionstest coretest
TEST_DOC_CRATES = $(DOC_CRATES) arena flate fmt_macros getopts graphviz TEST_DOC_CRATES = $(DOC_CRATES) arena flate fmt_macros getopts graphviz \
log
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve \ TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve \
rustc_trans rustc_lint,\ rustc_trans rustc_lint,\
$(HOST_CRATES)) $(HOST_CRATES))

View File

@ -13,6 +13,7 @@
//! # Examples //! # Examples
//! //!
//! ``` //! ```
//! # #![feature(rustc_private)]
//! #[macro_use] extern crate log; //! #[macro_use] extern crate log;
//! //!
//! fn main() { //! fn main() {
@ -167,7 +168,8 @@
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/", html_root_url = "https://doc.rust-lang.org/nightly/",
html_playground_url = "https://play.rust-lang.org/")] html_playground_url = "https://play.rust-lang.org/",
test(attr(deny(warnings))))]
#![deny(missing_docs)] #![deny(missing_docs)]
#![feature(box_syntax)] #![feature(box_syntax)]

View File

@ -19,6 +19,7 @@
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// # #![feature(rustc_private)]
/// #[macro_use] extern crate log; /// #[macro_use] extern crate log;
/// ///
/// fn main() { /// fn main() {
@ -67,6 +68,7 @@ macro_rules! log {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// # #![feature(rustc_private)]
/// #[macro_use] extern crate log; /// #[macro_use] extern crate log;
/// ///
/// fn main() { /// fn main() {
@ -92,6 +94,7 @@ macro_rules! error {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// # #![feature(rustc_private)]
/// #[macro_use] extern crate log; /// #[macro_use] extern crate log;
/// ///
/// fn main() { /// fn main() {
@ -116,6 +119,7 @@ macro_rules! warn {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// # #![feature(rustc_private)]
/// #[macro_use] extern crate log; /// #[macro_use] extern crate log;
/// ///
/// fn main() { /// fn main() {
@ -142,6 +146,7 @@ macro_rules! info {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// # #![feature(rustc_private)]
/// #[macro_use] extern crate log; /// #[macro_use] extern crate log;
/// ///
/// fn main() { /// fn main() {
@ -165,9 +170,10 @@ macro_rules! debug {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// # #![feature(rustc_private)]
/// #[macro_use] extern crate log; /// #[macro_use] extern crate log;
/// ///
/// struct Point { x: int, y: int } /// struct Point { x: i32, y: i32 }
/// fn some_expensive_computation() -> Point { Point { x: 1, y: 2 } } /// fn some_expensive_computation() -> Point { Point { x: 1, y: 2 } }
/// ///
/// fn main() { /// fn main() {