Skip to content

Commit ff65b51

Browse files
committed
---
yaml --- r: 229075 b: refs/heads/try c: 5b0721d h: refs/heads/master i: 229073: 004fd04 229071: 90451d0 v: v3
1 parent cd09eb7 commit ff65b51

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 66109d2c38b4ff2b1e097014fa4710682937a10b
4+
refs/heads/try: 5b0721d0fe390ff3f6741cdf15bf93b8a1df2879
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/doc/tarpl/races.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ race condition can't violate memory safety in a Rust program on
2525
its own. Only in conjunction with some other unsafe code can a race condition
2626
actually violate memory safety. For instance:
2727

28-
```rust,no_run
28+
```rust,norun
2929
use std::thread;
3030
use std::sync::atomic::{AtomicUsize, Ordering};
3131
use std::sync::Arc;
@@ -56,7 +56,7 @@ thread::spawn(move || {
5656
println!("{}", data[idx.load(Ordering::SeqCst)]);
5757
```
5858

59-
```rust,no_run
59+
```rust,norun
6060
use std::thread;
6161
use std::sync::atomic::{AtomicUsize, Ordering};
6262
use std::sync::Arc;

branches/try/src/librustdoc/markdown.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ use test::{TestOptions, Collector};
2929
/// Separate any lines at the start of the file that begin with `%`.
3030
fn extract_leading_metadata<'a>(s: &'a str) -> (Vec<&'a str>, &'a str) {
3131
let mut metadata = Vec::new();
32+
let mut count = 0;
3233
for line in s.lines() {
3334
if line.starts_with("%") {
3435
// remove %<whitespace>
35-
metadata.push(line[1..].trim_left())
36+
metadata.push(line[1..].trim_left());
37+
count += line.len() + 1;
3638
} else {
37-
let line_start_byte = s.find(line).unwrap();
38-
return (metadata, &s[line_start_byte..]);
39+
return (metadata, &s[count..]);
3940
}
4041
}
4142
// if we're here, then all lines were metadata % lines.

0 commit comments

Comments
 (0)