diff options
Diffstat (limited to 'tests/codegen-units/item-collection/generic-impl.rs')
| -rw-r--r-- | tests/codegen-units/item-collection/generic-impl.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/codegen-units/item-collection/generic-impl.rs b/tests/codegen-units/item-collection/generic-impl.rs index 6e60907c185..23d09e0d8af 100644 --- a/tests/codegen-units/item-collection/generic-impl.rs +++ b/tests/codegen-units/item-collection/generic-impl.rs @@ -8,15 +8,13 @@ struct Struct<T> { f: fn(x: T) -> T, } -fn id<T>(x: T) -> T { x } +fn id<T>(x: T) -> T { + x +} impl<T> Struct<T> { - fn new(x: T) -> Struct<T> { - Struct { - x: x, - f: id - } + Struct { x: x, f: id } } fn get<T2>(self, x: T2) -> (T, T2) { @@ -25,11 +23,10 @@ impl<T> Struct<T> { } pub struct LifeTimeOnly<'a> { - _a: &'a u32 + _a: &'a u32, } impl<'a> LifeTimeOnly<'a> { - //~ MONO_ITEM fn LifeTimeOnly::<'_>::foo pub fn foo(&self) {} //~ MONO_ITEM fn LifeTimeOnly::<'_>::bar |
