File tree Expand file tree Collapse file tree 3 files changed +4
-29
lines changed Expand file tree Collapse file tree 3 files changed +4
-29
lines changed Original file line number Diff line number Diff line change @@ -444,8 +444,6 @@ fn parse_source(source: &str, crate_name: &Option<&str>) -> Result<ParseSourceIn
444444 }
445445 }
446446 }
447- // We do nothing in this case. Not marking it as `non_module_items` either.
448- StmtKind :: Empty => { }
449447 _ => {
450448 has_non_items = true ;
451449 }
Original file line number Diff line number Diff line change 44//@ compile-flags:--test
55//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
66//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
7- //@ failure-status: 101
7+ //@ check-pass
88
99/// <https://github.com/rust-lang/rust/issues/91014>
1010///
1111/// ```rust
12- /// struct S {}; // unexpected semicolon after struct def
12+ /// struct S {};
1313///
1414/// fn main() {
1515/// assert_eq!(0, 1);
Original file line number Diff line number Diff line change 11
22running 1 test
3- test $DIR/failed-doctest-extra-semicolon-on-item.rs - m (line 11) ... FAILED
3+ test $DIR/failed-doctest-extra-semicolon-on-item.rs - m (line 11) ... ok
44
5- failures:
6-
7- ---- $DIR/failed-doctest-extra-semicolon-on-item.rs - m (line 11) stdout ----
8- error: expected item, found `;`
9- --> $DIR/failed-doctest-extra-semicolon-on-item.rs:12:12
10- |
11- LL | struct S {}; // unexpected semicolon after struct def
12- | ^
13- |
14- = help: braced struct declarations are not followed by a semicolon
15- help: remove this semicolon
16- |
17- LL - struct S {}; // unexpected semicolon after struct def
18- LL + struct S {} // unexpected semicolon after struct def
19- |
20-
21- error: aborting due to 1 previous error
22-
23- Couldn't compile the test.
24-
25- failures:
26- $DIR/failed-doctest-extra-semicolon-on-item.rs - m (line 11)
27-
28- test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
5+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
296
You can’t perform that action at this time.
0 commit comments