Closed
Description
Test case:
a.rs
pub trait Foo {}
b.rs
extern crate a;
struct Bar;
impl a::Foo for Vec<Bar> {}
fn main() {}
In rustc 1.1.0-nightly (90cc830 2015-04-22) (built 2015-04-23):
$ rustc --crate-type lib a.rs
$ rustc -L . a.rs
a.rs:3:1: 3:28 error: the impl does not reference any types defined in this crate; only traits defined in the current crate can be implemented for arbitrary types [E0117]
a.rs:3 impl b::Foo for Vec<Bar> {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Note the impl does not reference any types defined in this crate. This is not true, Bar
is defined is this crate.
This indicates a bug either in the coherence rules (this program should be valid and the error not be shown) or in the error message, which is misleading.