How to turn off cargo doc test and compile for a specific module in Rust

Viewed 545

I have some generated .rs code (from grpc proto files) and they are checked in with my normal Rust code under src but in some sub modules. The issue is that when doing cargo test the doc test will run and some of the generated .rs have comments with indentations (code blocks) and cargo doc test will try to compile them and fail.

For example cargo test will try to compile (and perhaps run these lines) show here.

Is there a way to exclude or ignore those generated .rs for doc test (without manually changing them)?

0 Answers
Related