Closed
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
$ bindgen f.h
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();
}
Metadata
Metadata
Assignees
Labels
No labels