mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
FileCheck inline_as_ref_as_mut
This commit is contained in:
parent
1b9cb5d59b
commit
773dc62756
@ -1,21 +1,28 @@
|
||||
// skip-filecheck
|
||||
// EMIT_MIR issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
|
||||
pub fn a<T>(x: &mut [T]) -> &mut [T] {
|
||||
// CHECK-LABEL: fn a(
|
||||
// CHECK: (inlined <[T] as AsMut<[T]>>::as_mut)
|
||||
x.as_mut()
|
||||
}
|
||||
|
||||
// EMIT_MIR issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
|
||||
pub fn b<T>(x: &mut Box<T>) -> &mut T {
|
||||
// CHECK-LABEL: fn b(
|
||||
// CHECK: (inlined <Box<T> as AsMut<T>>::as_mut)
|
||||
x.as_mut()
|
||||
}
|
||||
|
||||
// EMIT_MIR issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
|
||||
pub fn c<T>(x: &[T]) -> &[T] {
|
||||
// CHECK-LABEL: fn c(
|
||||
// CHECK: (inlined <[T] as AsRef<[T]>>::as_ref)
|
||||
x.as_ref()
|
||||
}
|
||||
|
||||
// EMIT_MIR issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
|
||||
pub fn d<T>(x: &Box<T>) -> &T {
|
||||
// CHECK-LABEL: fn d(
|
||||
// CHECK: (inlined <Box<T> as AsRef<T>>::as_ref)
|
||||
x.as_ref()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user