about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorNathaniel McCallum <nathaniel@congru.us>2021-08-04 15:00:49 -0400
committerNathaniel McCallum <nathaniel@congru.us>2021-08-04 15:23:50 -0400
commitba9afb58b330058dc74171ba5cf68fce8d78d02e (patch)
tree9a3889ff307eb729d00331d2e1f01787979ba3fa /compiler/rustc_errors/src/snippet.rs
parent6fe0886723c9e08b800c9951f1c6f6a57b2bf22c (diff)
downloadrust-ba9afb58b330058dc74171ba5cf68fce8d78d02e.tar.gz
rust-ba9afb58b330058dc74171ba5cf68fce8d78d02e.zip
Move naked function ABI check to its own lint
This check was previously categorized under the lint named
`UNSUPPORTED_NAKED_FUNCTIONS`. That lint is future incompatible and will
be turned into an error in a future release. However, as defined in the
Constrained Naked Functions RFC, this check should only be a warning.
This is because it is possible for a naked function to be implemented in
such a way that it does not break even the undefined ABI. For example, a
`jmp` to a `const`.

Therefore, this patch defines a new lint named
`UNDEFINED_NAKED_FUNCTION_ABI` which contains just this single check.
Unlike `UNSUPPORTED_NAKED_FUNCTIONS`, `UNDEFINED_NAKED_FUNCTION_ABI`
will not be converted to an error in the future.

rust-lang/rfcs#2774
rust-lang/rfcs#2972
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions