{"action":"opened","issue":{"url":"https://api.github.com/repos/flycheck/flycheck-rust/issues/11","labels_url":"https://api.github.com/repos/flycheck/flycheck-rust/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/flycheck/flycheck-rust/issues/11/comments","events_url":"https://api.github.com/repos/flycheck/flycheck-rust/issues/11/events","html_url":"https://github.com/flycheck/flycheck-rust/issues/11","id":79528067,"number":11,"title":"unresolved name `rand::thread_rng`","user":{"login":"andschwa","id":2226434,"avatar_url":"https://avatars.githubusercontent.com/u/2226434?v=3","gravatar_id":"","url":"https://api.github.com/users/andschwa","html_url":"https://github.com/andschwa","followers_url":"https://api.github.com/users/andschwa/followers","following_url":"https://api.github.com/users/andschwa/following{/other_user}","gists_url":"https://api.github.com/users/andschwa/gists{/gist_id}","starred_url":"https://api.github.com/users/andschwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andschwa/subscriptions","organizations_url":"https://api.github.com/users/andschwa/orgs","repos_url":"https://api.github.com/users/andschwa/repos","events_url":"https://api.github.com/users/andschwa/events{/privacy}","received_events_url":"https://api.github.com/users/andschwa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-22T16:57:20Z","updated_at":"2015-05-22T16:57:20Z","closed_at":null,"body":"Hello,\r\n\r\nI have the following code which compiles fine via `cargo run`:\r\n\r\n## `src/main.rs`\r\n```rust\r\nextern crate rand;\r\n\r\nuse rand::distributions::{IndependentSample, Range};\r\n\r\nfn main() {\r\n    let mut rng = rand::thread_rng(); // Flycheck error is here\r\n    let range = Range::new(-512.03, 511.97);\r\n    println!(\"A random number is {}\", range.ind_sample(&mut rng));\r\n}\r\n```\r\n## `Cargo.toml`\r\n``` toml\r\n[package]\r\nname = \"rando\"\r\nversion = \"0.1.0\"\r\nauthors = [\"Andrew Schwartzmeyer <andrew@schwartzmeyer.com>\"]\r\n\r\n[dependencies]\r\nrand = \"0.3\"\r\n```\r\n\r\nHowever, Flycheck with `flycheck-rust` gives the warning \"unresolved name `rand::thread_rng`\" on line 6. It does not appear to be recognize that the function was imported from a crate.\r\n\r\nThe Flycheck project may be a better place to post this issue, but I was hoping you could help me out!\r\n\r\nI have `flycheck-rust-crate-type` set to \"bin\" and am using rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14) on OS X 10.10.3 with GNU Emacs 24.5.50.1 (x86_64-apple-darwin14.3.0, NS apple-appkit-1347.57) of 2015-04-13. I am using the [rand crate](http://doc.rust-lang.org/rand/rand/index.html)."}}