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 |
ImproperCTypes | |
InvalidNoMangleItems | |
MissingCopyImplementations | |
MissingDebugImplementations | |
MissingDoc | |
NonCamelCaseTypes | |
NonShorthandFieldPatterns | |
NonSnakeCase | |
NonUpperCaseGlobals | |
PathStatements | |
PluginAsLibrary | |
RawPointerDerive | |
Stability | Checks for use of items with |
TypeLimits | |
UnconditionalRecursion | |
UnsafeBlocks | |
UnstableFeatures | Forbids using the |
UnusedAllocation | |
UnusedAttributes | |
UnusedCasts | |
UnusedImportBraces | |
UnusedMut | |
UnusedParens | |
UnusedResults | |
UnusedUnsafe | |
WhileTrue |