Skip to content

Commit

Permalink
update docs of missing_abi lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kadiwa4 committed Sep 4, 2024
1 parent bd53aa3 commit 0c45d3b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3706,7 +3706,7 @@ declare_lint_pass!(UnusedDocComment => [UNUSED_DOC_COMMENTS]);

declare_lint! {
/// The `missing_abi` lint detects cases where the ABI is omitted from
/// extern declarations.
/// `extern` declarations.
///
/// ### Example
///
Expand All @@ -3720,10 +3720,12 @@ declare_lint! {
///
/// ### Explanation
///
/// Historically, Rust implicitly selected C as the ABI for extern
/// declarations. We expect to add new ABIs, like `C-unwind`, in the future,
/// though this has not yet happened, and especially with their addition
/// seeing the ABI easily will make code review easier.
/// For historic reasons, Rust implicitly selects `C` as the default ABI for
/// `extern` declarations. [Other ABIs] like `C-unwind` and `system` have
/// been added since then, and especially with their addition seeing the ABI
/// easily makes code review easier.
///
/// [Other ABIs]: https://doc.rust-lang.org/reference/items/external-blocks.html#abi
pub MISSING_ABI,
Allow,
"No declared ABI for extern declaration"
Expand Down

0 comments on commit 0c45d3b

Please sign in to comment.