{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/22146","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/22146/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/22146/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/22146/events","html_url":"https://github.com/rust-lang/rust/issues/22146","id":57193656,"number":22146,"title":"Glob imports ignore extern crate items of parent modules","user":{"login":"crumblingstatue","id":1521976,"avatar_url":"https://avatars.githubusercontent.com/u/1521976?v=3","gravatar_id":"","url":"https://api.github.com/users/crumblingstatue","html_url":"https://github.com/crumblingstatue","followers_url":"https://api.github.com/users/crumblingstatue/followers","following_url":"https://api.github.com/users/crumblingstatue/following{/other_user}","gists_url":"https://api.github.com/users/crumblingstatue/gists{/gist_id}","starred_url":"https://api.github.com/users/crumblingstatue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crumblingstatue/subscriptions","organizations_url":"https://api.github.com/users/crumblingstatue/orgs","repos_url":"https://api.github.com/users/crumblingstatue/repos","events_url":"https://api.github.com/users/crumblingstatue/events{/privacy}","received_events_url":"https://api.github.com/users/crumblingstatue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-resolve","name":"A-resolve","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-10T15:57:47Z","updated_at":"2015-12-01T18:20:19Z","closed_at":null,"body":"It doesn't matter if the extern crate item is public or private, it's ignored in both cases.\r\n\r\nExample:\r\n```\r\n#![feature(libc)]\r\n\r\npub mod foo {\r\n    pub extern crate libc;\r\n    pub mod bar {\r\n        // use foo::libc; // Direct import works\r\n        use foo::*; // Glob import doesn't work\r\n        pub fn bar_fn() {\r\n            let _: libc::c_int;\r\n        }\r\n    }\r\n}\r\n\r\nfn main() {\r\n    foo::bar::bar_fn();\r\n}\r\n```\r\nThis gives the error:\r\n```\r\n<anon>:9:20: 9:31 error: failed to resolve. Use of undeclared type or module `libc`\r\n<anon>:9             let _: libc::c_int;\r\n                            ^~~~~~~~~~~\r\n<anon>:9:20: 9:31 error: use of undeclared type name `libc::c_int`\r\n<anon>:9             let _: libc::c_int;\r\n                            ^~~~~~~~~~~\r\n```\r\n\r\nNote that this is not the same issue as #22145, as it doesn't matter whether the item is public or private."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/161053355","html_url":"https://github.com/rust-lang/rust/issues/22146#issuecomment-161053355","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/22146","id":161053355,"user":{"login":"durka","id":47007,"avatar_url":"https://avatars.githubusercontent.com/u/47007?v=3","gravatar_id":"","url":"https://api.github.com/users/durka","html_url":"https://github.com/durka","followers_url":"https://api.github.com/users/durka/followers","following_url":"https://api.github.com/users/durka/following{/other_user}","gists_url":"https://api.github.com/users/durka/gists{/gist_id}","starred_url":"https://api.github.com/users/durka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/durka/subscriptions","organizations_url":"https://api.github.com/users/durka/orgs","repos_url":"https://api.github.com/users/durka/repos","events_url":"https://api.github.com/users/durka/events{/privacy}","received_events_url":"https://api.github.com/users/durka/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T18:20:18Z","updated_at":"2015-12-01T18:20:18Z","body":"This seems to be fixed in nightly!"}}