Commit ae33aa7
committed
Auto merge of rust-lang#32875 - jseyfried:1422_implementation, r=nikomatsakis
Implement `pub(restricted)` privacy (RFC 1422)
This implements `pub(restricted)` privacy from RFC 1422 (cc rust-lang#32409) behind a feature gate.
`pub(restricted)` paths currently cannot use re-exported modules both for simplicity of implementation and for future compatibility with RFC 1560 (cf rust-lang#31783).
r? @nikomatsakisFile tree
26 files changed
+478
-196
lines changed- src
- librustc_privacy
- librustc_resolve
- librustc
- hir
- ty
- librustdoc
- clean
- html
- libsyntax
- parse
- print
- test
- auxiliary
- compile-fail/privacy/restricted
26 files changed
+478
-196
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
| 294 | + | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
| |||
529 | 533 | | |
530 | 534 | | |
531 | 535 | | |
| 536 | + | |
532 | 537 | | |
533 | 538 | | |
534 | 539 | | |
| |||
662 | 667 | | |
663 | 668 | | |
664 | 669 | | |
| 670 | + | |
665 | 671 | | |
666 | 672 | | |
667 | 673 | | |
| |||
690 | 696 | | |
691 | 697 | | |
692 | 698 | | |
| 699 | + | |
693 | 700 | | |
694 | 701 | | |
695 | 702 | | |
| |||
839 | 846 | | |
840 | 847 | | |
841 | 848 | | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
842 | 855 | | |
843 | 856 | | |
844 | 857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1708 | 1708 | | |
1709 | 1709 | | |
1710 | 1710 | | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
1711 | 1714 | | |
1712 | | - | |
1713 | 1715 | | |
1714 | 1716 | | |
1715 | 1717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
| 1437 | + | |
| 1438 | + | |
1437 | 1439 | | |
1438 | 1440 | | |
1439 | 1441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
| |||
898 | 900 | | |
899 | 901 | | |
900 | 902 | | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
901 | 906 | | |
902 | 907 | | |
903 | 908 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
290 | 299 | | |
291 | 300 | | |
292 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1023 | 1023 | | |
1024 | 1024 | | |
1025 | 1025 | | |
1026 | | - | |
| 1026 | + | |
| 1027 | + | |
1027 | 1028 | | |
1028 | 1029 | | |
1029 | 1030 | | |
| |||
1053 | 1054 | | |
1054 | 1055 | | |
1055 | 1056 | | |
1056 | | - | |
| 1057 | + | |
| 1058 | + | |
1057 | 1059 | | |
1058 | 1060 | | |
1059 | 1061 | | |
| |||
0 commit comments