Open
Description
Given these two files:
ducks.rs
#![feature(extended_key_value_attributes)]
#[doc = include_str!("ducks.md")]
fn ducks() {}
ducks.md
test
test
test
test
test
test
test
test
test
test
```rust
invalid syntax
```
When I run rustdoc --test ducks.rs
, I get an error:
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `syntax`
--> ducks.rs:14:9
|
3 | invalid syntax
| ^^^^^^ expected one of 8 possible tokens
error: aborting due to previous error
The error message is correct. However, the position (ducks.rs:14:9
) is invalid. I would expect it to reference either the original include_str!
call, or (preferred) the snippet in the Markdown file.
Meta
rustc --version --verbose
:
rustc 1.51.0-nightly (bc39d4d9c 2021-01-15)
binary: rustc
commit-hash: bc39d4d9c514e5fdb40a5782e6ca08924f979c35
commit-date: 2021-01-15
host: x86_64-unknown-linux-gnu
release: 1.51.0-nightly
LLVM version: 11.0
cc #78835
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status