Skip to content

Commit 124ffff

Browse files
committed
Update tests
1 parent 640b9b8 commit 124ffff

55 files changed

Lines changed: 530 additions & 292 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎tests/multi-file/defaulted_move_cross_tu/out/refcount/defaulted_move_cross_tu.rs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ impl S {
3636
}
3737
impl Default for S {
3838
fn default() -> Self {
39-
S {
40-
v: Rc::new(RefCell::new(Default::default())),
41-
n: Rc::new(RefCell::new((0..2).map(|_| 0_i32).collect::<Box<[i32]>>())),
39+
{
40+
S {
41+
v: Rc::new(RefCell::new(Default::default())),
42+
n: Rc::new(RefCell::new((0..2).map(|_| 0_i32).collect::<Box<[i32]>>())),
43+
}
4244
}
4345
}
4446
}

‎tests/multi-file/template_method_late_instantiation/out/refcount/template_method_late_instantiation.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct S_int_ {
1414
}
1515
impl Default for S_int_ {
1616
fn default() -> Self {
17-
S_int_ { x: 0 }
17+
{ S_int_ { x: 0 } }
1818
}
1919
}
2020
pub fn main() {

‎tests/multi-file/template_method_late_instantiation/out/unsafe/template_method_late_instantiation.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl S_int_ {
1818
}
1919
impl Default for S_int_ {
2020
fn default() -> Self {
21-
S_int_ { x: 0 }
21+
unsafe { S_int_ { x: 0 } }
2222
}
2323
}
2424
pub fn main() {

‎tests/unit/out/refcount/10_struct.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ impl Partial {
3838
}
3939
impl Default for Partial {
4040
fn default() -> Self {
41-
Partial {
42-
p: Ptr::<i32>::null(),
41+
{
42+
Partial {
43+
p: Ptr::<i32>::null(),
44+
}
4345
}
4446
}
4547
}

‎tests/unit/out/refcount/array_const_init.rs‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ pub struct S {
2020
}
2121
impl Default for S {
2222
fn default() -> Self {
23-
S {
24-
head: 0_i32,
25-
tail: Rc::new(RefCell::new((0..3).map(|_| 0_i32).collect::<Box<[i32]>>())),
26-
buf: Rc::new(RefCell::new((0..4).map(|_| 0_i8).collect::<Box<[i8]>>())),
23+
{
24+
S {
25+
head: 0_i32,
26+
tail: Rc::new(RefCell::new((0..3).map(|_| 0_i32).collect::<Box<[i32]>>())),
27+
buf: Rc::new(RefCell::new((0..4).map(|_| 0_i8).collect::<Box<[i8]>>())),
28+
}
2729
}
2830
}
2931
}

‎tests/unit/out/refcount/array_field_addr.rs‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ pub struct S {
1919
}
2020
impl Default for S {
2121
fn default() -> Self {
22-
S {
23-
before: 0_i32,
24-
mask: Rc::new(RefCell::new((0..4).map(|_| 0_u8).collect::<Box<[u8]>>())),
25-
after: 0_i32,
22+
{
23+
S {
24+
before: 0_i32,
25+
mask: Rc::new(RefCell::new((0..4).map(|_| 0_u8).collect::<Box<[u8]>>())),
26+
after: 0_i32,
27+
}
2628
}
2729
}
2830
}

‎tests/unit/out/refcount/array_of_noncopy_struct.rs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ pub struct NonCopy {
1717
}
1818
impl Default for NonCopy {
1919
fn default() -> Self {
20-
NonCopy {
21-
data: Rc::new(RefCell::new(Default::default())),
22-
tag: 0,
20+
{
21+
NonCopy {
22+
data: Rc::new(RefCell::new(Default::default())),
23+
tag: 0,
24+
}
2325
}
2426
}
2527
}

‎tests/unit/out/refcount/clone_vs_move.rs‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ pub struct Foo {
3232
}
3333
impl Default for Foo {
3434
fn default() -> Self {
35-
Foo {
36-
x: 0_i32,
37-
y: <Ptr<i32>>::default(),
38-
z: Ptr::<i32>::null(),
39-
a: Rc::new(RefCell::new((0..3).map(|_| 0_i32).collect::<Box<[i32]>>())),
40-
bar: <Bar>::default(),
35+
{
36+
Foo {
37+
x: 0_i32,
38+
y: <Ptr<i32>>::default(),
39+
z: Ptr::<i32>::null(),
40+
a: Rc::new(RefCell::new((0..3).map(|_| 0_i32).collect::<Box<[i32]>>())),
41+
bar: <Bar>::default(),
42+
}
4143
}
4244
}
4345
}

‎tests/unit/out/refcount/copy_assign.rs‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ pub struct Holder {
8181
}
8282
impl Default for Holder {
8383
fn default() -> Self {
84-
Holder {
85-
p: <Partial>::default(),
86-
arr: Rc::new(RefCell::new(
87-
(0..2)
88-
.map(|_| <Partial>::default())
89-
.collect::<Box<[Partial]>>(),
90-
)),
84+
{
85+
Holder {
86+
p: <Partial>::default(),
87+
arr: Rc::new(RefCell::new(
88+
(0..2)
89+
.map(|_| <Partial>::default())
90+
.collect::<Box<[Partial]>>(),
91+
)),
92+
}
9193
}
9294
}
9395
}

‎tests/unit/out/refcount/copy_ctor.rs‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ pub struct Holder {
101101
}
102102
impl Default for Holder {
103103
fn default() -> Self {
104-
Holder {
105-
c: <Counted>::default(),
106-
arr: Rc::new(RefCell::new(
107-
(0..2)
108-
.map(|_| <Counted>::default())
109-
.collect::<Box<[Counted]>>(),
110-
)),
104+
{
105+
Holder {
106+
c: <Counted>::default(),
107+
arr: Rc::new(RefCell::new(
108+
(0..2)
109+
.map(|_| <Counted>::default())
110+
.collect::<Box<[Counted]>>(),
111+
)),
112+
}
111113
}
112114
}
113115
}

0 commit comments

Comments
 (0)