{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/2155","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2155/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2155/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2155/events","html_url":"https://github.com/rust-lang/rfcs/pull/2155","id":258518500,"number":2155,"title":"Path mental model","user":{"login":"vitiral","id":5587659,"avatar_url":"https://avatars0.githubusercontent.com/u/5587659?v=4","gravatar_id":"","url":"https://api.github.com/users/vitiral","html_url":"https://github.com/vitiral","followers_url":"https://api.github.com/users/vitiral/followers","following_url":"https://api.github.com/users/vitiral/following{/other_user}","gists_url":"https://api.github.com/users/vitiral/gists{/gist_id}","starred_url":"https://api.github.com/users/vitiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitiral/subscriptions","organizations_url":"https://api.github.com/users/vitiral/orgs","repos_url":"https://api.github.com/users/vitiral/repos","events_url":"https://api.github.com/users/vitiral/events{/privacy}","received_events_url":"https://api.github.com/users/vitiral/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-09-18T15:19:16Z","updated_at":"2017-09-18T23:19:44Z","closed_at":"2017-09-18T23:14:56Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2155","html_url":"https://github.com/rust-lang/rfcs/pull/2155","diff_url":"https://github.com/rust-lang/rfcs/pull/2155.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/2155.patch"},"body":"This RFC proposes to unify the mental model around paths. It does this by:\r\n- Removing the `foo.rs + foo/` \"file-dir\" module system from [RFC 2126](https://github.com/rust-lang/rfcs/blob/master/text/2126-path-clarity.md) on the grounds (primarily) that the design contains a critical flaw around `self::`+`super::` and did not have enough discussion within the mega-rfc, so it warrants its own RFC\r\n- Add a feature and a lint to require `mod foo` to be changed to `mod self::foo`, so that explicit paths are used everywhere after RFC 2126 is stabilized.\r\n- Have `cargo new` create `crate/` instead of `src/` so that `use crate::foo::bar` has an accurate mental map of `crate/foo/bar.rs` instead of `src/foo/bar.rs`\r\n\r\n[Rendered](https://github.com/vitiral/rfcs/blob/716bd13d099493cac4a315030c9f7faf3cda996b/text/0000-path-mental-model.md)\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/330383282","html_url":"https://github.com/rust-lang/rfcs/pull/2155#issuecomment-330383282","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2155","id":330383282,"user":{"login":"rpjohnst","id":161677,"avatar_url":"https://avatars3.githubusercontent.com/u/161677?v=4","gravatar_id":"","url":"https://api.github.com/users/rpjohnst","html_url":"https://github.com/rpjohnst","followers_url":"https://api.github.com/users/rpjohnst/followers","following_url":"https://api.github.com/users/rpjohnst/following{/other_user}","gists_url":"https://api.github.com/users/rpjohnst/gists{/gist_id}","starred_url":"https://api.github.com/users/rpjohnst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpjohnst/subscriptions","organizations_url":"https://api.github.com/users/rpjohnst/orgs","repos_url":"https://api.github.com/users/rpjohnst/repos","events_url":"https://api.github.com/users/rpjohnst/events{/privacy}","received_events_url":"https://api.github.com/users/rpjohnst/received_events","type":"User","site_admin":false},"created_at":"2017-09-18T23:19:44Z","updated_at":"2017-09-18T23:19:44Z","author_association":"NONE","body":"`self::` is more useful in `use` paths as a way to change where the path starts. When implementing a facade, for example, you might `use` a bunch of stuff defined in submodules of the current module, in which case `self::` can cut out a lot of redundant path segments that are liable to change if you ever move the module."}}
{"actor":{"display_login":"rpjohnst"}}