{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37213","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37213/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37213/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37213/events","html_url":"https://github.com/rust-lang/rust/pull/37213","id":183261603,"number":37213,"title":"macros: improve `$crate`","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},"labels":[],"state":"open","locked":false,"assignee":{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false},"assignees":[{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-10-16T11:16:03Z","updated_at":"2016-10-18T01:57:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/37213","html_url":"https://github.com/rust-lang/rust/pull/37213","diff_url":"https://github.com/rust-lang/rust/pull/37213.diff","patch_url":"https://github.com/rust-lang/rust/pull/37213.patch"},"body":"This PR refactors the implementation of `$crate` so that\r\n - `$crate` is only allowed at the start of a path (like `super`),\r\n - we can make `$crate` work with inter-crate re-exports (groundwork for macro modularization), and\r\n - we can support importing macros from an extern crate that is not declared at the crate root (also groundwork for macro modularization).\r\n\r\n\r\nThis is a [breaking-change]. For example, the following would break:\r\n```rust\r\nfn foo() {}\r\nmacro_rules! m { () => {\r\n    $crate foo $crate () $crate $crate;\r\n    //^ Today, `$crate` is allowed just about anywhere in unexported macros.\r\n} }\r\nfn main() {\r\n    m!();\r\n}\r\n```\r\nr? @nrc "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/254385452","html_url":"https://github.com/rust-lang/rust/pull/37213#issuecomment-254385452","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37213","id":254385452,"user":{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T01:57:57Z","updated_at":"2016-10-18T01:57:57Z","body":"@bors: r+"}}
{"actor":{"display_login":"nrc"}}