These are chat archives for rust-lang/rust

Mar 2017
Mansur Ashraf
Mar 06 2017 01:07
hi guys, is there a way to have multiple implementation of a trait for the same type?
Alexander Ronald Altman
Mar 06 2017 07:49
@MansurAshraf The short answer is no. The long answer is maybe, depending on what you mean by “multiple implementations” and also on what you mean by “the same type”.
Trait implementations have to be unique per their complete arguments lists, including Self.
So I can have impl Add<i32> for i64, impl Add<i32> for i32, impl Add<i64> for i32, and impl Add<i64> for i64 all at the same time.
But I can’t have two different versions of impl Add<i64> for i64.
Mar 06 2017 15:59
Hello everyone.
Those who use vscode-rust (the extension for Visual Studio Code named Rust),
I advice you to share your opinions about features and to join Gitter room.