Skip to content

Instantly share code, notes, and snippets.

@passcod
Created December 21, 2021 12:46
Embed
What would you like to do?
Rustc error categories
{"E0004":"mir_build","E0005":"mir_build","E0010":"const_eval","E0013":"const_eval","E0015":"const_eval","E0023":"typeck","E0025":"typeck","E0026":"typeck","E0027":"typeck","E0029":"typeck","E0030":"mir_build","E0033":"typeck","E0034":"typeck","E0038":"trait_selection","E0040":"typeck","E0044":"typeck","E0045":"typeck","E0046":"typeck","E0049":"typeck","E0050":"typeck","E0053":"typeck","E0054":"typeck","E0055":"trait_selection","E0057":"typeck","E0059":"typeck","E0060":"typeck","E0061":"typeck","E0062":"typeck","E0063":"typeck","E0067":"typeck","E0069":"typeck","E0070":"typeck","E0071":"typeck","E0072":"trait_selection","E0075":"typeck","E0076":"typeck","E0077":"typeck","E0080":"middle","E0081":"typeck","E0084":"typeck","E0091":"typeck","E0092":"typeck","E0093":"typeck","E0094":"typeck","E0106":"typeck","E0107":"typeck","E0109":"typeck","E0116":"typeck","E0117":"typeck","E0118":"typeck","E0119":"trait_selection","E0120":"typeck","E0121":"typeck","E0124":"typeck","E0128":"resolve","E0130":"ast_passes","E0131":"typeck","E0132":"typeck","E0133":"mir_transform","E0137":"passes","E0138":"passes","E0152":"passes","E0158":"mir_build","E0161":"borrowck","E0164":"typeck","E0170":"mir_build","E0178":"parse","E0183":"typeck","E0184":"typeck","E0185":"typeck","E0186":"typeck","E0191":"typeck","E0195":"typeck","E0197":"ast_passes","E0198":"ast_passes","E0199":"typeck","E0200":"typeck","E0201":"typeck","E0203":"typeck","E0204":"typeck","E0206":"typeck","E0207":"typeck","E0208":"typeck","E0210":"typeck","E0212":"typeck","E0214":"ast_lowering","E0220":"typeck","E0221":"typeck","E0222":"typeck","E0223":"typeck","E0224":"typeck","E0225":"typeck","E0226":"ast_passes","E0227":"typeck","E0228":"typeck","E0229":"typeck","E0230":"trait_selection","E0231":"trait_selection","E0232":"trait_selection","E0252":"resolve","E0253":"resolve","E0254":"resolve","E0255":"resolve","E0259":"resolve","E0260":"resolve","E0261":"resolve","E0262":"resolve","E0263":"resolve","E0264":"passes","E0267":"passes","E0268":"passes","E0271":"trait_selection","E0275":"trait_selection","E0276":"infer","E0277":"trait_selection","E0279":"trait_selection","E0280":"trait_selection","E0282":"typeck","E0283":"trait_selection","E0284":"trait_selection","E0307":"typeck","E0308":"typeck","E0309":"infer","E0310":"infer","E0311":"infer","E0312":"infer","E0313":"infer","E0316":"ast_passes","E0317":"infer","E0320":"middle","E0321":"typeck","E0322":"typeck","E0323":"typeck","E0324":"typeck","E0325":"typeck","E0326":"typeck","E0328":"typeck","E0364":"resolve","E0365":"resolve","E0366":"typeck","E0367":"typeck","E0368":"typeck","E0369":"typeck","E0370":"typeck","E0371":"typeck","E0373":"borrowck","E0374":"typeck","E0375":"typeck","E0376":"typeck","E0377":"typeck","E0378":"typeck","E0379":"ast_passes","E0380":"ast_passes","E0381":"borrowck","E0382":"borrowck","E0384":"borrowck","E0390":"typeck","E0391":"query_system","E0392":"typeck","E0393":"typeck","E0401":"resolve","E0403":"resolve","E0404":"resolve","E0405":"resolve","E0407":"resolve","E0408":"resolve","E0409":"resolve","E0411":"resolve","E0412":"resolve","E0415":"resolve","E0416":"resolve","E0422":"resolve","E0423":"resolve","E0424":"resolve","E0425":"resolve","E0426":"resolve","E0428":"resolve","E0429":"resolve","E0430":"resolve","E0431":"resolve","E0432":"resolve","E0433":"resolve","E0434":"resolve","E0435":"resolve","E0436":"typeck","E0437":"resolve","E0438":"resolve","E0445":"privacy","E0446":"privacy","E0449":"ast_passes","E0451":"privacy","E0452":"lint","E0453":"lint","E0454":"metadata","E0455":"metadata","E0457":"metadata","E0458":"metadata","E0459":"metadata","E0460":"metadata","E0461":"metadata","E0462":"metadata","E0463":"metadata","E0464":"metadata","E0465":"metadata","E0466":"resolve","E0468":"resolve","E0469":"resolve","E0472":"ast_passes","E0476":"infer","E0477":"infer","E0478":"infer","E0490":"infer","E0491":"infer","E0492":"const_eval","E0493":"const_eval","E0495":"infer","E0496":"resolve","E0498":"plugin_impl","E0499":"borrowck","E0500":"borrowck","E0501":"borrowck","E0502":"borrowck","E0503":"borrowck","E0505":"macros","E0506":"borrowck","E0507":"borrowck","E0508":"borrowck","E0509":"borrowck","E0510":"borrowck","E0511":"codegen_ssa","E0512":"passes","E0514":"metadata","E0515":"data_structures","E0516":"typeck","E0517":"passes","E0518":"passes","E0519":"metadata","E0520":"typeck","E0521":"borrowck","E0522":"passes","E0523":"metadata","E0524":"borrowck","E0525":"trait_selection","E0527":"typeck","E0528":"typeck","E0529":"typeck","E0530":"resolve","E0531":"resolve","E0532":"resolve","E0533":"typeck","E0534":"typeck","E0535":"typeck","E0536":"attr","E0537":"attr","E0538":"attr","E0539":"attr","E0541":"attr","E0542":"attr","E0543":"attr","E0544":"attr","E0545":"attr","E0546":"attr","E0547":"attr","E0549":"passes","E0550":"attr","E0551":"attr","E0552":"passes","E0554":"passes","E0556":"expand","E0557":"expand","E0559":"typeck","E0560":"typeck","E0561":"ast_passes","E0562":"ast_lowering","E0565":"passes","E0566":"passes","E0567":"ast_passes","E0568":"ast_passes","E0569":"typeck","E0570":"typeck","E0571":"passes","E0572":"typeck","E0573":"resolve","E0574":"resolve","E0575":"resolve","E0576":"resolve","E0577":"resolve","E0578":"resolve","E0579":"mir_build","E0580":"infer","E0581":"typeck","E0582":"typeck","E0583":"expand","E0584":"parse","E0585":"parse","E0586":"parse","E0587":"typeck","E0588":"typeck","E0589":"typeck","E0590":"passes","E0591":"passes","E0592":"typeck","E0593":"trait_selection","E0594":"borrowck","E0596":"borrowck","E0597":"borrowck","E0599":"typeck","E0600":"typeck","E0601":"passes","E0602":"lint","E0603":"resolve","E0604":"typeck","E0605":"typeck","E0606":"typeck","E0607":"typeck","E0608":"typeck","E0609":"typeck","E0610":"typeck","E0614":"typeck","E0615":"typeck","E0616":"typeck","E0617":"typeck","E0618":"typeck","E0620":"typeck","E0621":"infer","E0622":"typeck","E0623":"infer","E0624":"typeck","E0625":"const_eval","E0626":"borrowck","E0627":"typeck","E0628":"ast_lowering","E0631":"trait_selection","E0632":"typeck","E0634":"typeck","E0635":"passes","E0636":"passes","E0637":"ast_lowering","E0638":"typeck","E0639":"typeck","E0640":"typeck","E0641":"typeck","E0642":"parse","E0643":"typeck","E0644":"infer","E0646":"typeck","E0647":"typeck","E0648":"typeck","E0657":"resolve","E0658":"session","E0659":"resolve","E0660":"builtin_macros","E0661":"builtin_macros","E0662":"builtin_macros","E0663":"builtin_macros","E0664":"builtin_macros","E0666":"ast_passes","E0667":"ast_passes","E0668":"codegen_ssa","E0669":"codegen_ssa","E0670":"parse","E0687":"resolve","E0688":"resolve","E0689":"typeck","E0690":"typeck","E0691":"typeck","E0692":"passes","E0693":"attr","E0695":"passes","E0696":"passes","E0697":"ast_lowering","E0698":"infer","E0699":"typeck","E0700":"infer","E0701":"passes","E0703":"ast_lowering","E0704":"parse","E0705":"feature","E0706":"ast_passes","E0708":"ast_lowering","E0710":"lint","E0711":"passes","E0712":"borrowck","E0713":"borrowck","E0714":"typeck","E0715":"typeck","E0716":"borrowck","E0717":"attr","E0718":"passes","E0719":"typeck","E0720":"typeck","E0722":"typeck","E0724":"typeck","E0725":"expand","E0726":"ast_lowering","E0727":"ast_lowering","E0728":"ast_lowering","E0730":"typeck","E0731":"typeck","E0732":"typeck","E0733":"typeck","E0734":"passes","E0735":"resolve","E0736":"passes","E0737":"typeck","E0739":"passes","E0740":"typeck","E0741":"typeck","E0742":"resolve","E0743":"parse","E0744":"passes","E0745":"typeck","E0746":"trait_selection","E0747":"typeck","E0748":"parse","E0749":"typeck","E0750":"typeck","E0751":"trait_selection","E0752":"typeck","E0753":"parse","E0754":"ast_passes","E0755":"typeck","E0756":"typeck","E0757":"typeck","E0758":"parse","E0759":"infer","E0760":"typeck","E0761":"expand","E0762":"parse","E0763":"parse","E0764":"const_eval","E0765":"parse","E0766":"parse","E0767":"resolve","E0768":"parse","E0769":"typeck","E0770":"resolve","E0771":"resolve","E0772":"infer","E0773":"resolve","E0774":"builtin_macros","E0775":"typeck","E0776":"typeck","E0777":"builtin_macros","E0778":"typeck","E0779":"typeck","E0781":"typeck","E0782":"ast_lowering","E0783":"typeck","E0784":"typeck","E0785":"typeck"}
echo -n '{'
for e in (seq 1 800)
set code (printf "E%04i" $e)
set categ (rg -l -g '!rustc_error_codes' $code compiler/ | head -n1 | cut -d/ -f2 | sed s/rustc_//)
[ ! -z "$categ" ]; and echo -en "\"$code\":\"$categ\","
end
echo '}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment