Skip to content

Commit

Permalink
fix cfg related warnings (#485)
Browse files Browse the repository at this point in the history
* remove mention of doc_cfg feature

`doc_cfg` has been superseded by `doc_auto_cfg`.

* allow `cfg(kani)`

Recently, rustc has started checking cfg expressions and so we have to
tell it explicitly that cfg(kani) is allowed because it has no way of
figuring that out itself.
  • Loading branch information
Freax13 authored May 20, 2024
1 parent 051a18a commit 5aff621
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ pre-release-commit-message = "Bump version to {{version}}"
push = false
publish = false
tag = false

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }
4 changes: 0 additions & 4 deletions src/instructions/interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ pub fn int3() {
/// It can also cause memory/register corruption depending on the interrupt
/// implementation (if it expects values/pointers to be passed in registers).
#[cfg(feature = "asm_const")]
#[cfg_attr(
feature = "doc_cfg",
doc(cfg(any(feature = "nightly", feature = "asm_const")))
)]
pub unsafe fn software_interrupt<const NUM: u8>() {
unsafe {
asm!("int {num}", num = const NUM, options(nomem, nostack));
Expand Down

0 comments on commit 5aff621

Please sign in to comment.