about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/test-utils
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2025-03-14 14:42:09 +0100
committerLukas Wirth <lukastw97@gmail.com>2025-03-17 12:29:19 +0100
commit65f73976bbc387b9ec09f7b7cb94aad600d8d114 (patch)
tree12d6792d6285360e0a727f2ae2ef04909db42ca8 /src/tools/rust-analyzer/crates/test-utils
parent4848b1bc89932080492116760128413d772b5ae7 (diff)
downloadrust-65f73976bbc387b9ec09f7b7cb94aad600d8d114.tar.gz
rust-65f73976bbc387b9ec09f7b7cb94aad600d8d114.zip
chore: Bump `Edition::CURRENT` to 2024
Diffstat (limited to 'src/tools/rust-analyzer/crates/test-utils')
-rw-r--r--src/tools/rust-analyzer/crates/test-utils/src/minicore.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs b/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs
index bf53e58d70c..4a2896ab148 100644
--- a/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs
+++ b/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs
@@ -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