Use deny(unsafe_code) instead of forbid(unsafe_code)

This commit is contained in:
Chen Chengjun
2024-05-22 17:46:27 +08:00
committed by Tate, Hongliang Tian
parent da3e279ac6
commit c02eacd50c
18 changed files with 18 additions and 18 deletions

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: MPL-2.0 // SPDX-License-Identifier: MPL-2.0
#![cfg_attr(not(test), no_std)] #![cfg_attr(not(test), no_std)]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
use core::{fmt::Debug, ops::Range}; use core::{fmt::Debug, ops::Range};

View File

@ -2,7 +2,7 @@
//! The std library of Asterinas. //! The std library of Asterinas.
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![allow(dead_code)] #![allow(dead_code)]
#![allow(incomplete_features)] #![allow(incomplete_features)]
#![allow(unused_variables)] #![allow(unused_variables)]

View File

@ -27,7 +27,7 @@
//! ``` //! ```
//! //!
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![feature(fn_traits)] #![feature(fn_traits)]
#![feature(step_trait)] #![feature(step_trait)]
#![allow(dead_code)] #![allow(dead_code)]

View File

@ -2,7 +2,7 @@
//! The console device of Asterinas. //! The console device of Asterinas.
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![feature(fn_traits)] #![feature(fn_traits)]
extern crate alloc; extern crate alloc;

View File

@ -2,7 +2,7 @@
//! The framebuffer of Asterinas. //! The framebuffer of Asterinas.
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![feature(strict_provenance)] #![feature(strict_provenance)]
extern crate alloc; extern crate alloc;

View File

@ -2,7 +2,7 @@
//! The input devices of Asterinas. //! The input devices of Asterinas.
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![feature(fn_traits)] #![feature(fn_traits)]
extern crate alloc; extern crate alloc;

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: MPL-2.0 // SPDX-License-Identifier: MPL-2.0
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![feature(trait_alias)] #![feature(trait_alias)]
#![feature(fn_traits)] #![feature(fn_traits)]
#![feature(linked_list_cursors)] #![feature(linked_list_cursors)]

View File

@ -2,7 +2,7 @@
//! The system time of Asterinas. //! The system time of Asterinas.
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
extern crate alloc; extern crate alloc;

View File

@ -2,7 +2,7 @@
//! The virtio of Asterinas. //! The virtio of Asterinas.
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![allow(dead_code)] #![allow(dead_code)]
#![feature(fn_traits)] #![feature(fn_traits)]

View File

@ -2,7 +2,7 @@
//! The util of Asterinas. //! The util of Asterinas.
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![feature(int_roundings)] #![feature(int_roundings)]
extern crate alloc; extern crate alloc;

View File

@ -5,7 +5,7 @@
#![feature(proc_macro_diagnostic)] #![feature(proc_macro_diagnostic)]
#![allow(dead_code)] #![allow(dead_code)]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
mod init_comp; mod init_comp;
mod priority; mod priority;

View File

@ -4,7 +4,7 @@
//! //!
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![feature(fn_traits)] #![feature(fn_traits)]
extern crate alloc; extern crate alloc;

View File

@ -16,7 +16,7 @@
//! ``` //! ```
#![cfg_attr(not(test), no_std)] #![cfg_attr(not(test), no_std)]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#![allow(dead_code)] #![allow(dead_code)]
extern crate alloc; extern crate alloc;

View File

@ -104,7 +104,7 @@
#![cfg_attr(not(test), no_std)] #![cfg_attr(not(test), no_std)]
#![feature(coerce_unsized)] #![feature(coerce_unsized)]
#![feature(unsize)] #![feature(unsize)]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
extern crate alloc; extern crate alloc;

View File

@ -2,7 +2,7 @@
#![no_std] #![no_std]
#![no_main] #![no_main]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
extern crate aster_frame; extern crate aster_frame;
use aster_frame::prelude::*; use aster_frame::prelude::*;

View File

@ -1,5 +1,5 @@
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
use aster_frame::prelude::*; use aster_frame::prelude::*;

View File

@ -1,5 +1,5 @@
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
#[macro_use] #[macro_use]
extern crate ktest; extern crate ktest;

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: MPL-2.0 // SPDX-License-Identifier: MPL-2.0
#![no_std] #![no_std]
#![forbid(unsafe_code)] #![deny(unsafe_code)]
use aster_frame::prelude::*; use aster_frame::prelude::*;