C javadoc comments are not Markdown-escaped, triggering rustdoc
warnings · Issue #2057 · rust-lang/rust-bindgen (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
This comes up in Rust for Linux when generating the bindings for some C APIs that happen to have javadoc-like comments that end up being broken Markdown: Rust-for-Linux/linux#323.
Input C/C++ Header
/**
- vdso_data.cs[x].shift */ void f(void);
Bindgen Invocation
Actual Results
extern "C" { #[doc = " vdso_data.cs[x].shift"] pub fn f(); }
Which leads to rustdoc
warnings such as:
warning: unresolved link to `x`
--> f.rs:4:5
|
4 | #[doc = " vdso_data.cs[x].shift"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
= note: the link appears in this line:
vdso_data.cs[x].shift
^
= note: no item named `x` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
Expected Results
extern "C" { #[doc = " vdso_data.cs\[x\].shift"] pub fn f(); }