liblog: deny warnings in doctests
This commit is contained in:
parent
ac36e10e2f
commit
d28d000ef9
@ -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))
|
||||
|
@ -13,6 +13,7 @@
|
||||
//! # Examples
|
||||
//!
|
||||
//! ```
|
||||
//! # #![feature(rustc_private)]
|
||||
//! #[macro_use] extern crate log;
|
||||
//!
|
||||
//! fn main() {
|
||||
@ -167,7 +168,8 @@
|
||||
#![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)]
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user