Skip to content

Commit 8dc55e6

Browse files
committed
diff should not be neded any more
1 parent cbef948 commit 8dc55e6

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

rust-src.diff

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +0,0 @@
1-
diff --git a/library/core/tests/mem.rs b/library/core/tests/mem.rs
2-
index 5e24fa690ef52..5d0fedd4d9ccc 100644
3-
--- a/library/core/tests/mem.rs
4-
+++ b/library/core/tests/mem.rs
5-
@@ -1,5 +1,6 @@
6-
use core::mem::*;
7-
8-
+#[cfg(panic = "unwind")]
9-
use std::rc::Rc;
10-
11-
#[test]
12-
@@ -250,14 +251,19 @@ fn uninit_write_slice_cloned_mid_panic() {
13-
14-
#[test]
15-
fn uninit_write_slice_cloned_no_drop() {
16-
- let rc = Rc::new(());
17-
+ #[derive(Clone)]
18-
+ struct Bomb;
19-
+
20-
+ impl Drop for Bomb {
21-
+ fn drop(&mut self) {
22-
+ panic!("dropped a bomb! kaboom")
23-
+ }
24-
+ }
25-
26-
let mut dst = [MaybeUninit::uninit()];
27-
- let src = [rc.clone()];
28-
+ let src = [Bomb];
29-
30-
MaybeUninit::write_slice_cloned(&mut dst, &src);
31-
32-
- drop(src);
33-
-
34-
- assert_eq!(Rc::strong_count(&rc), 2);
35-
+ forget(src);
36-
}

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2020-12-19
1+
nightly-2020-12-21

0 commit comments

Comments
 (0)