Skip to content

Instantly share code, notes, and snippets.

@dymk
Created April 21, 2013 19:10
Show Gist options
  • Select an option

  • Save dymk/5430674 to your computer and use it in GitHub Desktop.

Select an option

Save dymk/5430674 to your computer and use it in GitHub Desktop.
use types::{MyType, MyOtherType};
mod types;
C:\import_resolve_bug\lib>rustc --lib my_lib.rs
my_lib.rs:1:20: 1:32 warning: unused import
my_lib.rs:1 use types::{MyType, MyOtherType};
^~~~~~~~~~~~
my_lib.rs:1:12: 1:19 warning: unused import
my_lib.rs:1 use types::{MyType, MyOtherType};
^~~~~~~
warning: missing crate link meta `name`, using `my_lib` as default
warning: missing crate link meta `vers`, using `0.0` as default
mod my_lib;
#[test]
fn test_something_neat() {
assert!(true);
}
C:\import_resolve_bug\lib>rustc --test test_my_lib.rs
my_lib.rs:1:12: 1:19 error: unresolved name
my_lib.rs:1 use types::{MyType, MyOtherType};
^~~~~~~
my_lib.rs:1:12: 1:19 error: failed to resolve import: types::MyType
my_lib.rs:1 use types::{MyType, MyOtherType};
^~~~~~~
my_lib.rs:1:20: 1:32 error: unresolved name
my_lib.rs:1 use types::{MyType, MyOtherType};
^~~~~~~~~~~~
my_lib.rs:1:20: 1:32 error: failed to resolve import: types::MyOtherType
my_lib.rs:1 use types::{MyType, MyOtherType};
^~~~~~~~~~~~
error: failed to resolve imports
error: aborting due to 5 previous errors
pub type MyType = int;
pub type MyOtherType = int;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment