@@ -33,15 +33,6 @@ pub fn test_move_array_into_recv(a: [D; 3], recv: &mut [D; 3]) {
33
33
* recv = a;
34
34
}
35
35
36
- #[ rustc_move_fragments]
37
- pub fn test_extract_array_elem ( a : [ D ; 3 ] , i : usize ) -> D {
38
- //~^ ERROR parent_of_fragments: `$(local a)`
39
- //~| ERROR assigned_leaf_path: `$(local i)`
40
- //~| ERROR moved_leaf_path: `$(local a).[]`
41
- //~| ERROR unmoved_fragment: `$(allbutone $(local a).[])`
42
- a[ i]
43
- }
44
-
45
36
#[ rustc_move_fragments]
46
37
pub fn test_overwrite_array_elem ( mut a : [ D ; 3 ] , i : usize , d : D ) {
47
38
//~^ ERROR parent_of_fragments: `$(local mut a)`
@@ -53,48 +44,4 @@ pub fn test_overwrite_array_elem(mut a: [D; 3], i: usize, d: D) {
53
44
a[ i] = d;
54
45
}
55
46
56
- // FIXME (pnkfelix): Both test_move_array_then_overwrite_elem1 and
57
- // test_move_array_then_overwrite_elem2 illustrate a behavior that
58
- // we need to make illegal if we want to get rid of drop-flags.
59
- // See RFC PR 320 for more discussion.
60
-
61
- #[ rustc_move_fragments]
62
- pub fn test_move_array_then_overwrite_elem1 ( mut a : [ D ; 3 ] , i : usize , recv : & mut [ D ; 3 ] , d : D ) {
63
- //~^ ERROR parent_of_fragments: `$(local mut a)`
64
- //~| ERROR parent_of_fragments: `$(local recv)`
65
- //~| ERROR assigned_leaf_path: `$(local recv).*`
66
- //~| ERROR assigned_leaf_path: `$(local i)`
67
- //~| ERROR assigned_leaf_path: `$(local d)`
68
- //~| ERROR moved_leaf_path: `$(local d)`
69
- //~| ERROR assigned_leaf_path: `$(local mut a).[]`
70
- //~| ERROR unmoved_fragment: `$(allbutone $(local mut a).[])`
71
-
72
- // This test covers the case where the array contents have been all moved away, but
73
- // we still need to deal with new initializing writes into the array.
74
- * recv = a;
75
- a[ i] = d;
76
- }
77
-
78
- #[ rustc_move_fragments]
79
- pub fn test_move_array_then_overwrite_elem2 ( mut a : [ D ; 3 ] , i : usize , j : usize ,
80
- recv : & mut [ D ; 3 ] , d1 : D , d2 : D ) {
81
- //~^^ ERROR parent_of_fragments: `$(local mut a)`
82
- //~| ERROR parent_of_fragments: `$(local recv)`
83
- //~| ERROR assigned_leaf_path: `$(local recv).*`
84
- //~| ERROR assigned_leaf_path: `$(local i)`
85
- //~| ERROR assigned_leaf_path: `$(local j)`
86
- //~| ERROR assigned_leaf_path: `$(local d1)`
87
- //~| ERROR assigned_leaf_path: `$(local d2)`
88
- //~| ERROR moved_leaf_path: `$(local d1)`
89
- //~| ERROR moved_leaf_path: `$(local d2)`
90
- //~| ERROR assigned_leaf_path: `$(local mut a).[]`
91
- //~| ERROR unmoved_fragment: `$(allbutone $(local mut a).[])`
92
-
93
- // This test covers the case where the array contents have been all moved away, but
94
- // we still need to deal with new initializing writes into the array.
95
- * recv = a;
96
- a[ i] = d1;
97
- a[ j] = d2;
98
- }
99
-
100
47
pub fn main ( ) { }
0 commit comments