mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 04:13:24 +00:00
Adjust for Rust unstable feature's stability change
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5c524348de
commit
ab1d931cb7
@ -69,20 +69,23 @@ impl PciDeviceLocation {
|
||||
|
||||
/// Returns an iterator that enumerates all possible PCI device locations.
|
||||
pub fn all() -> impl Iterator<Item = PciDeviceLocation> {
|
||||
iter::from_coroutine(|| {
|
||||
for bus in Self::MIN_BUS..=Self::MAX_BUS {
|
||||
for device in Self::MIN_DEVICE..=Self::MAX_DEVICE {
|
||||
for function in Self::MIN_FUNCTION..=Self::MAX_FUNCTION {
|
||||
let loc = PciDeviceLocation {
|
||||
bus,
|
||||
device,
|
||||
function,
|
||||
};
|
||||
yield loc;
|
||||
iter::from_coroutine(
|
||||
#[coroutine]
|
||||
|| {
|
||||
for bus in Self::MIN_BUS..=Self::MAX_BUS {
|
||||
for device in Self::MIN_DEVICE..=Self::MAX_DEVICE {
|
||||
for function in Self::MIN_FUNCTION..=Self::MAX_FUNCTION {
|
||||
let loc = PciDeviceLocation {
|
||||
bus,
|
||||
device,
|
||||
function,
|
||||
};
|
||||
yield loc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
/// The page table of all devices is the same. So we can use any device ID.
|
||||
|
@ -15,7 +15,6 @@
|
||||
#![feature(panic_info_message)]
|
||||
#![feature(ptr_sub_ptr)]
|
||||
#![feature(strict_provenance)]
|
||||
#![feature(pointer_is_aligned)]
|
||||
// The `generic_const_exprs` feature is incomplete however required for the page table
|
||||
// const generic implementation. We are using this feature in a conservative manner.
|
||||
#![allow(incomplete_features)]
|
||||
|
@ -30,7 +30,7 @@ use unwinding::{
|
||||
#[export_name = "__aster_panic_handler"]
|
||||
pub fn panic_handler(info: &core::panic::PanicInfo) -> ! {
|
||||
let throw_info = ktest::PanicInfo {
|
||||
message: info.message().unwrap().to_string(),
|
||||
message: info.message().to_string(),
|
||||
file: info.location().unwrap().file().to_string(),
|
||||
line: info.location().unwrap().line() as usize,
|
||||
col: info.location().unwrap().column() as usize,
|
||||
|
Reference in New Issue
Block a user