rustdoc: fix doctests with non-feature crate attrs

This commit is contained in:
Alex Burka 2016-12-04 19:07:27 +00:00
parent 28d6623bcc
commit ec356bb1a7
5 changed files with 117 additions and 6 deletions

View file

@ -600,7 +600,7 @@ is documented, especially when you are working on a library. Rust allows you to
to generate warnings or errors, when an item is missing documentation.
To generate warnings you use `warn`:
```rust
```rust,ignore
#![warn(missing_docs)]
```
@ -630,7 +630,7 @@ struct Hidden;
You can control a few aspects of the HTML that `rustdoc` generates through the
`#![doc]` version of the attribute:
```rust
```rust,ignore
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/")]

View file

@ -13,7 +13,7 @@ dont want to use the standard library via an attribute: `#![no_std]`.
To use `#![no_std]`, add it to your crate root:
```rust
```rust,ignore
#![no_std]
fn plus_one(x: i32) -> i32 {
@ -29,7 +29,7 @@ use its features without an explicit import. By the same token, when using
prelude](../core/prelude/v1/index.html). This means that a lot of code will Just
Work:
```rust
```rust,ignore
#![no_std]
fn may_fail(failure: bool) -> Result<(), &'static str> {