{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/36837","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/36837/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/36837/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/36837/events","html_url":"https://github.com/rust-lang/rust/issues/36837","id":180159853,"number":36837,"title":"item_like_imports: Can \"ambiguity error\" items be reexported?","user":{"login":"petrochenkov","id":5751617,"avatar_url":"https://avatars.githubusercontent.com/u/5751617?v=3","gravatar_id":"","url":"https://api.github.com/users/petrochenkov","html_url":"https://github.com/petrochenkov","followers_url":"https://api.github.com/users/petrochenkov/followers","following_url":"https://api.github.com/users/petrochenkov/following{/other_user}","gists_url":"https://api.github.com/users/petrochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/petrochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrochenkov/subscriptions","organizations_url":"https://api.github.com/users/petrochenkov/orgs","repos_url":"https://api.github.com/users/petrochenkov/repos","events_url":"https://api.github.com/users/petrochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/petrochenkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-29T20:52:08Z","updated_at":"2016-09-29T22:17:44Z","closed_at":null,"body":"Is the next code well formed or not?\r\n```\r\n#![feature(item_like_imports)]\r\n\r\nmod ty1 {\r\n    pub type A = u8;\r\n}\r\nmod ty2 {\r\n    pub type A = u8;\r\n}\r\nmod ambig {\r\n    // Create an ambiguity item in type namespace.\r\n    pub use ty1::*;\r\n    pub use ty2::*;\r\n}\r\nmod merge {\r\n    pub use ambig::*; // <- reexports an ambiguity error, or reexports nothing?\r\n    pub use ty1::*; // <- does this contribute to the ambiguity error or create a valid name?\r\n}\r\n\r\nfn main() {\r\n    let _: merge::A; // <- Valid or an ambiguity error?\r\n}\r\n```\r\n\r\nCurrently the behavior of this code depends on whether the \"merge\" step is done in the same crate or in some other crate.\r\nIn a single crate scenario the snippet above fails to compile with `A is ambiguous` error.\r\nIf `merge` is moved to another crate, then all erroneous resolutions are filtered away and are not represented in metadata, `pub use ambig::*` becomes an empty import and `merge::A` unambiguously means `ty1::A`.\r\nSupposedly, local and cross-crate behavior should be the same.\r\n\r\ncc @jseyfried @nrc "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/250607700","html_url":"https://github.com/rust-lang/rust/issues/36837#issuecomment-250607700","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/36837","id":250607700,"user":{"login":"jseyfried","id":8652869,"avatar_url":"https://avatars.githubusercontent.com/u/8652869?v=3","gravatar_id":"","url":"https://api.github.com/users/jseyfried","html_url":"https://github.com/jseyfried","followers_url":"https://api.github.com/users/jseyfried/followers","following_url":"https://api.github.com/users/jseyfried/following{/other_user}","gists_url":"https://api.github.com/users/jseyfried/gists{/gist_id}","starred_url":"https://api.github.com/users/jseyfried/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseyfried/subscriptions","organizations_url":"https://api.github.com/users/jseyfried/orgs","repos_url":"https://api.github.com/users/jseyfried/repos","events_url":"https://api.github.com/users/jseyfried/events{/privacy}","received_events_url":"https://api.github.com/users/jseyfried/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T22:17:44Z","updated_at":"2016-09-29T22:17:44Z","body":"cc @nrc"}}
{"actor":{"display_login":"jseyfried"}}