{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/48216","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/48216/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/48216/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/48216/events","html_url":"https://github.com/rust-lang/rust/issues/48216","id":297169494,"number":48216,"title":"Tracking issue for RFC #2166: impl-only-use ","user":{"login":"aturon","id":709807,"avatar_url":"https://avatars2.githubusercontent.com/u/709807?v=4","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"labels":[{"id":89436934,"url":"https://api.github.com/repos/rust-lang/rust/labels/B-RFC-approved","name":"B-RFC-approved","color":"d304cb","default":false},{"id":650846969,"url":"https://api.github.com/repos/rust-lang/rust/labels/C-tracking-issue","name":"C-tracking-issue","color":"f5f1fd","default":false},{"id":211668019,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-lang","name":"T-lang","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-14T16:54:03Z","updated_at":"2018-03-16T10:05:41Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is a tracking issue for the RFC \"impl-only-use \" (rust-lang/rfcs#2166).\r\n\r\n**Steps:**\r\n\r\n- [ ] Implement the RFC (cc @rust-lang/compiler -- can anyone write up mentoring instructions?)\r\n- [ ] Adjust documentation ([see instructions on forge][doc-guide])\r\n- [ ] Stabilization PR ([see instructions on forge][stabilization-guide])\r\n\r\n[stabilization-guide]: https://forge.rust-lang.org/stabilization-guide.html\r\n[doc-guide]: https://forge.rust-lang.org/stabilization-guide.html#updating-documentation"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/373664699","html_url":"https://github.com/rust-lang/rust/issues/48216#issuecomment-373664699","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/48216","id":373664699,"user":{"login":"petrochenkov","id":5751617,"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},"created_at":"2018-03-16T10:05:41Z","updated_at":"2018-03-16T10:05:41Z","author_association":"CONTRIBUTOR","body":"One deficiency of the current implementation is that `_` in `use Trait as _` is not hygienic.\r\nNormal trait imports generated by macros produce the next error that doesn't happen with `_`.\r\n```rust\r\n#![feature(decl_macro)]\r\n#![allow(unused)]\r\n\r\nstruct S;\r\n\r\nmod m {\r\n    pub trait Tr {\r\n        fn f(&self) {}\r\n    }\r\n    impl Tr for ::S {}\r\n}\r\n\r\npub macro m() {\r\n    use m::Tr;\r\n}\r\n\r\nm!();\r\n\r\nfn main() {\r\n    S.f(); // ERROR no method named `f` found for type `S` in the current scope\r\n}\r\n```\r\n\r\nThis is going to be fixed by https://github.com/rust-lang/rust/pull/48842 or equivalent."}}
{"actor":{"display_login":"petrochenkov"}}