diff options
| author | bors <bors@rust-lang.org> | 2014-08-29 22:16:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-29 22:16:20 +0000 |
| commit | 5419b2ca2c27b4745fa1f2773719350420542c76 (patch) | |
| tree | fdf7d93f93b9282ce138b0852038600c8afd231c /src/test/compile-fail/trait-as-struct-constructor.rs | |
| parent | bd159d3867473ee43959706519066531d76af7ba (diff) | |
| parent | ed2aad8b4356d24403f86dd9543957367d4fce88 (diff) | |
| download | rust-5419b2ca2c27b4745fa1f2773719350420542c76.tar.gz rust-5419b2ca2c27b4745fa1f2773719350420542c76.zip | |
auto merge of #15773 : P1start/rust/style-lints, r=alexcrichton
This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. This also adds support for lint groups to the compiler. Lint groups are a way of grouping a number of lints together under one name. For example, this also defines a default lint for naming conventions, named `bad_style`. Writing `#[allow(bad_style)]` is equivalent to writing `#[allow(non_camel_case_types, non_snake_case, non_uppercase_statics)]`. These lint groups can also be defined as a compiler plugin using the new `Registry::register_lint_group` method. This also adds two built-in lint groups, `bad_style` and `unused`. The contents of these groups can be seen by running `rustc -W help`. [breaking-change]
Diffstat (limited to 'src/test/compile-fail/trait-as-struct-constructor.rs')
0 files changed, 0 insertions, 0 deletions
