maint: update rustc to 1.95.0-nightly
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#![feature(const_trait_impl, if_let_guard)]
|
#![feature(const_trait_impl)]
|
||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#![feature(if_let_guard, impl_trait_in_assoc_type)]
|
#![feature(impl_trait_in_assoc_type)]
|
||||||
#![cfg_attr(not(test), no_std)]
|
#![cfg_attr(not(test), no_std)]
|
||||||
#![allow(clippy::new_ret_no_self)]
|
#![allow(clippy::new_ret_no_self)]
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
//! Extensions to core types
|
|
||||||
|
|
||||||
pub trait OptionExt<T> {
|
|
||||||
fn get_or_try_insert_with<E, F: FnOnce() -> Result<T, E>>(
|
|
||||||
&mut self,
|
|
||||||
init: F,
|
|
||||||
) -> Result<&mut T, E>;
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<T> OptionExt<T> for Option<T> {
|
|
||||||
fn get_or_try_insert_with<E, F: FnOnce() -> Result<T, E>>(
|
|
||||||
&mut self,
|
|
||||||
init: F,
|
|
||||||
) -> Result<&mut T, E> {
|
|
||||||
match self {
|
|
||||||
Self::None => Ok(self.insert(init()?)),
|
|
||||||
Self::Some(value) => Ok(value),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -18,7 +18,6 @@ use core::{
|
|||||||
|
|
||||||
pub mod bit;
|
pub mod bit;
|
||||||
pub mod event;
|
pub mod event;
|
||||||
pub mod ext;
|
|
||||||
pub mod hash_table;
|
pub mod hash_table;
|
||||||
pub mod io;
|
pub mod io;
|
||||||
pub mod lru_hash_table;
|
pub mod lru_hash_table;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#![cfg_attr(test, allow(unused_imports))]
|
#![cfg_attr(test, allow(unused_imports))]
|
||||||
#![allow(clippy::new_without_default)]
|
#![allow(clippy::new_without_default)]
|
||||||
#![feature(
|
#![feature(
|
||||||
|
option_get_or_try_insert_with,
|
||||||
async_fn_traits,
|
async_fn_traits,
|
||||||
new_range_api,
|
new_range_api,
|
||||||
associated_type_defaults,
|
associated_type_defaults,
|
||||||
@@ -11,7 +12,6 @@
|
|||||||
never_type,
|
never_type,
|
||||||
allocator_api,
|
allocator_api,
|
||||||
trait_alias,
|
trait_alias,
|
||||||
if_let_guard,
|
|
||||||
arbitrary_self_types,
|
arbitrary_self_types,
|
||||||
slice_split_once,
|
slice_split_once,
|
||||||
arbitrary_self_types_pointers,
|
arbitrary_self_types_pointers,
|
||||||
|
|||||||
@@ -6,10 +6,7 @@ use alloc::{
|
|||||||
sync::{Arc, Weak},
|
sync::{Arc, Weak},
|
||||||
vec::Vec,
|
vec::Vec,
|
||||||
};
|
};
|
||||||
use libk_util::{
|
use libk_util::sync::{IrqSafeSpinlock, spin_rwlock::IrqSafeRwLock};
|
||||||
ext::OptionExt,
|
|
||||||
sync::{IrqSafeSpinlock, spin_rwlock::IrqSafeRwLock},
|
|
||||||
};
|
|
||||||
use traits::HardlinkImpl;
|
use traits::HardlinkImpl;
|
||||||
use yggdrasil_abi::{
|
use yggdrasil_abi::{
|
||||||
bitflags,
|
bitflags,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
use core::mem::MaybeUninit;
|
use core::mem::MaybeUninit;
|
||||||
|
|
||||||
use libk_util::ext::OptionExt;
|
|
||||||
use yggdrasil_abi::{
|
use yggdrasil_abi::{
|
||||||
error::Error,
|
error::Error,
|
||||||
io::{DirectoryEntry, FileMetadataUpdate, FileMode, GroupId, OpenOptions, UserId},
|
io::{DirectoryEntry, FileMetadataUpdate, FileMode, GroupId, OpenOptions, UserId},
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
//! osdev-x kernel crate
|
//! osdev-x kernel crate
|
||||||
#![feature(
|
#![feature(
|
||||||
if_let_guard,
|
|
||||||
step_trait,
|
step_trait,
|
||||||
decl_macro,
|
decl_macro,
|
||||||
optimize_attribute,
|
optimize_attribute,
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ impl<'e> CargoBuilder<'e> {
|
|||||||
command.args([
|
command.args([
|
||||||
"-Z",
|
"-Z",
|
||||||
"build-std=core,alloc,compiler_builtins",
|
"build-std=core,alloc,compiler_builtins",
|
||||||
|
"-Zjson-target-spec",
|
||||||
"-Zunstable-options",
|
"-Zunstable-options",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user