At present, code listings without a main function will be wrapped in one and
annotated with an allow lint check attribute provided by the following [code][]:
```
format!(
"\n# #![allow(unused_variables)]\n{}#fn main() {{\n{}#}}",
attrs, code
)
```
A broader lint check attribute such as `#![allow(unused)]` seems like it might
better fit the apparent intent of this code.
Addresses: https://github.com/rust-lang/mdBook/issues/1192
[code]:
|
||
|---|---|---|
| .. | ||
| book | ||
| cmd | ||
| preprocess | ||
| renderer | ||
| theme | ||
| utils | ||
| config.rs | ||
| lib.rs | ||
| main.rs | ||