mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-25 09:27:43 +00:00
chore: Bump Edition::CURRENT to 2024
This commit is contained in:
parent
23e8d13531
commit
a505420751
24 changed files with 277 additions and 244 deletions
|
|
@ -423,10 +423,12 @@ pub mod ptr {
|
|||
unsafe { drop_in_place(to_drop) }
|
||||
}
|
||||
pub const unsafe fn read<T>(src: *const T) -> T {
|
||||
*src
|
||||
unsafe { *src }
|
||||
}
|
||||
pub const unsafe fn write<T>(dst: *mut T, src: T) {
|
||||
*dst = src;
|
||||
unsafe {
|
||||
*dst = src;
|
||||
}
|
||||
}
|
||||
// endregion:drop
|
||||
|
||||
|
|
@ -1480,9 +1482,9 @@ pub mod iter {
|
|||
}
|
||||
}
|
||||
}
|
||||
pub use self::repeat::{repeat, Repeat};
|
||||
pub use self::repeat::{Repeat, repeat};
|
||||
}
|
||||
pub use self::sources::{repeat, Repeat};
|
||||
pub use self::sources::{Repeat, repeat};
|
||||
// endregion:iterators
|
||||
|
||||
mod traits {
|
||||
|
|
@ -1811,11 +1813,7 @@ pub mod num {
|
|||
#[lang = "bool"]
|
||||
impl bool {
|
||||
pub fn then<T, F: FnOnce() -> T>(self, f: F) -> Option<T> {
|
||||
if self {
|
||||
Some(f())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if self { Some(f()) } else { None }
|
||||
}
|
||||
}
|
||||
// endregion:bool_impl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue