2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2024-04-20 06:19:34 -05:00
|
|
|
//@ test-mir-pass: Inline
|
2023-08-21 17:39:34 -05:00
|
|
|
//@ compile-flags: --crate-type=lib -C panic=abort
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn bar(&self) -> i32;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Foo for T {
|
|
|
|
fn bar(&self) -> i32 {
|
|
|
|
0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// EMIT_MIR inline_generically_if_sized.call.Inline.diff
|
|
|
|
pub fn call<T>(s: &T) -> i32 {
|
|
|
|
s.bar()
|
|
|
|
}
|