about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-06 12:09:45 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-03-07 19:11:13 +0000
commit701bedc323b0314ef6f084ba98ed18327faa36bc (patch)
tree447ae293e9cb286685c766c2c2c3ef0593428d55 /library/alloc/src
parentbe1e0b786df35a535327ed3b1457622e357bae6d (diff)
downloadrust-701bedc323b0314ef6f084ba98ed18327faa36bc.tar.gz
rust-701bedc323b0314ef6f084ba98ed18327faa36bc.zip
Move last remaining Rc test to alloctests
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/rc.rs (renamed from library/alloc/src/rc/mod.rs)3
-rw-r--r--library/alloc/src/rc/tests.rs15
2 files changed, 0 insertions, 18 deletions
diff --git a/library/alloc/src/rc/mod.rs b/library/alloc/src/rc.rs
index 09206c2f8b2..2a4d4f26444 100644
--- a/library/alloc/src/rc/mod.rs
+++ b/library/alloc/src/rc.rs
@@ -276,9 +276,6 @@ use crate::string::String;
 #[cfg(not(no_global_oom_handling))]
 use crate::vec::Vec;
 
-#[cfg(test)]
-mod tests;
-
 // This is repr(C) to future-proof against possible field-reordering, which
 // would interfere with otherwise safe [into|from]_raw() of transmutable
 // inner types.
diff --git a/library/alloc/src/rc/tests.rs b/library/alloc/src/rc/tests.rs
deleted file mode 100644
index 35ff6b7d570..00000000000
--- a/library/alloc/src/rc/tests.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-use super::*;
-
-#[test]
-fn is_unique() {
-    let x = Rc::new(3);
-    assert!(Rc::is_unique(&x));
-    let y = x.clone();
-    assert!(!Rc::is_unique(&x));
-    drop(y);
-    assert!(Rc::is_unique(&x));
-    let w = Rc::downgrade(&x);
-    assert!(!Rc::is_unique(&x));
-    drop(w);
-    assert!(Rc::is_unique(&x));
-}