Lint groups

The Rust compiler lets us configure some of the aforementioned lints in groups. For example, the unused group will contain many of the unused_ kind of lints. The warnings group will contain all the lints that have been configured to warn, and so on.

Lint groups can be used the same way as lints, by specifying what you want to happen when the compiler catches that behavior:

#[deny(warnings)]

You can check out the rest of the built-in lints by running rustc -W help. It will show the ones we have talked about and the other lints that are warn or deny by default.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.164.24