Module rustc::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 Lints which are used by other parts of the compiler.

ImproperCTypes
MissingDoc
NonCamelCaseTypes
NonShorthandFieldPatterns
NonSnakeCase
NonUpperCaseGlobals
PathStatements
RawPointerDeriving
Stability

Checks for use of items with #[deprecated], #[experimental] and #[unstable] attributes, or no stability attribute.

TypeLimits
UnsafeBlocks
UnusedAllocation
UnusedAttributes
UnusedCasts
UnusedImportBraces
UnusedMut
UnusedParens
UnusedResults
UnusedUnsafe
WhileTrue

Statics

DEAD_CODE
FAT_PTR_TRANSMUTES
NON_CAMEL_CASE_TYPES
NON_SNAKE_CASE
NON_UPPER_CASE_GLOBALS
PATH_STATEMENTS
UNKNOWN_CRATE_TYPES
UNKNOWN_FEATURES
UNKNOWN_LINTS
UNREACHABLE_CODE
UNUSED_ASSIGNMENTS
UNUSED_EXTERN_CRATES
UNUSED_IMPORTS
UNUSED_MUST_USE
UNUSED_MUT
UNUSED_QUALIFICATIONS
UNUSED_RESULTS
UNUSED_UNSAFE
UNUSED_VARIABLES
VARIANT_SIZE_DIFFERENCES
WARNINGS