Doc-tests media_info
running 3 tests
test src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4100) ... FAILED
test src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4111) ... FAILED
test src/ffi.rs - ffi::AVChromaLocation (line 947) ... FAILED
failures:
---- src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4100) stdout ----
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `the`
--> src/ffi.rs:4101:4
|
3 | If the default get_buffer2() is used with a hwaccel pixel
| ^^^ expected one of 8 possible tokens here
error[E0425]: cannot find value `If` in this scope
--> src/ffi.rs:4101:1
|
3 | If the default get_buffer2() is used with a hwaccel pixel
| ^^ not found in this scope
thread 'src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4100)' panicked at 'couldn't compile the test', librustdoc/test.rs:333:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4111) stdout ----
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `field`
--> src/ffi.rs:4112:6
|
3 | This field should be set before avcodec_open2() is called.
| ^^^^^ expected one of 8 possible tokens here
error[E0425]: cannot find value `This` in this scope
--> src/ffi.rs:4112:1
|
3 | This field should be set before avcodec_open2() is called.
| ^^^^ not found in this scope
thread 'src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4111)' panicked at 'couldn't compile the test', librustdoc/test.rs:333:13
---- src/ffi.rs - ffi::AVChromaLocation (line 947) stdout ----
error: invalid suffix `st` for numeric literal
--> src/ffi.rs:948:1
|
3 | 1st 2nd 1st 2nd horizontal luma sample positions
| ^^^
|
= help: the suffix must be one of the integral types (`u32`, `isize`, etc)
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `2nd`
--> src/ffi.rs:948:5
|
3 | 1st 2nd 1st 2nd horizontal luma sample positions
| ^^^ expected one of `.`, `;`, `?`, `}`, or an operator here
error[E0308]: mismatched types
--> src/ffi.rs:948:1
|
2 | fn main() {
| - expected `()` because of default return type
3 | 1st 2nd 1st 2nd horizontal luma sample positions
| ^^^ expected (), found integral variable
|
= note: expected type `()`
found type `{integer}`
thread 'src/ffi.rs - ffi::AVChromaLocation (line 947)' panicked at 'couldn't compile the test', librustdoc/test.rs:333:13
failures:
src/ffi.rs - ffi::AVChromaLocation (line 947)
src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4100)
src/ffi.rs - ffi::AVCodecContext::hw_frames_ctx (line 4111)
Expected Results
Of course expected that doc tests will pass.
After added option --no-doc-comments problem is resolved, but would expect to include comments in a way that will not infer with doc tests.
I'm generating binding for libavformat (ffmpeg libraries).
Code works however generated binding breaks doc tests. Using ffmpeg-4.1 code
Input C/C++ Header
Bindgen Invocation
Actual Results
this is result of cargo test (doc tests section)
Expected Results
Of course expected that doc tests will pass. After added option
--no-doc-comments
problem is resolved, but would expect to include comments in a way that will not infer with doc tests.bindgen version
bindgen 0.45.0