Commit Graph

140 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
7901c7f707 canonicalize FxHash{Map,Set} imports 2020-01-04 18:57:22 +01:00
Mazdak Farrokhzad
75e4783f63 Normalize syntax::source_map imports. 2020-01-02 13:57:04 +01:00
Vadim Petrochenkov
70f1d57048 Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
Camille GILLOT
6b87d5cdf1 Syntax for hir::Ty. 2019-12-27 19:20:28 +01:00
Camille GILLOT
2b1cfe5b5b Syntax for hir::Expr. 2019-12-26 23:36:12 +01:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Camille GILLOT
e2526120f2 Use Arena inside hir::StructField. 2019-12-21 23:33:42 +01:00
Camille GILLOT
4f1c88be46 Use Arena inside hir::EnumDef. 2019-12-21 23:32:42 +01:00
Camille GILLOT
5fec1ca0ff Use Arena inside hir::ImplItem. 2019-12-21 23:31:47 +01:00
Camille GILLOT
0f7d77363b Use Arena inside hir::TraitItem. 2019-12-21 23:30:52 +01:00
Camille GILLOT
acf33f2d6b Use Arena inside hir::ForeignItem. 2019-12-21 23:29:27 +01:00
Camille GILLOT
abbe6259e1 Handle Attributes in arena. 2019-12-21 23:20:09 +01:00
Camille GILLOT
084e6722f9 Use Arena inside hir::Item. 2019-12-21 23:17:29 +01:00
Camille GILLOT
4dc79f1f7d Use Arena inside hir::Crate. 2019-12-21 23:12:44 +01:00
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