126 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
cc575a6ad5 rustc: use IndexVec<DefIndex, T> instead of Vec<T>. 2019-10-28 11:38:36 +02:00
Nicholas Nethercote
08e2f05549 Remove InternedString.
By using `LocalInternedString` instead for the few remaining uses.
2019-10-21 18:30:40 +11:00
csmoe
64f61c7888 remove indexed_vec re-export from rustc_data_structures 2019-09-29 16:48:31 +00:00
Mark Rousskov
14a5aefb01 Switch over all StableHash impls to new format 2019-09-28 11:47:36 -04:00
varkor
7bc94cc3c2 Rename Item.node to Item.kind 2019-09-26 18:21:48 +01:00
varkor
8bd0382134 Rename Pat.node to Pat.kind 2019-09-26 18:21:09 +01:00
Alexander Regueiro
c1d29ee3c7 Aggregation of cosmetic changes made during work on REPL PRs: librustc 2019-09-07 16:27:19 +01:00
Nicholas Nethercote
6025fc843a Remove hashing impls for LocalInternedString. 2019-09-04 14:41:07 +10:00
Kevin Per
e0ce9f8c0a Cleanup: Consistently use Param instead of Arg #62426 2019-08-27 14:07:41 +02:00
Caio
6a42b0b28d Merge Variant and Variant_ 2019-08-14 14:47:01 -03:00
Caio
53fc7fbc96 Lint attributes on function arguments 2019-07-27 07:16:21 -03:00
Vadim Petrochenkov
290475e837 Collect library features from non-exported macros 2019-07-07 13:04:07 +03:00
Eduard-Mihai Burtescu
1d720ec27c Run rustfmt --file-lines ... for changes from previous commits. 2019-06-11 14:11:59 +03:00
Eduard-Mihai Burtescu
774724be3c rustc: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Alexander Regueiro
35585c499f Aggregation of drive-by cosmetic changes. 2019-06-05 21:09:26 +01:00
Matthew Jasper
4bfb0453f5 Give match arms an HirId and a Span 2019-05-21 19:37:38 +01:00
Fabian Drinck
b18de52080 Declare DefIndex with the newtype_index macro 2019-05-18 13:19:33 +02:00
Vadim Petrochenkov
ee6d315200 cleanup: Remove DefIndexAddressSpace 2019-05-09 00:46:38 +03:00
John Kåre Alsaker
d33db6ed57 Rename HirMap to HirEntryMap and add some comments 2019-05-08 14:27:40 +02:00
John Kåre Alsaker
df5a0111be Optimize HIR map 2019-05-08 12:18:09 +02:00
ljedrz
16fd0f47aa hir: remove NodeId from Entry & simplify Map 2019-04-24 19:51:25 +02:00
David Wood
db4770f699
Remove CtorOf from Node::Ctor.
This commit removes `CtorOf` from `Node::Ctor` as the parent of the
constructor can be determined by looking at the node's parent in the few
places where knowing this is necessary.
2019-03-24 18:21:59 +01:00
David Wood
5c3d1e5d76 Separate variant id and variant constructor id.
This commit makes two changes - separating the `NodeId` that identifies
an enum variant from the `NodeId` that identifies the variant's
constructor; and no longer creating a `NodeId` for `Struct`-style enum
variants and structs.

Separation of the variant id and variant constructor id will allow the
rest of RFC 2008 to be implemented by lowering the visibility of the
variant's constructor without lowering the visbility of the variant
itself.

No longer creating a `NodeId` for `Struct`-style enum variants and
structs mostly simplifies logic as previously this `NodeId` wasn't used.
There were various cases where the `NodeId` wouldn't be used unless
there was an unit or tuple struct or enum variant but not all uses of
this `NodeId` had that condition, by removing this `NodeId`, this must
be explicitly dealt with. This change mostly applied cleanly, but there
were one or two cases in name resolution and one case in type check
where the existing logic required a id for `Struct`-style enum variants
and structs.
2019-03-24 12:10:16 +03:00
ljedrz
584d61a2be hir: remove trait_auto_impl 2019-03-10 13:56:58 +01:00
ljedrz
77fa041fc1 hir: remove NodeId from Item 2019-03-02 07:48:52 +01:00
ljedrz
a29ceb9f51 hir: remove NodeId from ImplItem 2019-03-01 11:18:49 +01:00
ljedrz
e72584c3a1 hir: remove NodeId from TraitItem 2019-03-01 11:18:49 +01:00
ljedrz
63b4dd91be hir: remove NodeId from MacroDef 2019-02-24 07:50:46 +01:00
ljedrz
47dc349491 adjust intravisit HirIdification 2019-02-20 11:00:43 +01:00
ljedrz
36fffa8196 hir: remove parent_node from NodeCollector 2019-02-20 11:00:43 +01:00
ljedrz
4a4e5f3897 hir: add and use hir_to_node_id in NodeCollector 2019-02-20 11:00:43 +01:00
ljedrz
6536dbb640 hir: HirId-ify intravisit 2019-02-20 11:00:43 +01:00
John Kåre Alsaker
34ec9a5942 Add a query type which is always marked as red if it runs 2019-02-08 04:28:32 +01:00
Mark Mansi
e957ed9d10 move librustc to 2018 2019-02-05 12:45:47 -06:00
ljedrz
e8aeb83a4a hir: add HirId methods 2019-02-03 20:37:04 +01:00
Nicholas Nethercote
b2ce5a9099 Make hir::Stmt a separate struct.
Benefits:

- It lets us move the `NodeId` field out of every `hir::StmtKind`
  variant `NodeId` to a more sensible spot.

- It eliminates sadness in `Stmt::fmt`.

- It makes `hir::Stmt` match `ast::Stmt`.
2019-01-17 09:52:34 +11:00
John Kåre Alsaker
cbb5a00179 Parallelize and optimize parts of HIR map creation 2019-01-14 03:26:38 +01:00
John Kåre Alsaker
69d18a3986 Make more passes incremental 2019-01-11 03:53:29 +01:00
John Kåre Alsaker
2738f2c891 Address comments 2018-12-31 09:16:06 +01:00
John Kåre Alsaker
a426d47f58 Group dep node data into a single structure 2018-12-31 09:15:58 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Niko Matsakis
d0a174d41b track the span for each id so that we can give a nice ICE 2018-11-21 13:41:44 -05:00
Nick Cameron
f586ac9ef9 Adjust Ids of path segments in visibility modifiers
Fixes #55376
2018-10-30 09:09:49 +13:00
Nick Cameron
63ac2aae51 Fix tests and assertions; add some comments 2018-10-26 09:50:51 +13:00
Nick Cameron
c480386391 dump refs for path segments in save-analysis
Requires adding path segments to the hir map
2018-10-26 09:48:44 +13:00
ljedrz
2919ecdb5c A few cleanups for hir 2018-09-12 17:07:00 +02:00
varkor
6642462ef6 Make small modifications 2018-08-27 21:46:23 +01:00
varkor
e2a1cce9c5 Rename hir::map::NodeKind to hir::Node 2018-08-27 21:46:23 +01:00
varkor
ecbdfb4988 Convert EntryKind to a struct, Entry 2018-08-27 21:46:13 +01:00
varkor
befc4b1100 Rename hir::map::Node to hir::map::NodeKind 2018-08-27 21:45:46 +01:00