{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/26100","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/26100/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/26100/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/26100/events","html_url":"https://github.com/rust-lang/rust/issues/26100","id":86239848,"number":26100,"title":"Errors for traits not being implemented on trait objects should be clearer","user":{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars.githubusercontent.com/u/1617736?v=3","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-diagnostics","name":"A-diagnostics","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-papercut","name":"I-papercut","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-08T16:15:06Z","updated_at":"2015-06-08T16:15:06Z","closed_at":null,"body":"http://xania.org/201506/traits-and-trait-objects\r\n\r\n```rust\r\npub trait Tr {\r\n    fn me<A>(&self, a: A);\r\n}\r\n\r\nfn render(obj: &Tr) {\r\n    obj.me(1);\r\n}\r\n```\r\ngives the cryptic error\r\n\r\n```\r\n<anon>:6:9: 6:14 error: the trait `Tr` is not implemented for the type `Tr` [E0277]\r\n<anon>:6     obj.me(1);\r\n                 ^~~~~\r\n```\r\n\r\n`Tr` is not object safe. We should have notes when:\r\n\r\n - A non-object safe thing is used as a trait object (warning, not error)\r\n - A note on the \"trait not implemented\" error. A different error code with an explanation of object safety is a plus."}}