{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/24975","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/24975/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/24975/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/24975/events","html_url":"https://github.com/rust-lang/rust/pull/24975","id":72092605,"number":24975,"title":"Add long diagnostics for enum repr errors.","user":{"login":"michaelsproul","id":4452260,"avatar_url":"https://avatars.githubusercontent.com/u/4452260?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsproul","html_url":"https://github.com/michaelsproul","followers_url":"https://api.github.com/users/michaelsproul/followers","following_url":"https://api.github.com/users/michaelsproul/following{/other_user}","gists_url":"https://api.github.com/users/michaelsproul/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsproul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsproul/subscriptions","organizations_url":"https://api.github.com/users/michaelsproul/orgs","repos_url":"https://api.github.com/users/michaelsproul/repos","events_url":"https://api.github.com/users/michaelsproul/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsproul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Aatch","id":342416,"avatar_url":"https://avatars.githubusercontent.com/u/342416?v=3","gravatar_id":"","url":"https://api.github.com/users/Aatch","html_url":"https://github.com/Aatch","followers_url":"https://api.github.com/users/Aatch/followers","following_url":"https://api.github.com/users/Aatch/following{/other_user}","gists_url":"https://api.github.com/users/Aatch/gists{/gist_id}","starred_url":"https://api.github.com/users/Aatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aatch/subscriptions","organizations_url":"https://api.github.com/users/Aatch/orgs","repos_url":"https://api.github.com/users/Aatch/repos","events_url":"https://api.github.com/users/Aatch/events{/privacy}","received_events_url":"https://api.github.com/users/Aatch/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-04-30T07:58:07Z","updated_at":"2015-04-30T08:06:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/24975","html_url":"https://github.com/rust-lang/rust/pull/24975","diff_url":"https://github.com/rust-lang/rust/pull/24975.diff","patch_url":"https://github.com/rust-lang/rust/pull/24975.patch"},"body":"Explanations for E0079, E0080, E0081, E0082, E0083 and E0084 as part of #24407.\r\n\r\nAll the errors concern the use of `#[repr(X)]` with enum types.\r\n\r\nI also updated the short description for E0079 so that it takes sign into account."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/97700337","html_url":"https://github.com/rust-lang/rust/pull/24975#issuecomment-97700337","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/24975","id":97700337,"user":{"login":"michaelsproul","id":4452260,"avatar_url":"https://avatars.githubusercontent.com/u/4452260?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsproul","html_url":"https://github.com/michaelsproul","followers_url":"https://api.github.com/users/michaelsproul/followers","following_url":"https://api.github.com/users/michaelsproul/following{/other_user}","gists_url":"https://api.github.com/users/michaelsproul/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsproul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsproul/subscriptions","organizations_url":"https://api.github.com/users/michaelsproul/orgs","repos_url":"https://api.github.com/users/michaelsproul/repos","events_url":"https://api.github.com/users/michaelsproul/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsproul/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T08:06:25Z","updated_at":"2015-04-30T08:06:25Z","body":"Here's an example where the current error for E0079 is misleading.\r\n\r\n```rust\r\n#[repr(u8)]\r\nenum Wow {\r\n    X = \"what\",\r\n    Y\r\n}\r\n\r\nfn main() {}\r\n```\r\n\r\n```\r\nwhat.rs:3:9: 3:15 error: mismatched types:\r\n expected `u8`,\r\n    found `&'static str`\r\n(expected u8,\r\n    found &-ptr) [E0308]\r\nwhat.rs:3     X = \"what\",\r\n                  ^~~~~~\r\nwhat.rs:3:9: 3:15 error: expected signed integer constant [E0079]\r\nwhat.rs:3     X = \"what\",\r\n                  ^~~~~~\r\nerror: aborting due to 2 previous errors\r\n\r\n```"}}