Skip to content

Commit bf0a9e0

Browse files
committed
Auto merge of #43152 - Mark-Simulacrum:test-src-doc, r=alexcrichton
Test src/doc once more This was accidentally broken in #42437 since we filtered too early to recurse into sub-directories. In theory, @bors p=10 r? @alexcrichton
2 parents eb9dfb8 + 5079926 commit bf0a9e0

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

src/bootstrap/check.rs

+11-6
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,20 @@ pub fn docs(build: &Build, compiler: &Compiler) {
334334

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

341+
if p.extension().and_then(|s| s.to_str()) != Some("md") {
342+
continue;
343+
}
344+
345+
// The nostarch directory in the book is for no starch, and so isn't
346+
// guaranteed to build. We don't care if it doesn't build, so skip it.
347+
if p.to_str().map_or(false, |p| p.contains("nostarch")) {
348+
continue;
349+
}
350+
346351
markdown_test(build, compiler, &p);
347352
}
348353
}

src/doc/nomicon

src/doc/unstable-book/src/language-features/compile-error.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ error with the specified error message.
1111

1212
## Examples
1313

14-
```rust
14+
```rust,compile_fail
1515
#![feature(compile_error)]
1616
1717
fn main() {

src/doc/unstable-book/src/language-features/global-allocator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ looks like:
2727
[RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974
2828

2929
```rust
30-
#![feature(global_allocator, heap_api)]
30+
#![feature(global_allocator, allocator_api, heap_api)]
3131

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

src/doc/unstable-book/src/language-features/unsized-tuple-coercion.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The tracking issue for this feature is: [#42877]
88

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

11-
```rust
11+
```rust,ignore
1212
impl<..., T, U: ?Sized> Unsized<(..., U)> for (..., T) where T: Unsized<U> {}
1313
```
1414

0 commit comments

Comments
 (0)