-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Description
// foo.rs
#[link(name = "foo", vers = "0")];
#[crate_type = "lib"];
pub use bar::MyValue;
mod bar;
pub mod baz;// bar.rs
pub enum MyType { MyValue }
pub fn blorg (_: MyType) { }// baz.rs
mod bar;
pub fn quux (m: bar::MyType) { bar::blorg(m) }// app.rs
extern mod foo;
fn main () {
foo::baz::quux(foo::MyValue);
}$ rustc foo.rs
$ rustc -L. app.rs
app.rs:4:19: 4:31 error: mismatched types: expected `foo::baz::bar::MyType` but found `foo::bar::MyType` (expected enum foo::baz::bar::MyType but found enum foo::bar::MyType)
app.rs:4 foo::baz::quux(foo::MyValue);
^~~~~~~~~~~~
error: aborting due to previous error
As far as I can tell, foo::baz::bar::MyType is nonsense here.
Metadata
Metadata
Assignees
Labels
No labels