These are chat archives for rust-lang/rust

5th
Sep 2017
Aleksey Kladov
@matklad
Sep 05 2017 07:39
From the compiler's point of view, different versions of the same crate looks just like completely different crates. Arguably, this is something that Cargo should give a warning about, and there's a relevant RFC about the underlying issue: rust-lang/rfcs#1977
Zakarum
@omni-viral
Sep 05 2017 09:38
@matklad Compiler sees that types are from different versions of crate and complain about it
But not about traits
Aleksey Kladov
@matklad
Sep 05 2017 09:41
Huh, glad to learn that, thanks! It used to be that you got errors along the lines of expected type Foo, got type Foo :) Then I guess the diagnostics are just not implemented in the compiler yet? For the trait impl it's harder, because at the call site you usually can't be sure which trait impls you want to use
Zakarum
@omni-viral
Sep 05 2017 09:47
@matklad Compiler assumes that you want implementation of imported trait. And telling you in error message that type doesn't implement it. But, apparently, compiler doesn't check if the type implement another version of the trait. But it can search for relevant implementation in type's crate at least.
Aleksey Kladov
@matklad
Sep 05 2017 09:48
Might be useful to open an issue then!
Zakarum
@omni-viral
Sep 05 2017 09:49
@matklad I'm terrible at explaining stuff. That's why I usually don't open an issues :smile:
Aleksey Kladov
@matklad
Sep 05 2017 09:51
Well, practice makes perfect ;)
Denis Lisov
@tanriol
Sep 05 2017 09:51
This is rust-lang/rust#22750, isn't it?
Zakarum
@omni-viral
Sep 05 2017 09:52
@tanriol precisely
Zakarum
@omni-viral
Sep 05 2017 09:58
I see it has been partially fixed. For types only
Alyani
@notsonotso
Sep 05 2017 11:23
rustc is sloooooow