Module rustc_trans::lint::builtinExperimental
[-]
[+]
[src]
Lints built in to rustc.
This is a sibling of lint::context in order to ensure that
lints implemented here use the same public API as lint plugins.
To add a new lint to rustc, declare it here using declare_lint!().
Then add code to emit the new lint in the appropriate circumstances.
You can do that in an existing LintPass if it makes sense, or in
a new LintPass, or using Session::add_lint elsewhere in the
compiler. Only do the latter if the check can't be written cleanly
as a LintPass.
If you define a new LintPass, you will also need to add it to the
add_builtin! or add_builtin_with_new! invocation in context.rs.
Use the former for unit-like structs and the latter for structs with
a pub fn new().
Structs
| BoxPointers | |
| HardwiredLints | Does nothing as a lint pass, but registers some |
| ImproperCTypes | |
| MissingDoc | |
| NonCamelCaseTypes | |
| NonShorthandFieldPatterns | |
| NonSnakeCase | |
| NonUpperCaseGlobals | |
| PathStatements | |
| RawPointerDeriving | |
| Stability | Checks for use of items with |
| TypeLimits | |
| UnsafeBlocks | |
| UnusedAllocation | |
| UnusedAttributes | |
| UnusedCasts | |
| UnusedImportBraces | |
| UnusedMut | |
| UnusedParens | |
| UnusedResults | |
| UnusedUnsafe | |
| WhileTrue |
Statics
pub static DEAD_CODE: &'static Lint = [definition] |
|
pub static FAT_PTR_TRANSMUTES: &'static Lint = [definition] |
|
pub static NON_CAMEL_CASE_TYPES: &'static Lint = [definition] |
|
pub static NON_SNAKE_CASE: &'static Lint = [definition] |
|
pub static NON_UPPER_CASE_GLOBALS: &'static Lint = [definition] |
|
pub static PATH_STATEMENTS: &'static Lint = [definition] |
|
pub static UNKNOWN_CRATE_TYPES: &'static Lint = [definition] |
|
pub static UNKNOWN_FEATURES: &'static Lint = [definition] |
|
pub static UNKNOWN_LINTS: &'static Lint = [definition] |
|
pub static UNREACHABLE_CODE: &'static Lint = [definition] |
|
pub static UNUSED_ASSIGNMENTS: &'static Lint = [definition] |
|
pub static UNUSED_EXTERN_CRATES: &'static Lint = [definition] |
|
pub static UNUSED_IMPORTS: &'static Lint = [definition] |
|
pub static UNUSED_MUST_USE: &'static Lint = [definition] |
|
pub static UNUSED_MUT: &'static Lint = [definition] |
|
pub static UNUSED_QUALIFICATIONS: &'static Lint = [definition] |
|
pub static UNUSED_RESULTS: &'static Lint = [definition] |
|
pub static UNUSED_UNSAFE: &'static Lint = [definition] |
|
pub static UNUSED_VARIABLES: &'static Lint = [definition] |
|
pub static VARIANT_SIZE_DIFFERENCES: &'static Lint = [definition] |
|
pub static WARNINGS: &'static Lint = [definition] |