mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
FileCheck combine_clone_of_primitives.
This commit is contained in:
parent
5453a4f056
commit
ddc328c2f1
@ -1,9 +1,7 @@
|
||||
// skip-filecheck
|
||||
// unit-test: InstSimplify
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
||||
// EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff
|
||||
|
||||
#[derive(Clone)]
|
||||
struct MyThing<T> {
|
||||
v: T,
|
||||
@ -11,6 +9,11 @@ struct MyThing<T> {
|
||||
a: [f32; 3],
|
||||
}
|
||||
|
||||
// CHECK-LABEL: ::clone(
|
||||
// CHECK: <T as Clone>::clone(
|
||||
// CHECK-NOT: <u64 as Clone>::clone(
|
||||
// CHECK-NOT: <[f32; 3] as Clone>::clone(
|
||||
|
||||
fn main() {
|
||||
let x = MyThing::<i16> { v: 2, i: 3, a: [0.0; 3] };
|
||||
let y = x.clone();
|
@ -1,7 +1,7 @@
|
||||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` after InstSimplify
|
||||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
|
||||
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
debug self => _1;
|
||||
let mut _0: MyThing<T>;
|
||||
let mut _2: T;
|
@ -1,7 +1,7 @@
|
||||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` after InstSimplify
|
||||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
|
||||
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
debug self => _1;
|
||||
let mut _0: MyThing<T>;
|
||||
let mut _2: T;
|
Loading…
Reference in New Issue
Block a user