]> git.lizzy.rs Git - rust.git/blobdiff - crates/test_utils/src/minicore.rs
fix: Do not complete `Drop::drop`, complete `std::mem::drop` instead
[rust.git] / crates / test_utils / src / minicore.rs
index 8801567fa5d7f91185e1b8cd11bc6aad455bae22..5c63e27879d02f799c0fb5252cc0d360d3e0a104 100644 (file)
@@ -36,6 +36,7 @@
 //!     bool_impl: option, fn
 //!     add:
 //!     as_ref: sized
+//!     drop:
 
 pub mod marker {
     // region:sized
@@ -118,7 +119,6 @@ pub trait Clone: Sized {
 }
 // endregion:clone
 
-
 pub mod convert {
     // region:from
     pub trait From<T>: Sized {
@@ -195,6 +195,13 @@ pub trait DerefMut: Deref {
     };
     // endregion:deref
 
+    // region:drop
+    #[lang = "drop"]
+    pub trait Drop {
+        fn drop(&mut self);
+    }
+    // endregion:drop
+
     // region:index
     mod index {
         #[lang = "index"]
@@ -237,6 +244,12 @@ unsafe impl<T> SliceIndex<[T]> for usize {
     pub use self::index::{Index, IndexMut};
     // endregion:index
 
+    // region:drop
+    pub mod mem {
+        pub fn drop<T>(_x: T) {}
+    }
+    // endregion:drop
+
     // region:range
     mod range {
         #[lang = "RangeFull"]
@@ -620,13 +633,15 @@ pub mod v1 {
             clone::Clone,                       // :clone
             cmp::{Eq, PartialEq},               // :eq
             cmp::{Ord, PartialOrd},             // :ord
-            convert::{From, Into},              // :from
             convert::AsRef,                     // :as_ref
+            convert::{From, Into},              // :from
             default::Default,                   // :default
             iter::{IntoIterator, Iterator},     // :iterator
             macros::builtin::derive,            // :derive
             marker::Copy,                       // :copy
             marker::Sized,                      // :sized
+            mem::drop,                          // :drop
+            ops::Drop,                          // :drop
             ops::{Fn, FnMut, FnOnce},           // :fn
             option::Option::{self, None, Some}, // :option
             result::Result::{self, Err, Ok},    // :result