Commit 3007437
committed
Express contracts as part of function header and lower it to the contract lang items
includes post-developed commit: do not suggest internal-only keywords as corrections to parse failures.
includes post-developed commit: removed tabs that creeped in into rustfmt tool source code.
includes post-developed commit, placating rustfmt self dogfooding.
includes post-developed commit: add backquotes to prevent markdown checking from trying to treat an attr as a markdown hyperlink/
includes post-developed commit: fix lowering to keep contracts from being erroneously inherited by nested bodies (like closures).
Rebase Conflicts:
- compiler/rustc_parse/src/parser/diagnostics.rs
- compiler/rustc_parse/src/parser/item.rs
- compiler/rustc_span/src/hygiene.rs
# This is the commit message #2:
Remove contracts keywords from diagnostic messages1 parent 78bc83b commit 3007437
File tree
32 files changed
+529
-54
lines changed- compiler
- rustc_ast_lowering/src
- rustc_ast_passes/src
- rustc_ast_pretty/src/pprust/state
- rustc_ast/src
- rustc_builtin_macros/src
- deriving/generic
- rustc_hir_typeck/src
- rustc_hir/src
- rustc_lint/src
- rustc_parse/src/parser
- rustc_resolve/src
- late
- rustc_span/src
- library/core/src
- src/tools
- clippy
- clippy_lints/src
- clippy_utils/src/ast_utils
- rustfmt/src
- tests/ui/contracts
32 files changed
+529
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3316 | 3316 | | |
3317 | 3317 | | |
3318 | 3318 | | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
3319 | 3325 | | |
3320 | 3326 | | |
3321 | 3327 | | |
3322 | 3328 | | |
3323 | 3329 | | |
| 3330 | + | |
3324 | 3331 | | |
3325 | 3332 | | |
3326 | 3333 | | |
| |||
3618 | 3625 | | |
3619 | 3626 | | |
3620 | 3627 | | |
3621 | | - | |
| 3628 | + | |
3622 | 3629 | | |
3623 | 3630 | | |
3624 | 3631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
973 | 977 | | |
974 | 978 | | |
975 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
976 | 990 | | |
977 | 991 | | |
978 | 992 | | |
| |||
1205 | 1219 | | |
1206 | 1220 | | |
1207 | 1221 | | |
1208 | | - | |
| 1222 | + | |
1209 | 1223 | | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
1210 | 1227 | | |
1211 | 1228 | | |
1212 | 1229 | | |
| |||
1329 | 1346 | | |
1330 | 1347 | | |
1331 | 1348 | | |
1332 | | - | |
| 1349 | + | |
1333 | 1350 | | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
1334 | 1354 | | |
1335 | 1355 | | |
1336 | 1356 | | |
| |||
1476 | 1496 | | |
1477 | 1497 | | |
1478 | 1498 | | |
1479 | | - | |
| 1499 | + | |
1480 | 1500 | | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
1481 | 1504 | | |
1482 | 1505 | | |
1483 | 1506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
| |||
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
77 | | - | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| |||
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
91 | | - | |
| 99 | + | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| |||
188 | 196 | | |
189 | 197 | | |
190 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
191 | 202 | | |
192 | 203 | | |
193 | 204 | | |
| |||
374 | 385 | | |
375 | 386 | | |
376 | 387 | | |
377 | | - | |
378 | | - | |
| 388 | + | |
| 389 | + | |
379 | 390 | | |
380 | 391 | | |
381 | 392 | | |
| |||
715 | 726 | | |
716 | 727 | | |
717 | 728 | | |
718 | | - | |
719 | | - | |
| 729 | + | |
| 730 | + | |
720 | 731 | | |
721 | 732 | | |
722 | 733 | | |
| |||
800 | 811 | | |
801 | 812 | | |
802 | 813 | | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
803 | 825 | | |
804 | 826 | | |
805 | 827 | | |
| |||
858 | 880 | | |
859 | 881 | | |
860 | 882 | | |
861 | | - | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
862 | 892 | | |
863 | 893 | | |
864 | 894 | | |
865 | 895 | | |
| 896 | + | |
866 | 897 | | |
867 | 898 | | |
868 | 899 | | |
| |||
892 | 923 | | |
893 | 924 | | |
894 | 925 | | |
895 | | - | |
896 | | - | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
897 | 929 | | |
898 | 930 | | |
899 | 931 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
318 | 331 | | |
319 | 332 | | |
320 | 333 | | |
| |||
2125 | 2138 | | |
2126 | 2139 | | |
2127 | 2140 | | |
2128 | | - | |
| 2141 | + | |
2129 | 2142 | | |
2130 | 2143 | | |
2131 | 2144 | | |
| |||
2135 | 2148 | | |
2136 | 2149 | | |
2137 | 2150 | | |
2138 | | - | |
| 2151 | + | |
2139 | 2152 | | |
2140 | 2153 | | |
2141 | 2154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
213 | 246 | | |
214 | 247 | | |
215 | 248 | | |
| |||
1051 | 1084 | | |
1052 | 1085 | | |
1053 | 1086 | | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1058 | 1163 | | |
1059 | 1164 | | |
1060 | 1165 | | |
| |||
0 commit comments