From: Kevin Butler Date: Tue, 3 Nov 2015 15:33:58 +0000 (+0000) Subject: libgraphviz: deny warnings in doctests X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=ac36e10e2ff62e62ec64e422079cf6daceb074f4;p=rust.git libgraphviz: deny warnings in doctests --- diff --git a/mk/tests.mk b/mk/tests.mk index cba82fc9778..599d2ea4481 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -25,7 +25,7 @@ $(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 +TEST_DOC_CRATES = $(DOC_CRATES) arena flate fmt_macros getopts graphviz TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve \ rustc_trans rustc_lint,\ $(HOST_CRATES)) diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index b82b7d122b3..1fb54ed9071 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -47,7 +47,7 @@ //! which is cyclic. //! //! ```rust -//! #![feature(rustc_private, core, into_cow)] +//! #![feature(rustc_private, into_cow)] //! //! use std::borrow::IntoCow; //! use std::io::Write; @@ -150,9 +150,8 @@ //! entity `&sube`). //! //! ```rust -//! #![feature(rustc_private, core, into_cow)] +//! #![feature(rustc_private)] //! -//! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; //! @@ -174,10 +173,10 @@ //! dot::Id::new(format!("N{}", n)).unwrap() //! } //! fn node_label<'b>(&'b self, n: &Nd) -> dot::LabelText<'b> { -//! dot::LabelText::LabelStr(self.nodes[*n].as_slice().into_cow()) +//! dot::LabelText::LabelStr(self.nodes[*n].into()) //! } //! fn edge_label<'b>(&'b self, _: &Ed) -> dot::LabelText<'b> { -//! dot::LabelText::LabelStr("⊆".into_cow()) +//! dot::LabelText::LabelStr("⊆".into()) //! } //! } //! @@ -209,9 +208,8 @@ //! Hasse-diagram for the subsets of the set `{x, y}`. //! //! ```rust -//! #![feature(rustc_private, core, into_cow)] +//! #![feature(rustc_private)] //! -//! use std::borrow::IntoCow; //! use std::io::Write; //! use graphviz as dot; //! @@ -234,10 +232,10 @@ //! } //! fn node_label<'b>(&'b self, n: &Nd<'b>) -> dot::LabelText<'b> { //! let &(i, _) = n; -//! dot::LabelText::LabelStr(self.nodes[i].into_cow()) +//! dot::LabelText::LabelStr(self.nodes[i].into()) //! } //! fn edge_label<'b>(&'b self, _: &Ed<'b>) -> dot::LabelText<'b> { -//! dot::LabelText::LabelStr("⊆".into_cow()) +//! dot::LabelText::LabelStr("⊆".into()) //! } //! } //! @@ -283,7 +281,8 @@ #![crate_type = "dylib"] #![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_root_url = "https://doc.rust-lang.org/nightly/", + test(attr(allow(unused_variables), deny(warnings))))] #![feature(into_cow)] #![feature(str_escape)]