Module rustc::lint::builtinUnstable [-] [+] [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
InvalidNoMangleItems
MissingCopyImplementations
MissingDebugImplementations
MissingDoc
NonCamelCaseTypes
NonShorthandFieldPatterns
NonSnakeCase
NonUpperCaseGlobals
PathStatements
PluginAsLibrary
RawPointerDerive
Stability

Checks for use of items with #[deprecated] attributes

TypeLimits
UnconditionalRecursion
UnsafeBlocks
UnstableFeatures

Forbids using the #[feature(...)] attribute

UnusedAllocation
UnusedAttributes
UnusedCasts
UnusedImportBraces
UnusedMut
UnusedParens
UnusedResults
UnusedUnsafe
WhileTrue

Statics

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