]> git.lizzy.rs Git - rust.git/commitdiff
liblog: deny warnings in doctests
authorKevin Butler <haqkrs@gmail.com>
Tue, 3 Nov 2015 16:03:06 +0000 (16:03 +0000)
committerKevin Butler <haqkrs@gmail.com>
Thu, 12 Nov 2015 05:16:34 +0000 (05:16 +0000)
mk/tests.mk
src/liblog/lib.rs
src/liblog/macros.rs

index 599d2ea448114fbfb71fd4339015134fc34fee73..18d980da7d4278f50d9d41946164a8a876312d17 100644 (file)
@@ -25,7 +25,8 @@ $(eval $(call RUST_CRATE,collectionstest))
 TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system libc \
                                  alloc_jemalloc,$(TARGET_CRATES)) \
                        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 \
                                rustc_trans rustc_lint,\
                      $(HOST_CRATES))
index 9cb835bd8525d583c99eab127bd178f5048ad2cb..1de7ebfffdea28af1ed89028823eadc9d2170a5b 100644 (file)
@@ -13,6 +13,7 @@
 //! # Examples
 //!
 //! ```
+//! # #![feature(rustc_private)]
 //! #[macro_use] extern crate log;
 //!
 //! fn main() {
 #![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_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)]
 
 #![feature(box_syntax)]
index 46b51f50c85831d2136363ef28e2279252809b7c..803a2df9ccc8baff67d46d6a3b15db71c8d49602 100644 (file)
@@ -19,6 +19,7 @@
 /// # Examples
 ///
 /// ```
+/// # #![feature(rustc_private)]
 /// #[macro_use] extern crate log;
 ///
 /// fn main() {
@@ -67,6 +68,7 @@ macro_rules! log {
 /// # Examples
 ///
 /// ```
+/// # #![feature(rustc_private)]
 /// #[macro_use] extern crate log;
 ///
 /// fn main() {
@@ -92,6 +94,7 @@ macro_rules! error {
 /// # Examples
 ///
 /// ```
+/// # #![feature(rustc_private)]
 /// #[macro_use] extern crate log;
 ///
 /// fn main() {
@@ -116,6 +119,7 @@ macro_rules! warn {
 /// # Examples
 ///
 /// ```
+/// # #![feature(rustc_private)]
 /// #[macro_use] extern crate log;
 ///
 /// fn main() {
@@ -142,6 +146,7 @@ macro_rules! info {
 /// # Examples
 ///
 /// ```
+/// # #![feature(rustc_private)]
 /// #[macro_use] extern crate log;
 ///
 /// fn main() {
@@ -165,9 +170,10 @@ macro_rules! debug {
 /// # Examples
 ///
 /// ```
+/// # #![feature(rustc_private)]
 /// #[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 main() {