mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
libserialize: deny warnings in doctests
This commit is contained in:
parent
7ee329ac6e
commit
a17f81b4b7
@ -26,7 +26,7 @@ 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 rand rbml
|
log rand rbml serialize
|
||||||
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))
|
||||||
|
@ -77,8 +77,9 @@
|
|||||||
//! serialization API, using the derived serialization code.
|
//! serialization API, using the derived serialization code.
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! extern crate serialize;
|
//! # #![feature(rustc_private)]
|
||||||
//! use serialize::json;
|
//! extern crate serialize as rustc_serialize; // for the deriving below
|
||||||
|
//! use rustc_serialize::json;
|
||||||
//!
|
//!
|
||||||
//! // Automatically generate `Decodable` and `Encodable` trait implementations
|
//! // Automatically generate `Decodable` and `Encodable` trait implementations
|
||||||
//! #[derive(RustcDecodable, RustcEncodable)]
|
//! #[derive(RustcDecodable, RustcEncodable)]
|
||||||
@ -111,6 +112,7 @@
|
|||||||
//! ### Simple example of `ToJson` usage
|
//! ### Simple example of `ToJson` usage
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
|
//! # #![feature(rustc_private)]
|
||||||
//! extern crate serialize;
|
//! extern crate serialize;
|
||||||
//! use serialize::json::{self, ToJson, Json};
|
//! use serialize::json::{self, ToJson, Json};
|
||||||
//!
|
//!
|
||||||
@ -150,6 +152,7 @@
|
|||||||
//! ### Verbose example of `ToJson` usage
|
//! ### Verbose example of `ToJson` usage
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
|
//! # #![feature(rustc_private)]
|
||||||
//! extern crate serialize;
|
//! extern crate serialize;
|
||||||
//! use std::collections::BTreeMap;
|
//! use std::collections::BTreeMap;
|
||||||
//! use serialize::json::{self, Json, ToJson};
|
//! use serialize::json::{self, Json, ToJson};
|
||||||
@ -185,7 +188,7 @@
|
|||||||
//! let json_str: String = json_obj.to_string();
|
//! let json_str: String = json_obj.to_string();
|
||||||
//!
|
//!
|
||||||
//! // Deserialize like before
|
//! // Deserialize like before
|
||||||
//! let decoded: TestStruct = json::decode(json_str)).unwrap();
|
//! let decoded: TestStruct = json::decode(&json_str).unwrap();
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@ Core encoding and decoding interfaces.
|
|||||||
#![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(allow(unused_variables), deny(warnings))))]
|
||||||
|
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
|
Loading…
Reference in New Issue
Block a user