Skip to content
Snippets Groups Projects
Verified Commit d2463086 authored by Vincent Lafeychine's avatar Vincent Lafeychine
Browse files

chore(analysis): Update test_cases from upstream

parent 75ba1933
No related branches found
No related tags found
1 merge request!39Update dependencies
Showing
with 269 additions and 163 deletions
...@@ -438,7 +438,7 @@ Result for function main(): ...@@ -438,7 +438,7 @@ Result for function main():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_1) -> bb6", "terminator: drop(_1) -> [return: bb6, unwind terminate(cleanup)]",
{ {
"bb6": [ "bb6": [
"state:", "state:",
......
#![allow(dropping_references)]
#[derive(Clone, Default)] #[derive(Clone, Default)]
struct T { struct T {
// Wrap in Box to have non-Copy types // Wrap in Box to have non-Copy types
......
...@@ -589,30 +589,51 @@ Result for function main(): ...@@ -589,30 +589,51 @@ Result for function main():
"_11" "_11"
] ]
}, },
"terminator: replace((_1.0: std::boxed::Box<u32>) <- move _11) -> [return: bb6, unwind: bb11]", "terminator: drop((_1.0: std::boxed::Box<u32>)) -> [return: bb6, unwind: bb7]",
{ {
"bb11": [
"state:",
{
"accessible": [],
"owned": []
}
],
"bb6": [ "bb6": [
"state:", "state:",
{ {
"accessible": [ "accessible": [
"_1" "(_1.1: std::boxed::Box<u32>)",
"(_1.2: std::boxed::Box<u32>)",
"_11"
], ],
"owned": [ "owned": [
"_1" "(_1.1: std::boxed::Box<u32>)",
"(_1.2: std::boxed::Box<u32>)",
"_11"
] ]
} }
],
"bb7": [
"state:",
{
"accessible": [],
"owned": []
}
] ]
} }
], ],
"bb6": [ "bb6": [
[], [
[
"state:",
{
"accessible": [
"(_1.1: std::boxed::Box<u32>)",
"(_1.2: std::boxed::Box<u32>)",
"_11"
],
"owned": [
"(_1.1: std::boxed::Box<u32>)",
"(_1.2: std::boxed::Box<u32>)",
"_11"
]
},
"statement: (_1.0: std::boxed::Box<u32>) = move _11"
]
],
"state before terminator:", "state before terminator:",
{ {
"accessible": [ "accessible": [
...@@ -622,7 +643,7 @@ Result for function main(): ...@@ -622,7 +643,7 @@ Result for function main():
"_1" "_1"
] ]
}, },
"terminator: drop(_11) -> [return: bb7, unwind: bb13]", "terminator: drop(_11) -> [return: bb8, unwind: bb13]",
{ {
"bb13": [ "bb13": [
"state:", "state:",
...@@ -631,7 +652,7 @@ Result for function main(): ...@@ -631,7 +652,7 @@ Result for function main():
"owned": [] "owned": []
} }
], ],
"bb7": [ "bb8": [
"state:", "state:",
{ {
"accessible": [ "accessible": [
...@@ -645,6 +666,41 @@ Result for function main(): ...@@ -645,6 +666,41 @@ Result for function main():
} }
], ],
"bb7": [ "bb7": [
[
[
"state:",
{
"accessible": [],
"owned": []
},
"statement: (_1.0: std::boxed::Box<u32>) = move _11"
]
],
"state before terminator:",
{
"accessible": [
"(_1.0: std::boxed::Box<u32>)"
],
"owned": [
"(_1.0: std::boxed::Box<u32>)"
]
},
"terminator: drop(_11) -> [return: bb13, unwind terminate(cleanup)]",
{
"bb13": [
"state:",
{
"accessible": [
"(_1.0: std::boxed::Box<u32>)"
],
"owned": [
"(_1.0: std::boxed::Box<u32>)"
]
}
]
}
],
"bb8": [
[ [
[ [
"state:", "state:",
...@@ -704,16 +760,16 @@ Result for function main(): ...@@ -704,16 +760,16 @@ Result for function main():
"_13" "_13"
] ]
}, },
"terminator: _12 = std::mem::drop::<T>(move _13) -> [return: bb8, unwind: bb10]", "terminator: _12 = std::mem::drop::<T>(move _13) -> [return: bb9, unwind: bb11]",
{ {
"bb10": [ "bb11": [
"state:", "state:",
{ {
"accessible": [], "accessible": [],
"owned": [] "owned": []
} }
], ],
"bb8": [ "bb9": [
"state:", "state:",
{ {
"accessible": [ "accessible": [
...@@ -726,7 +782,7 @@ Result for function main(): ...@@ -726,7 +782,7 @@ Result for function main():
] ]
} }
], ],
"bb8": [ "bb9": [
[ [
[ [
"state:", "state:",
...@@ -806,16 +862,9 @@ Result for function main(): ...@@ -806,16 +862,9 @@ Result for function main():
"_0" "_0"
] ]
}, },
"terminator: drop(_1) -> [return: bb9, unwind: bb14]", "terminator: drop(_1) -> [return: bb10, unwind: bb14]",
{ {
"bb14": [ "bb10": [
"state:",
{
"accessible": [],
"owned": []
}
],
"bb9": [
"state:", "state:",
{ {
"accessible": [ "accessible": [
...@@ -825,10 +874,17 @@ Result for function main(): ...@@ -825,10 +874,17 @@ Result for function main():
"_0" "_0"
] ]
} }
],
"bb14": [
"state:",
{
"accessible": [],
"owned": []
}
] ]
} }
], ],
"bb9": [ "bb10": [
[ [
[ [
"state:", "state:",
...@@ -855,24 +911,6 @@ Result for function main(): ...@@ -855,24 +911,6 @@ Result for function main():
"terminator: return", "terminator: return",
{} {}
], ],
"bb10": [
[],
"state before terminator:",
{
"accessible": [],
"owned": []
},
"terminator: drop(_13) -> bb13",
{
"bb13": [
"state:",
{
"accessible": [],
"owned": []
}
]
}
],
"bb11": [ "bb11": [
[], [],
"state before terminator:", "state before terminator:",
...@@ -880,7 +918,7 @@ Result for function main(): ...@@ -880,7 +918,7 @@ Result for function main():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_11) -> bb13", "terminator: drop(_13) -> [return: bb13, unwind terminate(cleanup)]",
{ {
"bb13": [ "bb13": [
"state:", "state:",
...@@ -898,7 +936,7 @@ Result for function main(): ...@@ -898,7 +936,7 @@ Result for function main():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_3) -> bb13", "terminator: drop(_3) -> [return: bb13, unwind terminate(cleanup)]",
{ {
"bb13": [ "bb13": [
"state:", "state:",
...@@ -916,7 +954,7 @@ Result for function main(): ...@@ -916,7 +954,7 @@ Result for function main():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_1) -> bb14", "terminator: drop(_1) -> [return: bb14, unwind terminate(cleanup)]",
{ {
"bb14": [ "bb14": [
"state:", "state:",
......
struct InfiniteList { struct InfiniteList {
val: u32, val: u32,
next: Box<InfiniteList> next: Box<InfiniteList>,
} }
#[analyzer::run] #[analyzer::run]
......
...@@ -164,7 +164,7 @@ Result for function test1(): ...@@ -164,7 +164,7 @@ Result for function test1():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_1) -> bb4", "terminator: drop(_1) -> [return: bb4, unwind terminate(cleanup)]",
{ {
"bb4": [ "bb4": [
"state:", "state:",
...@@ -228,20 +228,20 @@ Result for function test2(): ...@@ -228,20 +228,20 @@ Result for function test2():
"_2" "_2"
] ]
}, },
"terminator: replace(_1 <- move _2) -> [return: bb1, unwind: bb4]", "terminator: drop(_1) -> [return: bb1, unwind: bb2]",
{ {
"bb1": [ "bb1": [
"state:", "state:",
{ {
"accessible": [ "accessible": [
"_1" "_2"
], ],
"owned": [ "owned": [
"_1" "_2"
] ]
} }
], ],
"bb4": [ "bb2": [
"state:", "state:",
{ {
"accessible": [], "accessible": [],
...@@ -251,7 +251,20 @@ Result for function test2(): ...@@ -251,7 +251,20 @@ Result for function test2():
} }
], ],
"bb1": [ "bb1": [
[], [
[
"state:",
{
"accessible": [
"_2"
],
"owned": [
"_2"
]
},
"statement: _1 = move _2"
]
],
"state before terminator:", "state before terminator:",
{ {
"accessible": [ "accessible": [
...@@ -261,9 +274,9 @@ Result for function test2(): ...@@ -261,9 +274,9 @@ Result for function test2():
"_1" "_1"
] ]
}, },
"terminator: drop(_2) -> [return: bb2, unwind: bb5]", "terminator: drop(_2) -> [return: bb3, unwind: bb5]",
{ {
"bb2": [ "bb3": [
"state:", "state:",
{ {
"accessible": [ "accessible": [
...@@ -284,6 +297,41 @@ Result for function test2(): ...@@ -284,6 +297,41 @@ Result for function test2():
} }
], ],
"bb2": [ "bb2": [
[
[
"state:",
{
"accessible": [],
"owned": []
},
"statement: _1 = move _2"
]
],
"state before terminator:",
{
"accessible": [
"_1"
],
"owned": [
"_1"
]
},
"terminator: drop(_2) -> [return: bb5, unwind terminate(cleanup)]",
{
"bb5": [
"state:",
{
"accessible": [
"_1"
],
"owned": [
"_1"
]
}
]
}
],
"bb3": [
[ [
[ [
"state:", "state:",
...@@ -321,9 +369,9 @@ Result for function test2(): ...@@ -321,9 +369,9 @@ Result for function test2():
"_1" "_1"
] ]
}, },
"terminator: drop(_1) -> [return: bb3, unwind: bb6]", "terminator: drop(_1) -> [return: bb4, unwind: bb6]",
{ {
"bb3": [ "bb4": [
"state:", "state:",
{ {
"accessible": [ "accessible": [
...@@ -343,7 +391,7 @@ Result for function test2(): ...@@ -343,7 +391,7 @@ Result for function test2():
] ]
} }
], ],
"bb3": [ "bb4": [
[], [],
"state before terminator:", "state before terminator:",
{ {
...@@ -357,24 +405,6 @@ Result for function test2(): ...@@ -357,24 +405,6 @@ Result for function test2():
"terminator: return", "terminator: return",
{} {}
], ],
"bb4": [
[],
"state before terminator:",
{
"accessible": [],
"owned": []
},
"terminator: drop(_2) -> bb5",
{
"bb5": [
"state:",
{
"accessible": [],
"owned": []
}
]
}
],
"bb5": [ "bb5": [
[], [],
"state before terminator:", "state before terminator:",
...@@ -382,7 +412,7 @@ Result for function test2(): ...@@ -382,7 +412,7 @@ Result for function test2():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_1) -> bb6", "terminator: drop(_1) -> [return: bb6, unwind terminate(cleanup)]",
{ {
"bb6": [ "bb6": [
"state:", "state:",
......
...@@ -939,7 +939,7 @@ Result for function main(): ...@@ -939,7 +939,7 @@ Result for function main():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_16) -> bb10", "terminator: drop(_16) -> [return: bb10, unwind terminate(cleanup)]",
{ {
"bb10": [ "bb10": [
"state:", "state:",
...@@ -957,7 +957,7 @@ Result for function main(): ...@@ -957,7 +957,7 @@ Result for function main():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_1) -> bb12", "terminator: drop(_1) -> [return: bb12, unwind terminate(cleanup)]",
{ {
"bb12": [ "bb12": [
"state:", "state:",
...@@ -975,7 +975,7 @@ Result for function main(): ...@@ -975,7 +975,7 @@ Result for function main():
"accessible": [], "accessible": [],
"owned": [] "owned": []
}, },
"terminator: drop(_2) -> bb12", "terminator: drop(_2) -> [return: bb12, unwind terminate(cleanup)]",
{ {
"bb12": [ "bb12": [
"state:", "state:",
......
fn main() { fn main() {
let a = abs(-1); let a = abs(-1);
let b = abs(1); let b = abs(1);
println!("{}", a+b); println!("{}", a + b);
} }
#[analyzer::run] #[analyzer::run]
...@@ -10,9 +9,8 @@ fn abs(x: i32) -> i32 { ...@@ -10,9 +9,8 @@ fn abs(x: i32) -> i32 {
let res: i32; let res: i32;
if x >= 0 { if x >= 0 {
res = x; res = x;
} } else {
else {
res = -x; res = -x;
} }
return res; return res;
} }
\ No newline at end of file
...@@ -45,14 +45,6 @@ Result for function abs(): ...@@ -45,14 +45,6 @@ Result for function abs():
"_6" "_6"
], ],
"statement: _5 = Ge(move _6, const 0_i32)" "statement: _5 = Ge(move _6, const 0_i32)"
],
[
"state:",
[
"_1",
"_5"
],
"statement: StorageDead(_6)"
] ]
], ],
"state before terminator:", "state before terminator:",
...@@ -60,7 +52,7 @@ Result for function abs(): ...@@ -60,7 +52,7 @@ Result for function abs():
"_1", "_1",
"_5" "_5"
], ],
"terminator: switchInt(move _5) -> [false: bb2, otherwise: bb1]", "terminator: switchInt(move _5) -> [0: bb2, otherwise: bb1]",
{ {
"bb1": [ "bb1": [
"state:", "state:",
...@@ -78,6 +70,13 @@ Result for function abs(): ...@@ -78,6 +70,13 @@ Result for function abs():
], ],
"bb1": [ "bb1": [
[ [
[
"state:",
[
"_1"
],
"statement: StorageDead(_6)"
],
[ [
"state:", "state:",
[ [
...@@ -137,6 +136,13 @@ Result for function abs(): ...@@ -137,6 +136,13 @@ Result for function abs():
], ],
"bb2": [ "bb2": [
[ [
[
"state:",
[
"_1"
],
"statement: StorageDead(_6)"
],
[ [
"state:", "state:",
[ [
......
#![allow(dropping_copy_types)]
#[analyzer::run] #[analyzer::run]
fn main() { fn main() {
let x = [1, 2, 3]; let x = [1, 2, 3];
......
...@@ -284,7 +284,7 @@ Result for function main(): ...@@ -284,7 +284,7 @@ Result for function main():
[], [],
"state before terminator:", "state before terminator:",
[], [],
"terminator: drop(_7) -> bb7", "terminator: drop(_7) -> [return: bb7, unwind terminate(cleanup)]",
{ {
"bb7": [ "bb7": [
"state:", "state:",
...@@ -296,7 +296,7 @@ Result for function main(): ...@@ -296,7 +296,7 @@ Result for function main():
[], [],
"state before terminator:", "state before terminator:",
[], [],
"terminator: drop(_4) -> bb8", "terminator: drop(_4) -> [return: bb8, unwind terminate(cleanup)]",
{ {
"bb8": [ "bb8": [
"state:", "state:",
......
...@@ -9,4 +9,4 @@ fn main() { ...@@ -9,4 +9,4 @@ fn main() {
fn f(x: i32) -> i32 { fn f(x: i32) -> i32 {
return x; return x;
} }
\ No newline at end of file
#![allow(dropping_references)]
#[derive(Clone, Default)] #[derive(Clone, Default)]
struct T { struct T {
// Wrap in box to have non-Copy types // Wrap in box to have non-Copy types
......
...@@ -408,25 +408,40 @@ Result for function main(): ...@@ -408,25 +408,40 @@ Result for function main():
"_6", "_6",
"_11" "_11"
], ],
"terminator: replace((_1.0: std::boxed::Box<u32>) <- move _11) -> [return: bb6, unwind: bb11]", "terminator: drop((_1.0: std::boxed::Box<u32>)) -> [return: bb6, unwind: bb7]",
{ {
"bb11": [
"state:",
[]
],
"bb6": [ "bb6": [
"state:", "state:",
[ [
"_1", "(_1.1: std::boxed::Box<u32>)",
"(_1.2: std::boxed::Box<u32>)",
"_4", "_4",
"_5", "_5",
"_6" "_6",
"_11"
] ]
],
"bb7": [
"state:",
[]
] ]
} }
], ],
"bb6": [ "bb6": [
[], [
[
"state:",
[
"(_1.1: std::boxed::Box<u32>)",
"(_1.2: std::boxed::Box<u32>)",
"_4",
"_5",
"_6",
"_11"
],
"statement: (_1.0: std::boxed::Box<u32>) = move _11"
]
],
"state before terminator:", "state before terminator:",
[ [
"_1", "_1",
...@@ -434,13 +449,13 @@ Result for function main(): ...@@ -434,13 +449,13 @@ Result for function main():
"_5", "_5",
"_6" "_6"
], ],
"terminator: drop(_11) -> [return: bb7, unwind: bb13]", "terminator: drop(_11) -> [return: bb8, unwind: bb13]",
{ {
"bb13": [ "bb13": [
"state:", "state:",
[] []
], ],
"bb7": [ "bb8": [
"state:", "state:",
[ [
"_1", "_1",
...@@ -452,6 +467,28 @@ Result for function main(): ...@@ -452,6 +467,28 @@ Result for function main():
} }
], ],
"bb7": [ "bb7": [
[
[
"state:",
[],
"statement: (_1.0: std::boxed::Box<u32>) = move _11"
]
],
"state before terminator:",
[
"(_1.0: std::boxed::Box<u32>)"
],
"terminator: drop(_11) -> [return: bb13, unwind terminate(cleanup)]",
{
"bb13": [
"state:",
[
"(_1.0: std::boxed::Box<u32>)"
]
]
}
],
"bb8": [
[ [
[ [
"state:", "state:",
...@@ -501,13 +538,13 @@ Result for function main(): ...@@ -501,13 +538,13 @@ Result for function main():
"_6", "_6",
"_13" "_13"
], ],
"terminator: _12 = std::mem::drop::<T>(move _13) -> [return: bb8, unwind: bb10]", "terminator: _12 = std::mem::drop::<T>(move _13) -> [return: bb9, unwind: bb11]",
{ {
"bb10": [ "bb11": [
"state:", "state:",
[] []
], ],
"bb8": [ "bb9": [
"state:", "state:",
[ [
"_4", "_4",
...@@ -518,7 +555,7 @@ Result for function main(): ...@@ -518,7 +555,7 @@ Result for function main():
] ]
} }
], ],
"bb8": [ "bb9": [
[ [
[ [
"state:", "state:",
...@@ -581,21 +618,21 @@ Result for function main(): ...@@ -581,21 +618,21 @@ Result for function main():
[ [
"_0" "_0"
], ],
"terminator: drop(_1) -> [return: bb9, unwind: bb14]", "terminator: drop(_1) -> [return: bb10, unwind: bb14]",
{ {
"bb14": [ "bb10": [
"state:",
[]
],
"bb9": [
"state:", "state:",
[ [
"_0" "_0"
] ]
],
"bb14": [
"state:",
[]
] ]
} }
], ],
"bb9": [ "bb10": [
[ [
[ [
"state:", "state:",
...@@ -612,23 +649,11 @@ Result for function main(): ...@@ -612,23 +649,11 @@ Result for function main():
"terminator: return", "terminator: return",
{} {}
], ],
"bb10": [
[],
"state before terminator:",
[],
"terminator: drop(_13) -> bb13",
{
"bb13": [
"state:",
[]
]
}
],
"bb11": [ "bb11": [
[], [],
"state before terminator:", "state before terminator:",
[], [],
"terminator: drop(_11) -> bb13", "terminator: drop(_13) -> [return: bb13, unwind terminate(cleanup)]",
{ {
"bb13": [ "bb13": [
"state:", "state:",
...@@ -640,7 +665,7 @@ Result for function main(): ...@@ -640,7 +665,7 @@ Result for function main():
[], [],
"state before terminator:", "state before terminator:",
[], [],
"terminator: drop(_3) -> bb13", "terminator: drop(_3) -> [return: bb13, unwind terminate(cleanup)]",
{ {
"bb13": [ "bb13": [
"state:", "state:",
...@@ -652,7 +677,7 @@ Result for function main(): ...@@ -652,7 +677,7 @@ Result for function main():
[], [],
"state before terminator:", "state before terminator:",
[], [],
"terminator: drop(_1) -> bb14", "terminator: drop(_1) -> [return: bb14, unwind terminate(cleanup)]",
{ {
"bb14": [ "bb14": [
"state:", "state:",
......
...@@ -5,8 +5,7 @@ fn main() { ...@@ -5,8 +5,7 @@ fn main() {
x = input(); x = input();
if x > 2 { if x > 2 {
y = 5; y = 5;
} } else {
else {
y = 7; y = 7;
} }
y = 25; y = 25;
...@@ -14,4 +13,4 @@ fn main() { ...@@ -14,4 +13,4 @@ fn main() {
fn input() -> i32 { fn input() -> i32 {
return 42; return 42;
} }
\ No newline at end of file
...@@ -131,15 +131,6 @@ Result for function main(): ...@@ -131,15 +131,6 @@ Result for function main():
"_6" "_6"
], ],
"statement: _5 = Gt(move _6, const 2_i32)" "statement: _5 = Gt(move _6, const 2_i32)"
],
[
"state:",
[
"_1",
"_2",
"_5"
],
"statement: StorageDead(_6)"
] ]
], ],
"state before terminator:", "state before terminator:",
...@@ -148,7 +139,7 @@ Result for function main(): ...@@ -148,7 +139,7 @@ Result for function main():
"_2", "_2",
"_5" "_5"
], ],
"terminator: switchInt(move _5) -> [false: bb3, otherwise: bb2]", "terminator: switchInt(move _5) -> [0: bb3, otherwise: bb2]",
{ {
"bb2": [ "bb2": [
"state:", "state:",
...@@ -168,6 +159,14 @@ Result for function main(): ...@@ -168,6 +159,14 @@ Result for function main():
], ],
"bb2": [ "bb2": [
[ [
[
"state:",
[
"_1",
"_2"
],
"statement: StorageDead(_6)"
],
[ [
"state:", "state:",
[ [
...@@ -205,6 +204,14 @@ Result for function main(): ...@@ -205,6 +204,14 @@ Result for function main():
], ],
"bb3": [ "bb3": [
[ [
[
"state:",
[
"_1",
"_2"
],
"statement: StorageDead(_6)"
],
[ [
"state:", "state:",
[ [
......
...@@ -4,4 +4,3 @@ fn main() { ...@@ -4,4 +4,3 @@ fn main() {
let y: u32; let y: u32;
y = x; y = x;
} }
...@@ -529,7 +529,7 @@ Result for function main(): ...@@ -529,7 +529,7 @@ Result for function main():
"frame_accessible": [], "frame_accessible": [],
"frame_owned": [] "frame_owned": []
}, },
"terminator: drop(_9) -> bb10", "terminator: drop(_9) -> [return: bb10, unwind terminate(cleanup)]",
{ {
"bb10": [ "bb10": [
"state:", "state:",
...@@ -547,7 +547,7 @@ Result for function main(): ...@@ -547,7 +547,7 @@ Result for function main():
"frame_accessible": [], "frame_accessible": [],
"frame_owned": [] "frame_owned": []
}, },
"terminator: drop(_1) -> bb12", "terminator: drop(_1) -> [return: bb12, unwind terminate(cleanup)]",
{ {
"bb12": [ "bb12": [
"state:", "state:",
...@@ -565,7 +565,7 @@ Result for function main(): ...@@ -565,7 +565,7 @@ Result for function main():
"frame_accessible": [], "frame_accessible": [],
"frame_owned": [] "frame_owned": []
}, },
"terminator: drop(_2) -> bb12", "terminator: drop(_2) -> [return: bb12, unwind terminate(cleanup)]",
{ {
"bb12": [ "bb12": [
"state:", "state:",
......
...@@ -350,7 +350,7 @@ Result for function break_it(): ...@@ -350,7 +350,7 @@ Result for function break_it():
"frame_accessible": [], "frame_accessible": [],
"frame_owned": [] "frame_owned": []
}, },
"terminator: drop(_7) -> bb8", "terminator: drop(_7) -> [return: bb8, unwind terminate(cleanup)]",
{ {
"bb8": [ "bb8": [
"state:", "state:",
...@@ -368,7 +368,7 @@ Result for function break_it(): ...@@ -368,7 +368,7 @@ Result for function break_it():
"frame_accessible": [], "frame_accessible": [],
"frame_owned": [] "frame_owned": []
}, },
"terminator: drop(_4) -> bb8", "terminator: drop(_4) -> [return: bb8, unwind terminate(cleanup)]",
{ {
"bb8": [ "bb8": [
"state:", "state:",
...@@ -386,7 +386,7 @@ Result for function break_it(): ...@@ -386,7 +386,7 @@ Result for function break_it():
"frame_accessible": [], "frame_accessible": [],
"frame_owned": [] "frame_owned": []
}, },
"terminator: drop(_2) -> bb9", "terminator: drop(_2) -> [return: bb9, unwind terminate(cleanup)]",
{ {
"bb9": [ "bb9": [
"state:", "state:",
...@@ -688,7 +688,7 @@ Result for function main(): ...@@ -688,7 +688,7 @@ Result for function main():
"frame_accessible": [], "frame_accessible": [],
"frame_owned": [] "frame_owned": []
}, },
"terminator: drop(_4) -> bb5", "terminator: drop(_4) -> [return: bb5, unwind terminate(cleanup)]",
{ {
"bb5": [ "bb5": [
"state:", "state:",
......
...@@ -3,9 +3,7 @@ pub struct S2 { ...@@ -3,9 +3,7 @@ pub struct S2 {
} }
pub fn test4() -> S2 { pub fn test4() -> S2 {
let x = S2 { let x = S2 { f: 8 };
f: 8,
};
let y = x; let y = x;
assert!(y.f == 9); assert!(y.f == 9);
y y
......
struct A; struct A;
struct B { struct B {
a1: A, a1: A,
a2: A a2: A,
} }
struct C { struct C {
b: B b: B,
} }
struct D { struct D {
c: C c: C,
} }
fn consume(a: A) {} fn consume(a: A) {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment