Skip to content

Commit 2846971

Browse files
committed
FileCheck inline_as_ref_as_mut
1 parent 6eedec5 commit 2846971

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
// skip-filecheck
21
// EMIT_MIR issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
32
pub fn a<T>(x: &mut [T]) -> &mut [T] {
3+
// CHECK-LABEL: fn a(
4+
// CHECK: (inlined <[T] as AsMut<[T]>>::as_mut)
45
x.as_mut()
56
}
67

78
// EMIT_MIR issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
89
pub fn b<T>(x: &mut Box<T>) -> &mut T {
10+
// CHECK-LABEL: fn b(
11+
// CHECK: (inlined <Box<T> as AsMut<T>>::as_mut)
912
x.as_mut()
1013
}
1114

1215
// EMIT_MIR issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
1316
pub fn c<T>(x: &[T]) -> &[T] {
17+
// CHECK-LABEL: fn c(
18+
// CHECK: (inlined <[T] as AsRef<[T]>>::as_ref)
1419
x.as_ref()
1520
}
1621

1722
// EMIT_MIR issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
1823
pub fn d<T>(x: &Box<T>) -> &T {
24+
// CHECK-LABEL: fn d(
25+
// CHECK: (inlined <Box<T> as AsRef<T>>::as_ref)
1926
x.as_ref()
2027
}
2128

0 commit comments

Comments
 (0)