diff options
| author | Oliver Middleton <olliemail27@gmail.com> | 2020-01-17 23:44:44 +0000 |
|---|---|---|
| committer | Oliver Middleton <olliemail27@gmail.com> | 2020-01-17 23:44:44 +0000 |
| commit | 79061d0e02f70ecbf3333057eac36dcc6c4b1727 (patch) | |
| tree | 0f1265828c4af8564a78159a2ff2acee54a655c0 /src/test/rustdoc-ui/invalid-syntax.rs | |
| parent | 689fca01c5a1eac2d240bf08aa728171a28f2285 (diff) | |
| download | rust-79061d0e02f70ecbf3333057eac36dcc6c4b1727.tar.gz rust-79061d0e02f70ecbf3333057eac36dcc6c4b1727.zip | |
rustdoc: Catch fatal errors when syntax highlighting
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
Diffstat (limited to 'src/test/rustdoc-ui/invalid-syntax.rs')
| -rw-r--r-- | src/test/rustdoc-ui/invalid-syntax.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/invalid-syntax.rs b/src/test/rustdoc-ui/invalid-syntax.rs index 34e92c42104..72037dd74be 100644 --- a/src/test/rustdoc-ui/invalid-syntax.rs +++ b/src/test/rustdoc-ui/invalid-syntax.rs @@ -93,3 +93,9 @@ pub fn empty_rust_with_whitespace() {} /// pub fn indent_after_fenced() {} //~^^^ WARNING could not parse code block as Rust code + +/// ``` +/// "invalid +/// ``` +pub fn invalid() {} +//~^^^^ WARNING could not parse code block as Rust code |
