Skip to content

Commit c714b9c

Browse files
committed
Remove disallowed-macros
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 87ff191 commit c714b9c

20 files changed

Lines changed: 0 additions & 47 deletions

File tree

src/hyperlight_common/clippy.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/hyperlight_common/src/clippy.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/hyperlight_common/src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ limitations under the License.
1717
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::panic))]
1818
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::expect_used))]
1919
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::unwrap_used))]
20-
// clippy.toml disallows assert!/assert_eq!/assert_ne! via disallowed-macros.
21-
// That lint is active by default, so we suppress it globally here, then
22-
// selectively re-enable it for release host builds (feature = "std").
23-
// Guest targets (no std) are allowed asserts — panics are contained in the
24-
// micro-VM and cannot crash the host. Tests and debug builds are also allowed.
25-
#![allow(clippy::disallowed_macros)]
26-
#![cfg_attr(
27-
not(any(test, debug_assertions, not(feature = "std"))),
28-
warn(clippy::disallowed_macros)
29-
)]
3020
// We use Arbitrary during fuzzing, which requires std
3121
#![cfg_attr(not(feature = "fuzzing"), no_std)]
3222

src/hyperlight_common/src/version_note.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ impl<const NAME_SZ: usize, const DESC_SZ: usize> ElfNote<NAME_SZ, DESC_SZ> {
9090
///
9191
/// Panics at compile time if `NAME_SZ` or `DESC_SZ` don't match
9292
/// `padded_name_size(name.len() + 1)` or `padded_desc_size(desc.len() + 1)`.
93-
#[allow(clippy::disallowed_macros)] // These asserts are evaluated at compile time only (const fn).
9493
pub const fn new(name: &str, desc: &str, n_type: u32) -> Self {
9594
// NAME_SZ and DESC_SZ must match the padded sizes.
9695
assert!(

src/hyperlight_host/benches/benchmarks.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
#![expect(
18-
clippy::disallowed_macros,
19-
reason = "This is a benchmark file, so using disallowed macros is fine here."
20-
)]
21-
2217
use std::sync::{Arc, Barrier, Mutex};
2318
use std::thread;
2419
use std::time::{Duration, Instant};

src/hyperlight_host/clippy.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/hyperlight_host/examples/crashdump/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ limitations under the License.
7171
//!
7272
//! Core dump files are named `hl_core_<timestamp>.elf`.
7373
74-
#![allow(clippy::disallowed_macros)]
75-
7674
#[cfg(all(crashdump, target_os = "linux"))]
7775
use std::io::Write;
7876

src/hyperlight_host/examples/guest-debugging/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
#![allow(clippy::disallowed_macros)]
1716
use std::thread;
1817

1918
use hyperlight_host::sandbox::SandboxConfiguration;

src/hyperlight_host/examples/hello-world/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
#![allow(clippy::disallowed_macros)]
1716
use std::thread;
1817

1918
use hyperlight_host::{MultiUseSandbox, UninitializedSandbox};

src/hyperlight_host/examples/logging/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
#![allow(clippy::disallowed_macros)]
1716
extern crate hyperlight_host;
1817

1918
use std::sync::{Arc, Barrier};

0 commit comments

Comments
 (0)