Skip to content

Commit ddc328c

Browse files
committed
FileCheck combine_clone_of_primitives.
1 parent 5453a4f commit ddc328c

3 files changed

+11
-8
lines changed

tests/mir-opt/combine_clone_of_primitives.rs renamed to tests/mir-opt/instsimplify/combine_clone_of_primitives.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
// skip-filecheck
21
// unit-test: InstSimplify
32
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
43

54
// EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff
6-
75
#[derive(Clone)]
86
struct MyThing<T> {
97
v: T,
108
i: u64,
119
a: [f32; 3],
1210
}
1311

12+
// CHECK-LABEL: ::clone(
13+
// CHECK: <T as Clone>::clone(
14+
// CHECK-NOT: <u64 as Clone>::clone(
15+
// CHECK-NOT: <[f32; 3] as Clone>::clone(
16+
1417
fn main() {
1518
let x = MyThing::<i16> { v: 2, i: 3, a: [0.0; 3] };
1619
let y = x.clone();

tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff renamed to tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` before InstSimplify
2-
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` after InstSimplify
1+
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
2+
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
33

4-
fn <impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
4+
fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
55
debug self => _1;
66
let mut _0: MyThing<T>;
77
let mut _2: T;

tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff renamed to tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` before InstSimplify
2-
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` after InstSimplify
1+
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
2+
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
33

4-
fn <impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
4+
fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
55
debug self => _1;
66
let mut _0: MyThing<T>;
77
let mut _2: T;

0 commit comments

Comments
 (0)