Commit Graph

136 Commits

Author SHA1 Message Date
John Kåre Alsaker
b40e6baec7 Update visit_item_likes_in_module 2020-03-14 22:52:29 +01:00
Matthias Krüger
83980aca20 Don't redundantly repeat field names (clippy::redundant_field_names) 2020-03-06 19:42:18 +01:00
Vadim Petrochenkov
e08c279eac Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
Mazdak Farrokhzad
097d5e1c5e 1. move node_id to syntax
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
2020-02-01 18:58:08 +01:00
Mazdak Farrokhzad
41453d2f74 collector: clarify dependencies 2020-01-08 21:58:41 +01:00
Mazdak Farrokhzad
ebfd8673a7 Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
Mazdak Farrokhzad
5ccc1e45bd move Node{Map,Set} -> rustc_session::node_id 2020-01-04 18:59:28 +01:00
Vadim Petrochenkov
70f1d57048 Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Vadim Petrochenkov
bbbdbb0e44 Move def collector from rustc to rustc_resolve 2019-11-23 18:19:57 +03:00
Camille GILLOT
c4bc3f05f5 More HashStable. 2019-11-19 20:40:28 +01:00
Eduard-Mihai Burtescu
25953321c0 rustc: remove "GlobalMetaData" dead code from hir::map::definitions. 2019-11-05 21:00:38 +02:00
Eduard-Mihai Burtescu
cc575a6ad5 rustc: use IndexVec<DefIndex, T> instead of Vec<T>. 2019-10-28 11:38:36 +02:00
Mazdak Farrokhzad
fb12c70852 rustc, rustc_passes: don't depend on syntax_expand.
This is done by moving some data definitions to syntax::expand.
2019-10-27 17:05:57 +01:00
Eduard-Mihai Burtescu
595d19e625 rustc: replace a few .cloned() with .copied(). 2019-10-25 20:21:37 +03:00
Eduard-Mihai Burtescu
4d81e9dd2f rustc: make DefPathData (and friends) Copy (now that it uses Symbol). 2019-10-25 20:03:17 +03:00
Mazdak Farrokhzad
a649b1666c
Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddyb
Remove `InternedString`

This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places.

r? @eddyb
2019-10-23 22:19:19 +02:00
Nicholas Nethercote
ac6daed384 Remove many unnecessary trait derivations. 2019-10-21 20:59:18 +11:00
Nicholas Nethercote
b8214e9b44 Convert fields within DefPathData from InternedString to Symbol.
It's a full conversion, except in `DefKey::compute_stable_hash()` where
a `Symbol` now is converted to an `InternedString` before being hashed.
This was necessary to avoid test failures.
2019-10-21 17:17:36 +11:00
Nicholas Nethercote
d343ee839b Remove Hash impls for DefPath, DisambiguatedDefPathData, and DefKey.
They aren't used.
2019-10-18 16:36:17 +11:00
Mazdak Farrokhzad
d420d719c4 move syntax::ext to new crate syntax_expand 2019-10-16 10:59:53 +02:00
csmoe
64f61c7888 remove indexed_vec re-export from rustc_data_structures 2019-09-29 16:48:31 +00:00
Vadim Petrochenkov
fc9f13e424 def_collector: Do not ICE on attributes on unnamed fields 2019-09-14 17:36:39 +03:00
Alexander Regueiro
c1d29ee3c7 Aggregation of cosmetic changes made during work on REPL PRs: librustc 2019-09-07 16:27:19 +01:00
Aaron Hill
64f867ae3e
Serialize additional data for procedural macros
Split off from #62855

This PR deerializes the declaration `Span` and attributes for all
procedural macros from their underlying function definitions.
This allows Rustdoc to properly render doc comments
and source links when inlining procedural macros across crates
2019-08-17 13:14:05 -04:00
Vadim Petrochenkov
09703e3843 Adjust other names after the Mark renaming 2019-07-19 12:01:49 +03:00
Vadim Petrochenkov
31e10aec83 libsyntax: Remove Mark into ExpnId 2019-07-19 12:01:48 +03:00
Vadim Petrochenkov
e272946066 def_collector: Simplify tracking of macro invocation parents
Avoid the tricky scheme with callbacks and keep the invocation parent data where it logically belongs - in `Definitions`.

This also allows to create `InvocationData` entries in resolve when the data is actually ready, and remove cells and "uninitialized" variants from it.
2019-07-11 00:12:08 +03:00
ljedrz
7987719dbe remove FIXMEs for functions that won't go away 2019-07-04 12:29:26 +02:00
ljedrz
21e63dddbe remove definitions::def_index_to_node_id (unused) 2019-06-20 12:47:26 +02:00
Mazdak Farrokhzad
97df8676b7
Rollup merge of #59600 - tobia:master, r=pnkfelix
Replaced linear token counting macros with optimized implementation

There are currently two distinct token-counting macros in the source. Both implement the trivial algorithm, with linear complexity. They may or may not be adequate for their use case, but considering that other people are probably going to copy and paste them whenever they need a token-counting macro, I replaced them with an optimized implementation with logarithmic complexity.
2019-06-10 13:14:26 +02:00
Alexander Regueiro
a71d55701e Addressed points raised in review. 2019-06-05 21:09:27 +01:00
Alexander Regueiro
3816958f18 Implemented for function bounds, type bounds, and named existential types. 2019-06-05 21:09:26 +01:00
Alexander Regueiro
35585c499f Aggregation of drive-by cosmetic changes. 2019-06-05 21:09:26 +01:00
Fabian Drinck
a5e9d8240e Auto-derive Encode and Decode implementations 2019-05-25 11:40:06 +02:00
Fabian Drinck
b18de52080 Declare DefIndex with the newtype_index macro 2019-05-18 13:19:33 +02:00
Nicholas Nethercote
4ab5fe3f97 Avoid unnecessary interning in DefPathData::as_interned_str(). 2019-05-17 20:10:52 +10:00
Vadim Petrochenkov
ee6d315200 cleanup: Remove DefIndexAddressSpace 2019-05-09 00:46:38 +03:00
Eduard-Mihai Burtescu
60f1944ebf rustc: rename DefPathData::{MacroDef,LifetimeParam} to {Macro,Lifetime}Ns. 2019-05-04 05:10:46 +03:00
Eduard-Mihai Burtescu
2efeb485a9 rustc: collapse relevant DefPathData variants into ValueNs. 2019-05-04 05:10:46 +03:00
Eduard-Mihai Burtescu
e5b9f54cd9 rustc: collapse relevant DefPathData variants into TypeNs. 2019-05-04 05:10:46 +03:00
Tobia
a4a07e00ce Replaced linear token counting macros with optimized implementation 2019-04-13 01:24:10 +09:00
Vadim Petrochenkov
2cbc25e6fc Merge DefPathData::VariantCtor and DefPathData::StructCtor 2019-03-24 17:59:18 +03: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
Eduard-Mihai Burtescu
a54a41ce47 rustc: provide DisambiguatedDefPathData in ty::print. 2019-03-15 13:25:10 +02:00
Alexander Regueiro
c3e182cf43 rustc: doc comments 2019-02-10 23:42:32 +00:00
varkor
29f7206366 Add const params to Def
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
Mark Mansi
e957ed9d10 move librustc to 2018 2019-02-05 12:45:47 -06:00
ljedrz
272f4dfff6 hir: remove Definitions::hir_to_def_index 2019-02-03 22:27:52 +01:00
ljedrz
e8aeb83a4a hir: add HirId methods 2019-02-03 20:37:04 +01:00