mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 19:33:23 +00:00
Use #[expect(lint)]
, not #[allow(lint)]
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
1899646391
commit
0dca168717
@ -5,7 +5,7 @@ pub mod credentials;
|
||||
mod exit;
|
||||
mod kill;
|
||||
pub mod posix_thread;
|
||||
#[allow(clippy::module_inception)]
|
||||
#[expect(clippy::module_inception)]
|
||||
mod process;
|
||||
mod process_filter;
|
||||
pub mod process_table;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use ostd::{cpu::CpuSet, sync::RwArc, task::Task, user::UserSpace};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use intrusive_collections::{intrusive_adapter, LinkedList, LinkedListAtomicLink};
|
||||
use ostd::{
|
||||
@ -382,7 +382,7 @@ impl FutexKey {
|
||||
// The implementation is from occlum
|
||||
|
||||
#[derive(PartialEq, Debug, Clone, Copy)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[expect(non_camel_case_types)]
|
||||
pub enum FutexOp {
|
||||
FUTEX_WAIT = 0,
|
||||
FUTEX_WAKE = 1,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use super::{Pid, Process};
|
||||
use crate::{
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(unused_variables)]
|
||||
#![expect(unused_variables)]
|
||||
|
||||
use ostd::sync::WaitQueue;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use super::{Pgid, Pid};
|
||||
use crate::prelude::*;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
//! A global table stores the pid to process mapping.
|
||||
//! This table can be used to get process with pid.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
@ -14,7 +14,7 @@ use crate::prelude::*;
|
||||
/// > about the environment in which it is operating. The form of this information
|
||||
/// > is a table of key-value pairs, where the keys are from the set of ‘AT_’
|
||||
/// > values in elf.h.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[expect(non_camel_case_types)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
#[repr(u8)]
|
||||
pub enum AuxKey {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
//! The init stack for the process.
|
||||
//! The init stack is used to store the `argv` and `envp` and auxiliary vectors.
|
||||
|
@ -165,23 +165,23 @@ impl ElfHeader {
|
||||
pub struct HeaderPt2_64 {
|
||||
pub type_: Type_,
|
||||
pub machine: Machine_,
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
pub version: u32,
|
||||
pub entry_point: u64,
|
||||
pub ph_offset: u64,
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
pub sh_offset: u64,
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
pub flags: u32,
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
pub header_size: u16,
|
||||
pub ph_entry_size: u16,
|
||||
pub ph_count: u16,
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
pub sh_entry_size: u16,
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
pub sh_count: u16,
|
||||
#[allow(dead_code)]
|
||||
#[expect(dead_code)]
|
||||
pub sh_str_index: u16,
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
//! This module is used to parse elf file content to get elf_load_info.
|
||||
//! When create a process from elf file, we will use the elf_load_info to construct the VmSpace
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// FIXME: The resource limits should be respected by the corresponding subsystems of the kernel.
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![expect(non_camel_case_types)]
|
||||
|
||||
use super::process_vm::{INIT_STACK_SIZE, USER_HEAP_SIZE_LIMIT};
|
||||
use crate::prelude::*;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![expect(dead_code)]
|
||||
#![expect(non_camel_case_types)]
|
||||
|
||||
use core::mem::{self, size_of};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
/// Standard signals
|
||||
pub(super) const MIN_STD_SIG_NUM: u8 = 1;
|
||||
|
@ -135,7 +135,7 @@ pub fn handle_pending_signal(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[expect(clippy::too_many_arguments)]
|
||||
pub fn handle_user_signal(
|
||||
ctx: &Context,
|
||||
sig_num: SigNum,
|
||||
|
@ -84,7 +84,7 @@ impl<T: Into<SigSet>> ops::BitOrAssign<T> for SigSet {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::suspicious_arithmetic_impl)]
|
||||
#[expect(clippy::suspicious_arithmetic_impl)]
|
||||
impl<T: Into<SigSet>> ops::Add<T> for SigSet {
|
||||
type Output = Self;
|
||||
|
||||
@ -95,7 +95,7 @@ impl<T: Into<SigSet>> ops::Add<T> for SigSet {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::suspicious_op_assign_impl)]
|
||||
#[expect(clippy::suspicious_op_assign_impl)]
|
||||
impl<T: Into<SigSet>> ops::AddAssign<T> for SigSet {
|
||||
fn add_assign(&mut self, rhs: T) {
|
||||
self.bits |= rhs.into().bits;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use core::sync::atomic::{AtomicU8, Ordering};
|
||||
|
||||
|
@ -25,7 +25,7 @@ bitflags! {
|
||||
}
|
||||
|
||||
#[repr(u8)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[expect(non_camel_case_types)]
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||
pub enum SigStackStatus {
|
||||
#[default]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use super::Signal;
|
||||
use crate::process::{
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
#![expect(dead_code)]
|
||||
#![expect(unused_variables)]
|
||||
|
||||
use alloc::sync::Arc;
|
||||
use core::time::Duration;
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
mod condvar;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[expect(unused_imports)]
|
||||
pub use self::condvar::{Condvar, LockErr};
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![expect(dead_code)]
|
||||
|
||||
use super::{process_filter::ProcessFilter, signal::constants::SIGCHLD, ExitCode, Pid, Process};
|
||||
use crate::{
|
||||
|
Reference in New Issue
Block a user