Skip to content

Commit 5aff621

Browse files
authored
fix cfg related warnings (#485)
* 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.
1 parent 051a18a commit 5aff621

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ pre-release-commit-message = "Bump version to {{version}}"
4747
push = false
4848
publish = false
4949
tag = false
50+
51+
[lints.rust]
52+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }

src/instructions/interrupts.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ pub fn int3() {
146146
/// It can also cause memory/register corruption depending on the interrupt
147147
/// implementation (if it expects values/pointers to be passed in registers).
148148
#[cfg(feature = "asm_const")]
149-
#[cfg_attr(
150-
feature = "doc_cfg",
151-
doc(cfg(any(feature = "nightly", feature = "asm_const")))
152-
)]
153149
pub unsafe fn software_interrupt<const NUM: u8>() {
154150
unsafe {
155151
asm!("int {num}", num = const NUM, options(nomem, nostack));

0 commit comments

Comments
 (0)