{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/20940","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/20940/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/20940/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/20940/events","html_url":"https://github.com/rust-lang/rust/issues/20940","id":53991459,"number":20940,"title":"Manual impls of Foo for Foo should be illegal","user":{"login":"huonw","id":1203825,"avatar_url":"https://avatars.githubusercontent.com/u/1203825?v=3","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-traits","name":"A-traits","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-11T13:14:59Z","updated_at":"2015-01-11T13:14:59Z","closed_at":null,"body":"A manual implementation of a trait for its own DST is currently legal:\r\n\r\n```rust\r\ntrait Foo { fn gen<A>(&self) {} }\r\n\r\nimpl<'a> Foo for Foo+'a {}\r\n\r\nfn main() {}\r\n```\r\n\r\nbut shouldn't be. An object-safe `Foo` gives an ICE #20939, but should also be plain illegal"}}