Commit 05bcd32
committed
nr: Add modules to types NS
gcc/rust/ChangeLog:
* util/rust-hir-map.cc (Mappings::insert_module_id): New function.
(Mappings::is_module): Likewise.
* util/rust-hir-map.h: Store a set of AST modules, declare functions for adding and
retrieving them.
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Insert modules in the type
namespace and store them in mappings.
* resolve/rust-late-name-resolver-2.0.cc (resolve_type_path_like): Error out when an
expected type resolves to a module.
gcc/testsuite/ChangeLog:
* rust/compile/mod_in_types_ns.rs: New test.
* rust/compile/mod_in_types_ns2.rs: New test.1 parent d2f8f64 commit 05bcd32
File tree
6 files changed
+43
-2
lines changed- gcc
- rust
- resolve
- util
- testsuite/rust/compile
6 files changed
+43
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
520 | 528 | | |
521 | 529 | | |
522 | 530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1171 | 1183 | | |
1172 | 1184 | | |
1173 | 1185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
| |||
438 | 442 | | |
439 | 443 | | |
440 | 444 | | |
| 445 | + | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| 449 | + | |
444 | 450 | | |
| 451 | + | |
445 | 452 | | |
446 | 453 | | |
447 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments