summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/inline/dyn_trait.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/mir-opt/inline/dyn_trait.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/mir-opt/inline/dyn_trait.rs8
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)
}