Skip to content

Commit

Permalink
Auto merge of rust-lang#43152 - Mark-Simulacrum:test-src-doc, r=alexc…
Browse files Browse the repository at this point in the history
…richton

Test src/doc once more

This was accidentally broken in rust-lang#42437 since we filtered too early to recurse into sub-directories.

In theory, @bors p=10

r? @alexcrichton
  • Loading branch information
bors committed Jul 10, 2017
2 parents eb9dfb8 + 5079926 commit bf0a9e0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
17 changes: 11 additions & 6 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,20 @@ pub fn docs(build: &Build, compiler: &Compiler) {

while let Some(p) = stack.pop() {
if p.is_dir() {
stack.extend(t!(p.read_dir()).map(|p| t!(p).path()).filter(|p| {
p.extension().and_then(|s| s.to_str()) == Some("md") &&
// The nostarch directory in the book is for no starch, and so isn't guaranteed to
// build. We don't care if it doesn't build, so skip it.
p.to_str().map_or(true, |p| !p.contains("nostarch"))
}));
stack.extend(t!(p.read_dir()).map(|p| t!(p).path()));
continue
}

if p.extension().and_then(|s| s.to_str()) != Some("md") {
continue;
}

// The nostarch directory in the book is for no starch, and so isn't
// guaranteed to build. We don't care if it doesn't build, so skip it.
if p.to_str().map_or(false, |p| p.contains("nostarch")) {
continue;
}

markdown_test(build, compiler, &p);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/nomicon
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ error with the specified error message.

## Examples

```rust
```rust,compile_fail
#![feature(compile_error)]
fn main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ looks like:
[RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974

```rust
#![feature(global_allocator, heap_api)]
#![feature(global_allocator, allocator_api, heap_api)]

use std::heap::{Alloc, System, Layout, AllocErr};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The tracking issue for this feature is: [#42877]

This is a part of [RFC0401]. According to the RFC, there should be an implementation like this:

```rust
```rust,ignore
impl<..., T, U: ?Sized> Unsized<(..., U)> for (..., T) where T: Unsized<U> {}
```

Expand Down

0 comments on commit bf0a9e0

Please sign in to comment.