diff --git a/test_programs/compile_success_empty/trait_generics/src/main.nr b/test_programs/compile_success_empty/trait_generics/src/main.nr index 9a3c54c3fa1..30b2e79d579 100644 --- a/test_programs/compile_success_empty/trait_generics/src/main.nr +++ b/test_programs/compile_success_empty/trait_generics/src/main.nr @@ -1,4 +1,3 @@ - fn main() { let xs: [Field; 1] = [3]; let ys: [u32; 1] = [3]; @@ -8,21 +7,21 @@ fn main() { assert_eq(15, sum_static(Data { a: 5, b: 10 })); } -fn foo(x: T, u: U) where T: Into, U: Eq { +fn foo(x: T, u: U) where T: MyInto, U: Eq { assert(x.into() == u); } -trait Into { +trait MyInto { fn into(self) -> T; } -impl Into<[U; N]> for [T; N] where T: Into { +impl MyInto<[U; N]> for [T; N] where T: MyInto { fn into(self) -> [U; N] { self.map(|x: T| x.into()) } } -impl Into for Field { +impl MyInto for Field { fn into(self) -> u32 { self as u32 }