Michael Woerister
d0be27c8ec
Use on-disk-hash-table format for DefPathHashMap in hir::definitions.
2021-09-14 13:54:41 +02:00
Camille GILLOT
fb5ced0fbd
Add sanity check.
...
We force the relative span's parent to be absolute. This avoids having to
handle long dependency chains.
2021-09-10 20:18:26 +02:00
Camille GILLOT
06f7ca307d
Keep def_spans collected by resolution.
2021-09-10 20:17:08 +02:00
Camille GILLOT
071a047dc7
Make resolutions a query.
2021-07-06 19:22:27 +02:00
bors
d04ec47358
Auto merge of #86143 - bjorn3:revert_revert_merge_crate_disambiguator, r=michaelwoerister
...
Reland "Merge CrateDisambiguator into StableCrateId"
Reverts https://github.com/rust-lang/rust/pull/85891 as this revert of #85804 made perf even worse.
r? `@Mark-Simulacrum`
2021-07-06 11:31:59 +00:00
bjorn3
489ad8b8b5
Revert "Revert "Merge CrateDisambiguator into StableCrateId""
...
This reverts commit 8176ab8bc1
.
2021-07-06 11:28:04 +02:00
Camille GILLOT
3162c37b59
Store macro parent module in ExpnData.
2021-07-06 08:07:06 +02:00
Camille GILLOT
aeb050da9f
Do not require the DefPathTable to construct the on-disk cache.
2021-06-08 22:23:03 +02:00
bjorn3
8176ab8bc1
Revert "Merge CrateDisambiguator into StableCrateId"
...
This reverts commit d0ec85d3fb
.
2021-06-07 10:37:45 +02:00
Tomasz Miąsko
c1f6495b8e
Miscellaneous inlining improvements
2021-06-02 08:49:58 +02:00
Camille Gillot
0f0f3138cb
Revert "Reduce the amount of untracked state in TyCtxt"
2021-06-01 09:05:22 +02:00
Camille GILLOT
5d9f96ab27
Make resolutions a query.
2021-05-30 19:47:00 +02:00
bjorn3
d0ec85d3fb
Merge CrateDisambiguator into StableCrateId
2021-05-30 12:51:34 +02:00
Justus K
b6120bfb35
Add type to differentiate between fake and real DefId's
2021-05-04 19:34:12 +02:00
Joshua Nelson
441dc3640a
Remove (lots of) dead code
...
Found with https://github.com/est31/warnalyzer .
Dubious changes:
- Is anyone else using rustc_apfloat? I feel weird completely deleting
x87 support.
- Maybe some of the dead code in rustc_data_structures, in case someone
wants to use it in the future?
- Don't change rustc_serialize
I plan to scrap most of the json module in the near future (see
https://github.com/rust-lang/compiler-team/issues/418 ) and fixing the
tests needed more work than I expected.
TODO: check if any of the comments on the deleted code should be kept.
2021-03-27 22:16:33 -04:00
Joshua Nelson
e161a2fd73
Remove unused opt_local_def_id_to_hir_id
function
...
Found while investigating #82933 - all LocalDefIds are expected to have
HirIds, there's no point in pretending otherwise.
2021-03-14 01:37:13 -05:00
Michael Woerister
9e5054498b
Add unit test to ensure that both parts of a DefPathHash depend on the defining crate's ID.
2021-02-04 16:33:58 +01:00
Michael Woerister
97380e3b06
Add more explanation to local DefPathHash collision case.
2021-02-04 11:01:52 +01:00
Michael Woerister
22d489be76
Let a portion of DefPathHash uniquely identify the DefPath's crate.
...
This allows to directly map from a DefPathHash to the crate it
originates from, without constructing side tables to do that mapping.
It also allows to reliably and cheaply check for DefPathHash collisions.
2021-02-02 17:40:29 +01:00
Camille GILLOT
c58a6fa422
Iterate DefId to encode spans.
2021-01-23 13:44:02 +01:00
Nicholas-Baron
261ca04c92
Changed unwrap_or to unwrap_or_else in some places.
...
The discussion seems to have resolved that this lint is a bit "noisy" in
that applying it in all places would result in a reduction in
readability.
A few of the trivial functions (like `Path::new`) are fine to leave
outside of closures.
The general rule seems to be that anything that is obviously an
allocation (`Box`, `Vec`, `vec![]`) should be in a closure, even if it
is a 0-sized allocation.
2020-11-10 20:07:47 -08:00
est31
6897619d6d
Remove unused code from rustc_hir
2020-10-14 04:14:32 +02:00
est31
a0fc455d30
Replace absolute paths with relative ones
...
Modern compilers allow reaching external crates
like std or core via relative paths in modules
outside of lib.rs and main.rs.
2020-10-13 14:16:45 +02:00
marmeladema
5946c12476
Move is_raw_guess
check in ty::print::pretty
2020-09-25 22:48:44 +01:00
marmeladema
35bad3edbf
Address review comment
2020-09-25 22:48:44 +01:00
marmeladema
657ecdb75e
Rename DefPathData::get_name()
to DefPathData::name()
2020-09-25 22:46:15 +01:00
marmeladema
2708ad8bb4
Fix pretty-printing of DisambiguatedDefPathData
2020-09-25 22:46:15 +01:00
marmeladema
9f50c49117
Implement Display
for DisambiguatedDefPathData
and DefPathData
2020-09-25 22:46:15 +01:00
marmeladema
f1878d19fa
Move from {{closure}}#0 syntax to {closure#0} for (def) path components
2020-09-25 22:46:14 +01:00
Bastian Kauschke
cdd5d60b47
add track_caller to local_def_id_to_hir_id
2020-09-04 09:24:44 +02:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00