diff options
Diffstat (limited to '')
-rw-r--r-- | tests/mir-opt/inline/dyn_trait.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/mir-opt/inline/dyn_trait.rs b/tests/mir-opt/inline/dyn_trait.rs index 0faeec0bb..ecf220a85 100644 --- a/tests/mir-opt/inline/dyn_trait.rs +++ b/tests/mir-opt/inline/dyn_trait.rs @@ -19,18 +19,26 @@ pub trait Query { // EMIT_MIR dyn_trait.mk_cycle.Inline.diff #[inline(always)] pub fn mk_cycle<V: Debug>(c: &dyn Cache<V = V>) { + // CHECK-LABEL: fn mk_cycle( + // CHECK-NOT: inlined c.store_nocache() } // EMIT_MIR dyn_trait.try_execute_query.Inline.diff #[inline(always)] pub fn try_execute_query<C: Cache>(c: &C) { + // CHECK-LABEL: fn try_execute_query( + // CHECK: (inlined mk_cycle::<<C as Cache>::V>) mk_cycle(c) } // EMIT_MIR dyn_trait.get_query.Inline.diff #[inline(always)] pub fn get_query<Q: Query, T>(t: &T) { + // CHECK-LABEL: fn get_query( + // CHECK-NOT: inlined let c = Q::cache(t); + // CHECK: (inlined try_execute_query::<<Q as Query>::C>) + // CHECK: (inlined mk_cycle::<<Q as Query>::V>) try_execute_query(c) } |