You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo doc
Compiling onig_sys v66.1.1 (file://~/src/rust-onig/onig_sys)
Documenting onig_sys v66.1.1 (file://~/src/rust-onig/onig_sys)
error: unknown start of token: `
--> <stdin>:1:1
|
1 | ```c
| ^
|
help: unicode character '`' (Grave Accent) looks like ''' (Single Quote), but it's not
--> <stdin>:1:1
|
1 | ```c
| ^
error: Could not document `onig_sys`.
Caused by:
process didn't exit successfully: `rustdoc --crate-name onig_sys onig_sys/src/lib.rs -o ~/src/rust-onig/target/doc -L dependency=~/src/rust-onig/target/debug/deps --extern libc=~/src/rust-onig/target/debug/deps/liblibc-db55a80d54675fa5.rlib` (exit code: 101)
This is very hard to debug! Which "```" section does Rust error on? Rustdoc should provide good and clear span info on this, with line numbers relative to the file, not relative to something else.
I could only debug this through removing each single ``` section and checking whether the error persists. This way I've found out that the following section is causing this:
/// Iterate function call for all names.////// `int onig_foreach_name(regex_t* reg,/// int (*func)(const UChar*, const UChar*, int,int*,regex_t*,void*),/// void* arg)`////// # Returns////// * normal return: 0/// * error: func's return value.////// # Arguments////// 1. reg: regex object./// 2. func: callback function.////// ```c/// func(name, name_end, <number of groups>, <group number's list>,/// reg, arg);/// ```////// if func does not return 0, then iteration is stopped./// 3. arg: argument for func.pubfn onig_foreach_name(reg:OnigRegex,
The text was updated successfully, but these errors were encountered:
Use correct line offsets for doctests
Not yet tested.
This doesn't handle char positions. It could if I collected a map of char offsets and lines, but this is a bit more work and requires hooking into the parser much more (unsure if it's possible).
r? @QuietMisdreavus
(fixes#45868)
Do the following:
Will yield the following output:
This is very hard to debug! Which "```" section does Rust error on? Rustdoc should provide good and clear span info on this, with line numbers relative to the file, not relative to something else.
I could only debug this through removing each single ``` section and checking whether the error persists. This way I've found out that the following section is causing this:
The text was updated successfully, but these errors were encountered: