|
47 | 47 | //! which is cyclic.
|
48 | 48 | //!
|
49 | 49 | //! ```rust
|
50 |
| -//! #![feature(rustc_private, core, into_cow)] |
| 50 | +//! #![feature(rustc_private, into_cow)] |
51 | 51 | //!
|
52 | 52 | //! use std::borrow::IntoCow;
|
53 | 53 | //! use std::io::Write;
|
|
150 | 150 | //! entity `&sube`).
|
151 | 151 | //!
|
152 | 152 | //! ```rust
|
153 |
| -//! #![feature(rustc_private, core, into_cow)] |
| 153 | +//! #![feature(rustc_private)] |
154 | 154 | //!
|
155 |
| -//! use std::borrow::IntoCow; |
156 | 155 | //! use std::io::Write;
|
157 | 156 | //! use graphviz as dot;
|
158 | 157 | //!
|
|
174 | 173 | //! dot::Id::new(format!("N{}", n)).unwrap()
|
175 | 174 | //! }
|
176 | 175 | //! fn node_label<'b>(&'b self, n: &Nd) -> dot::LabelText<'b> {
|
177 |
| -//! dot::LabelText::LabelStr(self.nodes[*n].as_slice().into_cow()) |
| 176 | +//! dot::LabelText::LabelStr(self.nodes[*n].into()) |
178 | 177 | //! }
|
179 | 178 | //! fn edge_label<'b>(&'b self, _: &Ed) -> dot::LabelText<'b> {
|
180 |
| -//! dot::LabelText::LabelStr("⊆".into_cow()) |
| 179 | +//! dot::LabelText::LabelStr("⊆".into()) |
181 | 180 | //! }
|
182 | 181 | //! }
|
183 | 182 | //!
|
|
209 | 208 | //! Hasse-diagram for the subsets of the set `{x, y}`.
|
210 | 209 | //!
|
211 | 210 | //! ```rust
|
212 |
| -//! #![feature(rustc_private, core, into_cow)] |
| 211 | +//! #![feature(rustc_private)] |
213 | 212 | //!
|
214 |
| -//! use std::borrow::IntoCow; |
215 | 213 | //! use std::io::Write;
|
216 | 214 | //! use graphviz as dot;
|
217 | 215 | //!
|
|
234 | 232 | //! }
|
235 | 233 | //! fn node_label<'b>(&'b self, n: &Nd<'b>) -> dot::LabelText<'b> {
|
236 | 234 | //! let &(i, _) = n;
|
237 |
| -//! dot::LabelText::LabelStr(self.nodes[i].into_cow()) |
| 235 | +//! dot::LabelText::LabelStr(self.nodes[i].into()) |
238 | 236 | //! }
|
239 | 237 | //! fn edge_label<'b>(&'b self, _: &Ed<'b>) -> dot::LabelText<'b> {
|
240 |
| -//! dot::LabelText::LabelStr("⊆".into_cow()) |
| 238 | +//! dot::LabelText::LabelStr("⊆".into()) |
241 | 239 | //! }
|
242 | 240 | //! }
|
243 | 241 | //!
|
|
283 | 281 | #![crate_type = "dylib"]
|
284 | 282 | #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
285 | 283 | html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
286 |
| - html_root_url = "https://doc.rust-lang.org/nightly/")] |
| 284 | + html_root_url = "https://doc.rust-lang.org/nightly/", |
| 285 | + test(attr(allow(unused_variables), deny(warnings))))] |
287 | 286 |
|
288 | 287 | #![feature(into_cow)]
|
289 | 288 | #![feature(str_escape)]
|
|
0 commit comments