Commit bc34960
committed
Introduce ModernIdent type to unify macro 2.0 hygiene handling
1. Added ModernIdent type. Wraps Ident and automatically calls normalize_to_macros_2_0()
Used for "item hygiene" comparisons, ensuring type safety.
2. Unified identifier normalization. Replaced scattered
ident.normalize_to_macros_2_0() calls with ModernIdent::new(ident)
Signed-off-by: xizheyin <[email protected]>1 parent 460259d commit bc34960
File tree
14 files changed
+157
-81
lines changed- compiler
- rustc_hir_analysis/src
- coherence
- hir_ty_lowering
- rustc_hir_typeck/src
- fn_ctxt
- rustc_middle/src/ty
- rustc_resolve/src
- late
- rustc_span/src
14 files changed
+157
-81
lines changedLines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
1545 | 1545 | | |
1546 | 1546 | | |
1547 | 1547 | | |
1548 | | - | |
| 1548 | + | |
1549 | 1549 | | |
1550 | 1550 | | |
1551 | 1551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
2035 | 2035 | | |
2036 | 2036 | | |
2037 | 2037 | | |
2038 | | - | |
| 2038 | + | |
2039 | 2039 | | |
2040 | 2040 | | |
2041 | 2041 | | |
| |||
2072 | 2072 | | |
2073 | 2073 | | |
2074 | 2074 | | |
2075 | | - | |
| 2075 | + | |
2076 | 2076 | | |
2077 | 2077 | | |
2078 | 2078 | | |
| |||
2388 | 2388 | | |
2389 | 2389 | | |
2390 | 2390 | | |
2391 | | - | |
| 2391 | + | |
2392 | 2392 | | |
2393 | 2393 | | |
2394 | 2394 | | |
| |||
2818 | 2818 | | |
2819 | 2819 | | |
2820 | 2820 | | |
2821 | | - | |
| 2821 | + | |
2822 | 2822 | | |
2823 | 2823 | | |
2824 | 2824 | | |
2825 | 2825 | | |
2826 | 2826 | | |
2827 | 2827 | | |
2828 | 2828 | | |
2829 | | - | |
| 2829 | + | |
2830 | 2830 | | |
2831 | 2831 | | |
2832 | 2832 | | |
| |||
3449 | 3449 | | |
3450 | 3450 | | |
3451 | 3451 | | |
3452 | | - | |
| 3452 | + | |
3453 | 3453 | | |
3454 | 3454 | | |
3455 | | - | |
| 3455 | + | |
3456 | 3456 | | |
3457 | 3457 | | |
3458 | 3458 | | |
| |||
3463 | 3463 | | |
3464 | 3464 | | |
3465 | 3465 | | |
3466 | | - | |
| 3466 | + | |
3467 | 3467 | | |
3468 | 3468 | | |
3469 | 3469 | | |
| |||
3860 | 3860 | | |
3861 | 3861 | | |
3862 | 3862 | | |
3863 | | - | |
| 3863 | + | |
3864 | 3864 | | |
3865 | 3865 | | |
3866 | | - | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
3867 | 3871 | | |
3868 | 3872 | | |
3869 | 3873 | | |
| |||
3886 | 3890 | | |
3887 | 3891 | | |
3888 | 3892 | | |
3889 | | - | |
| 3893 | + | |
3890 | 3894 | | |
3891 | 3895 | | |
3892 | 3896 | | |
3893 | 3897 | | |
3894 | 3898 | | |
3895 | | - | |
| 3899 | + | |
3896 | 3900 | | |
3897 | 3901 | | |
3898 | 3902 | | |
| |||
3918 | 3922 | | |
3919 | 3923 | | |
3920 | 3924 | | |
3921 | | - | |
| 3925 | + | |
3922 | 3926 | | |
3923 | 3927 | | |
3924 | 3928 | | |
| |||
3936 | 3940 | | |
3937 | 3941 | | |
3938 | 3942 | | |
3939 | | - | |
| 3943 | + | |
3940 | 3944 | | |
3941 | 3945 | | |
3942 | 3946 | | |
| |||
3953 | 3957 | | |
3954 | 3958 | | |
3955 | 3959 | | |
3956 | | - | |
| 3960 | + | |
3957 | 3961 | | |
3958 | 3962 | | |
3959 | 3963 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
| 518 | + | |
| 519 | + | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
1907 | 1907 | | |
1908 | 1908 | | |
1909 | 1909 | | |
1910 | | - | |
| 1910 | + | |
1911 | 1911 | | |
1912 | 1912 | | |
1913 | 1913 | | |
| |||
1947 | 1947 | | |
1948 | 1948 | | |
1949 | 1949 | | |
1950 | | - | |
| 1950 | + | |
1951 | 1951 | | |
1952 | 1952 | | |
1953 | 1953 | | |
| |||
2115 | 2115 | | |
2116 | 2116 | | |
2117 | 2117 | | |
2118 | | - | |
| 2118 | + | |
2119 | 2119 | | |
2120 | 2120 | | |
2121 | 2121 | | |
| |||
2351 | 2351 | | |
2352 | 2352 | | |
2353 | 2353 | | |
2354 | | - | |
| 2354 | + | |
2355 | 2355 | | |
2356 | 2356 | | |
2357 | | - | |
| 2357 | + | |
2358 | 2358 | | |
2359 | 2359 | | |
2360 | 2360 | | |
| |||
2402 | 2402 | | |
2403 | 2403 | | |
2404 | 2404 | | |
2405 | | - | |
| 2405 | + | |
2406 | 2406 | | |
2407 | 2407 | | |
2408 | 2408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
2061 | 2061 | | |
2062 | 2062 | | |
2063 | 2063 | | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
| 2064 | + | |
| 2065 | + | |
2067 | 2066 | | |
2068 | 2067 | | |
2069 | 2068 | | |
2070 | 2069 | | |
2071 | 2070 | | |
2072 | | - | |
| 2071 | + | |
2073 | 2072 | | |
2074 | 2073 | | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
2079 | 2077 | | |
2080 | 2078 | | |
2081 | 2079 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
936 | | - | |
937 | | - | |
| 936 | + | |
| 937 | + | |
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
954 | | - | |
| 954 | + | |
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
1219 | | - | |
| 1219 | + | |
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
1246 | | - | |
| 1246 | + | |
1247 | 1247 | | |
1248 | 1248 | | |
1249 | | - | |
| 1249 | + | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
1254 | 1254 | | |
1255 | 1255 | | |
1256 | | - | |
| 1256 | + | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
1444 | | - | |
| 1444 | + | |
1445 | 1445 | | |
1446 | 1446 | | |
1447 | 1447 | | |
| |||
0 commit comments