{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/24407","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/24407/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/24407/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/24407/events","html_url":"https://github.com/rust-lang/rust/issues/24407","id":68284275,"number":24407,"title":"Add error explanations for all error codes (tracking issue).","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":null,"milestone":null,"comments":8,"created_at":"2015-04-14T07:01:55Z","updated_at":"2015-04-15T07:40:03Z","closed_at":null,"body":"This is a metabug for `rustc --explain` error descriptions.\r\n\r\n~~All~~ Most of the errors are listed at the bottom of this issue, along with their locations. If you'd like to help out, comment with the bunch of errors you'd like to tackle! Choosing a few in the same file is probably a good way to start.\r\n\r\n# How to add an error explanation\r\n\r\nError explanations live in [src/librustc*/diagnostics.rs](https://github.com/rust-lang/rust/blob/master/src/librustc/diagnostics.rs). To add a new explanation you have to delete the error from the `register_diagnostics!` invocation and add it to the `register_long_diagnostics!` invocation, along with the explanation. The format for the explanation is 80 characters per line, with a newline at the very start and end of the string. Copy the format of the existing errors and you should be good!\r\n\r\nOnce you've added an explanation, you can test how it looks by compiling and running stage1 as follows:\r\n\r\n```shell\r\n$ make rustc-stage1\r\n$ export PATH=x86_64-unknown-linux-gnu/stage1/bin:$PATH\r\n$ export LD_LIBRARY_PATH=x86_64-unknown-linux-gnu/stage1/lib:$LD_LIBRARY_PATH\r\n$ rustc --explain EXXXX\r\n```\r\n\r\nI've been testing in an 80 character wide terminal.\r\n\r\nOnce you're happy with the result submit a pull request and we'll handle merges, etc.\r\n\r\n# Partial error list\r\n\r\n- [ ] E0009 in librustc/middle/check_match.rs:1092 (@GuillaumeGomez)\r\n- [ ] E0010 in librustc/middle/check_const.rs:407\r\n- [ ] E0011 in librustc/middle/check_const.rs:399\r\n- [ ] E0012 in librustc/middle/check_const.rs:430\r\n- [ ] E0013 in librustc/middle/check_const.rs:464\r\n- [ ] E0014 in librustc/middle/check_const.rs:484\r\n- [ ] E0015 in librustc/middle/check_const.rs:513\r\n- [ ] E0016 in librustc/middle/check_const.rs:525\r\n- [ ] E0017 in librustc/middle/check_const.rs:354\r\n- [ ] E0018 in librustc/middle/check_const.rs:438\r\n- [ ] E0019 in librustc/middle/check_const.rs:611\r\n- [ ] E0020 in librustc/middle/check_const.rs:310\r\n- [ ] E0022 in librustc/diagnostics.rs:153\r\n- [ ] E0079 in librustc/middle/ty.rs:5721\r\n- [ ] E0080 in librustc/middle/ty.rs:5726\r\n- [ ] E0109 in librustc/middle/astconv_util.rs:29\r\n- [ ] E0110 in librustc/middle/astconv_util.rs:37\r\n- [ ] E0133 in librustc/middle/effect.rs:51\r\n- [ ] E0134 in librustc/middle/effect.rs:73\r\n- [ ] E0135 in librustc/middle/effect.rs:77\r\n- [ ] E0136 in librustc/middle/entry.rs:89\r\n- [ ] E0137 in librustc/middle/entry.rs:103\r\n- [ ] E0138 in librustc/middle/entry.rs:112\r\n- [ ] E0139 in librustc/middle/intrinsicck.rs:165\r\n- [ ] E0152 in librustc/middle/lang_items.rs:180 (Begin @lfairy)\r\n- [ ] E0158 in librustc/middle/check_match.rs:459\r\n- [ ] E0161 in librustc/middle/check_rvalues.rs:64\r\n- [x] E0162 in librustc/middle/check_match.rs:312 (@ruud-v-a)\r\n- [x] E0165 in librustc/middle/check_match.rs:322 (@ruud-v-a)\r\n- [ ] E0170 in librustc/middle/check_match.rs:244 (End @lfairy)\r\n- [ ] E0261 in librustc/middle/resolve_lifetime.rs:454\r\n- [ ] E0262 in librustc/middle/resolve_lifetime.rs:466\r\n- [ ] E0263 in librustc/middle/resolve_lifetime.rs:477\r\n- [ ] E0264 in librustc/middle/weak_lang_items.rs:102\r\n- [ ] E0265 in librustc/middle/check_static_recursion.rs:86\r\n- [ ] E0266 in librustc/middle/check_static_recursion.rs:106\r\n- [ ] E0267 in librustc/middle/check_loop.rs:72\r\n- [ ] E0268 in librustc/middle/check_loop.rs:76\r\n- [ ] E0269 in librustc/middle/liveness.rs:1539\r\n- [ ] E0270 in librustc/middle/liveness.rs:1556\r\n- [ ] E0271 in librustc/middle/traits/error_reporting.rs:60\r\n- [ ] E0272 in librustc/middle/traits/error_reporting.rs:100\r\n- [ ] E0273 in librustc/middle/traits/error_reporting.rs:111\r\n- [ ] E0274 in librustc/middle/traits/error_reporting.rs:130\r\n- [ ] E0275 in librustc/middle/traits/error_reporting.rs:155\r\n- [ ] E0276 in librustc/middle/traits/error_reporting.rs:175\r\n- [ ] E0277 in librustc/middle/traits/error_reporting.rs:188\r\n- [ ] E0278 in librustc/middle/traits/error_reporting.rs:207\r\n- [ ] E0279 in librustc/middle/traits/error_reporting.rs:217\r\n- [ ] E0280 in librustc/middle/traits/error_reporting.rs:226\r\n- [ ] E0281 in librustc/middle/traits/error_reporting.rs:239\r\n- [ ] E0282 in librustc/middle/traits/error_reporting.rs:291\r\n- [ ] E0283 in librustc/middle/traits/error_reporting.rs:296\r\n- [ ] E0284 in librustc/middle/traits/error_reporting.rs:317\r\n- [ ] E0285 in librustc/diagnostics.rs:195\r\n- [ ] E0296 in librustc/middle/recursion_limit.rs:35\r\n- [x] E0297 in librustc/middle/check_match.rs:376 (Begin @ruud-v-a)\r\n- [ ] E0298 in librustc/middle/check_match.rs:941\r\n- [ ] E0299 in librustc/middle/check_match.rs:954\r\n- [ ] E0300 in librustc/middle/check_match.rs:993\r\n- [x] E0301 in librustc/middle/check_match.rs:1154\r\n- [x] E0302 in librustc/middle/check_match.rs:1164 (End @ruud-v-a)\r\n- [ ] E0304 in librustc/diagnostics.rs:203\r\n- [ ] E0305 in librustc/diagnostics.rs:204\r\n- [ ] E0306 in librustc/middle/ty.rs:6053\r\n- [ ] E0307 in librustc/middle/ty.rs:6069\r\n- [ ] E0308 in librustc/middle/infer/error_reporting.rs:360\r\n- [ ] E0309 in librustc/middle/infer/error_reporting.rs:432\r\n- [ ] E0310 in librustc/middle/infer/error_reporting.rs:444\r\n- [ ] E0311 in librustc/middle/infer/error_reporting.rs:455\r\n- [ ] E0312 in librustc/middle/infer/error_reporting.rs:484\r\n- [ ] E0313 in librustc/middle/infer/error_reporting.rs:499\r\n- [ ] E0314 in librustc/middle/infer/error_reporting.rs:520\r\n- [ ] E0315 in librustc/middle/infer/error_reporting.rs:534\r\n- [ ] E0316 in librustc/middle/resolve_lifetime.rs:273\r\n\r\n[script]: https://gist.github.com/michaelsproul/0c926b1458baef5254d5"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/93243132","html_url":"https://github.com/rust-lang/rust/issues/24407#issuecomment-93243132","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/24407","id":93243132,"user":{"login":"lfairy","id":1572323,"avatar_url":"https://avatars.githubusercontent.com/u/1572323?v=3","gravatar_id":"","url":"https://api.github.com/users/lfairy","html_url":"https://github.com/lfairy","followers_url":"https://api.github.com/users/lfairy/followers","following_url":"https://api.github.com/users/lfairy/following{/other_user}","gists_url":"https://api.github.com/users/lfairy/gists{/gist_id}","starred_url":"https://api.github.com/users/lfairy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfairy/subscriptions","organizations_url":"https://api.github.com/users/lfairy/orgs","repos_url":"https://api.github.com/users/lfairy/repos","events_url":"https://api.github.com/users/lfairy/events{/privacy}","received_events_url":"https://api.github.com/users/lfairy/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T07:40:03Z","updated_at":"2015-04-15T07:40:03Z","body":"@ruud-v-a I was already working on 158/162/165 (see my comment above), but meh"}}