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

index cba82fc97782cf2e22eeb3fb6b5a0e698a05f581..599d2ea448114fbfb71fd4339015134fc34fee73 100644 (file)
@@ -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))
index b82b7d122b3ce8205c760602202243faed391eeb..1fb54ed9071ab6b6939d79381b93889945d5cd58 100644 (file)
@@ -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;
 //! entity `&sube`).
 //!
 //! ```rust
-//! #![feature(rustc_private, core, into_cow)]
+//! #![feature(rustc_private)]
 //!
-//! use std::borrow::IntoCow;
 //! use std::io::Write;
 //! use graphviz as dot;
 //!
 //!         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("&sube;".into_cow())
+//!         dot::LabelText::LabelStr("&sube;".into())
 //!     }
 //! }
 //!
 //! 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;
 //!
 //!     }
 //!     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("&sube;".into_cow())
+//!         dot::LabelText::LabelStr("&sube;".into())
 //!     }
 //! }
 //!
 #![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)]