{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/55884","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/55884/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/55884/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/55884/events","html_url":"https://github.com/rust-lang/rust/pull/55884","id":379594834,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5OTk5NDk2","number":55884,"title":"[beta] resolve: Implement uniform paths 2.0","user":{"login":"petrochenkov","id":5751617,"node_id":"MDQ6VXNlcjU3NTE2MTc=","avatar_url":"https://avatars2.githubusercontent.com/u/5751617?v=4","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":[{"id":583437191,"node_id":"MDU6TGFiZWw1ODM0MzcxOTE=","url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-bors","name":"S-waiting-on-bors","color":"d3dddd","default":false},{"id":201991156,"node_id":"MDU6TGFiZWwyMDE5OTExNTY=","url":"https://api.github.com/repos/rust-lang/rust/labels/beta-nominated","name":"beta-nominated","color":"1e76d9","default":false}],"state":"open","locked":false,"assignee":{"login":"eddyb","id":77424,"node_id":"MDQ6VXNlcjc3NDI0","avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"assignees":[{"login":"eddyb","id":77424,"node_id":"MDQ6VXNlcjc3NDI0","avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/rust-lang/rust/milestones/55","html_url":"https://github.com/rust-lang/rust/milestone/55","labels_url":"https://api.github.com/repos/rust-lang/rust/milestones/55/labels","id":3463307,"node_id":"MDk6TWlsZXN0b25lMzQ2MzMwNw==","number":55,"title":"Rust 2018 Release","description":"See https://internals.rust-lang.org/t/rust-2018-the-home-stretch/7810","creator":{"login":"nikomatsakis","id":155238,"node_id":"MDQ6VXNlcjE1NTIzOA==","avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":29,"state":"open","created_at":"2018-06-29T18:51:49Z","updated_at":"2018-11-17T00:07:37Z","due_on":"2018-12-06T08:00:00Z","closed_at":null},"comments":47,"created_at":"2018-11-12T02:13:36Z","updated_at":"2018-11-18T06:44:19Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/55884","html_url":"https://github.com/rust-lang/rust/pull/55884","diff_url":"https://github.com/rust-lang/rust/pull/55884.diff","patch_url":"https://github.com/rust-lang/rust/pull/55884.patch"},"body":"With this PR paths in imports on 2018 edition are resolved as relative in the scope in which they are written, similarly to any other paths.\r\nThe previous implementation worked differently - it tried to resolve the import in the current module (`self::import`) and in the \"crate universe\" (`::import`), and then merge these two resolutions if possible.\r\n\r\nThe difference is that the new scheme can refer to strictly larger set of names in scope - names from unnamed blocks, names from all kinds of preludes, including macros imported with `#[macro_use] extern crate`, built-in types/macros, macros introduced with `macro_rules`.\r\nThis means strictly more potential ambiguities and therefore ambiguity errors, since we keep the rule that any two different candidate names in scope conflict with each other during import resolution. So this is a breaking change for 2018 edition, but it should be relatively minor.\r\n\r\nAll paths that don't start with an extern crate are also gated with the `uniform_paths` feature, paths that refer to extern crates are not gated (so we effectively get something like \"future-proofed anchored paths\" on stable).\r\n\r\nAnother difference is treatment of paths in visibilities (`pub(in path)`). Few people remember about paths in visibilities, so before this PR they still used the old 2015 rules even on 2018 edition. Namely, paths in visibilities were crate-relative, analogous to 2015 edition imports.\r\nThis PR resolves paths in visibilities as uniform as well, or rather future proofs them in this direction.\r\nPaths in visibilities are restricted to parent modules, so relative paths almost never make sense there, and `pub(in a)` needs to be rewritten as `pub(in crate::a)` in the uniform scheme, de-facto cementing the discouraged status of non-`pub(crate)` and non-`pub(super)` fine-grained visibilities.\r\nThis is clearly a breaking change for 2018 edition as well, but also a minor one.\r\n\r\nThe in-scope resolution strategy for import paths mirrors what is currently done for macro paths on stable (on both editions), so it will continue working even if the \"ambiguity always means error\" restriction is relaxed in the future.\r\n\r\nThis PR also significantly improves diagnostics for all kinds of resolution ambiguities, from the newly introduced import ones to pretty old \"glob vs glob\" conflicts. (That's probably what I've spent most of the time on.)\r\n\r\nWhy beta:\r\n- This is a breaking change on 2018 edition.\r\n- This is a large PR, it's less risky to forward-port it to nightly, than back-port to beta.\r\n\r\ncc https://github.com/rust-lang/rust/issues/55618\r\ncc https://github.com/rust-lang/rust/issues/53130\r\ncc https://github.com/rust-lang/rfcs/issues/1289\r\nCloses https://github.com/rust-lang/rust/issues/18084\r\nCloses https://github.com/rust-lang/rust/issues/54525\r\nFixes https://github.com/rust-lang/rust/issues/54390\r\nFixes https://github.com/rust-lang/rust/issues/55668\r\n\r\nr? @ghost"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/439671704","html_url":"https://github.com/rust-lang/rust/pull/55884#issuecomment-439671704","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/55884","id":439671704,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTY3MTcwNA==","user":{"login":"bors","id":3372342,"node_id":"MDQ6VXNlcjMzNzIzNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/3372342?v=4","gravatar_id":"","url":"https://api.github.com/users/bors","html_url":"https://github.com/bors","followers_url":"https://api.github.com/users/bors/followers","following_url":"https://api.github.com/users/bors/following{/other_user}","gists_url":"https://api.github.com/users/bors/gists{/gist_id}","starred_url":"https://api.github.com/users/bors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors/subscriptions","organizations_url":"https://api.github.com/users/bors/orgs","repos_url":"https://api.github.com/users/bors/repos","events_url":"https://api.github.com/users/bors/events{/privacy}","received_events_url":"https://api.github.com/users/bors/received_events","type":"User","site_admin":false},"created_at":"2018-11-18T06:44:19Z","updated_at":"2018-11-18T06:44:19Z","author_association":"CONTRIBUTOR","body":":hourglass: Testing commit b3664152ae5b47ab484c8dfbab907dcdf9a49a25 with merge d08a0a89c6ed1d7c66cfbee2f85721a2d1696885..."}}
{"actor":{"display_login":"bors"}}