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)]
|
||||
#![no_std]
|
||||
// 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)]
|
||||
#![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 event;
|
||||
pub mod ext;
|
||||
pub mod hash_table;
|
||||
pub mod io;
|
||||
pub mod lru_hash_table;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#![cfg_attr(test, allow(unused_imports))]
|
||||
#![allow(clippy::new_without_default)]
|
||||
#![feature(
|
||||
option_get_or_try_insert_with,
|
||||
async_fn_traits,
|
||||
new_range_api,
|
||||
associated_type_defaults,
|
||||
@@ -11,7 +12,6 @@
|
||||
never_type,
|
||||
allocator_api,
|
||||
trait_alias,
|
||||
if_let_guard,
|
||||
arbitrary_self_types,
|
||||
slice_split_once,
|
||||
arbitrary_self_types_pointers,
|
||||
|
||||
@@ -6,10 +6,7 @@ use alloc::{
|
||||
sync::{Arc, Weak},
|
||||
vec::Vec,
|
||||
};
|
||||
use libk_util::{
|
||||
ext::OptionExt,
|
||||
sync::{IrqSafeSpinlock, spin_rwlock::IrqSafeRwLock},
|
||||
};
|
||||
use libk_util::sync::{IrqSafeSpinlock, spin_rwlock::IrqSafeRwLock};
|
||||
use traits::HardlinkImpl;
|
||||
use yggdrasil_abi::{
|
||||
bitflags,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use core::mem::MaybeUninit;
|
||||
|
||||
use libk_util::ext::OptionExt;
|
||||
use yggdrasil_abi::{
|
||||
error::Error,
|
||||
io::{DirectoryEntry, FileMetadataUpdate, FileMode, GroupId, OpenOptions, UserId},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! osdev-x kernel crate
|
||||
#![feature(
|
||||
if_let_guard,
|
||||
step_trait,
|
||||
decl_macro,
|
||||
optimize_attribute,
|
||||
|
||||
@@ -134,6 +134,7 @@ impl<'e> CargoBuilder<'e> {
|
||||
command.args([
|
||||
"-Z",
|
||||
"build-std=core,alloc,compiler_builtins",
|
||||
"-Zjson-target-spec",
|
||||
"-Zunstable-options",
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user