Commit Graph

23 Commits

Author SHA1 Message Date
Gurpreet Singh
d2753f91b5 replaced log with tracing 2020-08-15 13:03:11 -07:00
Tyler Mandry
28b11abc2f
Rollup merge of #75448 - lcnr:rn-as_local_hir_id, r=davidtwco
merge `as_local_hir_id` with `local_def_id_to_hir_id`

`as_local_hir_id` was defined as just calling `local_def_id_to_hir_id` and I think that having two different ways to call the same method is somewhat confusing.

Don't really care about which of these 2 methods we want to keep.

Does this require an MCP, considering that these methods are fairly frequently used?
2020-08-14 20:07:11 -07:00
Matthew Jasper
cbcef3effc Rework rustc_serialize
- Move the type parameter from `encode` and `decode` methods to
  the trait.
- Remove `UseSpecialized(En|De)codable` traits.
- Remove blanket impls for references.
- Add `RefDecodable` trait to allow deserializing to arena-allocated
  references safely.
- Remove ability to (de)serialize HIR.
- Create proc-macros `(Ty)?(En|De)codable` to help implement these new
  traits.
2020-08-14 17:34:30 +01:00
Bastian Kauschke
cd53760cc7 merge as_local_hir_id with local_def_id_to_hir_id 2020-08-13 16:55:16 +02:00
marmeladema
bd4f6f0b7d Move next_disambiguator to Resolver 2020-06-21 23:49:06 +01:00
marmeladema
1d3f49f536 Always create a root definition when creating a new Definitions object. 2020-06-21 23:13:31 +01:00
marmeladema
f60513ec8d Move remaining NodeId APIs from Definitions to Resolver 2020-06-21 23:13:31 +01:00
marmeladema
13104ef1c5 Pre-compute def_id_to_hir_id table 2020-06-20 13:02:05 +01:00
marmeladema
94817e38e1 Pre-compute hir_id_to_def_id mapping 2020-06-20 11:03:58 +01:00
marmeladema
6a0f1af19d Remove HirId to NodeId conversion APIs 2020-06-20 11:03:58 +01:00
marmeladema
a98f35f503 Remove NodeId to HirId conversion APIs 2020-06-20 11:03:57 +01:00
Vadim Petrochenkov
73d5cb0a45 expand: Give reasonable NodeIds to lints associated with macro expansions 2020-06-09 22:27:13 +03:00
marmeladema
d0fccb552b Remove unsused NodeId related APIs in hir map 2020-06-04 20:32:35 +01:00
marmeladema
2f3dd7b187 Remove remaining calls to as_local_node_id 2020-05-29 20:05:44 +01:00
marmeladema
5728c5371d Use HirId as key for ResolverOutputs::trait_map instead of NodeId 2020-05-21 17:07:47 +01:00
Josh Stone
2325c20925 Avoid unused Option::map results
These are changes that would be needed if we add `#[must_use]` to
`Option::map`, per #71484.
2020-04-24 13:58:41 -07:00
marmeladema
bfce24aa67 Modify as_local_hir_id to return a bare HirId 2020-04-23 23:14:07 +01:00
marmeladema
6148db719f Modify as_local_hir_id to accept a LocalDefId instead of a DefId 2020-04-23 23:14:07 +01:00
marmeladema
c15e13ae16 Remove DUMMY_HIR_ID 2020-04-14 08:46:07 +01:00
marmeladema
b9161ab880 Do not use DUMMY_HIR_ID as placeholder value in node_id_to_hir_id table
Some helpers functions have been introduced to deal with (buggy) cases
where either a `NodeId` or a `DefId` do not have a corresponding `HirId`.
Those cases are tracked in issue #71104.
2020-04-14 08:46:07 +01:00
marmeladema
59e0db69e0 librustc_hir: return LocalDefId instead of DefId in local_def_id 2020-04-08 00:43:56 +01:00
Bastian Kauschke
37603f499a clarify hir_id <-> node_id method names 2020-03-27 16:43:20 +01:00
Mazdak Farrokhzad
14f89ded2c {rustc::hir::map -> rustc_hir}::definitions 2020-03-21 22:20:24 +01:00