about summary refs log tree commit diff
path: root/src/librustc/hir
AgeCommit message (Collapse)AuthorLines
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-2040/+0
2020-03-27clarify hir_id <-> node_id method namesBastian Kauschke-11/+17
2020-03-27Rollup merge of #70344 - Centril:hir-pretty, r=eddybDylan DPC-41/+24
Decouple `rustc_hir::print` into `rustc_hir_pretty` High level summary: - The HIR pretty printer, `rustc_hir::print` is moved into a new crate `rustc_hir_pretty`. - `rustc_ast_pretty` and `rustc_errors` are dropped as `rustc_hir` dependencies. - The dependence on HIR pretty is generally reduced, leaving `rustc_save_analysis`, `rustdoc`, `rustc_metadata`, and `rustc_driver` as the remaining clients. The main goal here is to reduce `rustc_hir`'s dependencies and its size such that it can start and finish earlier, thereby working towards https://github.com/rust-lang/rust/issues/65031. r? @Zoxc
2020-03-25Rollup merge of #70373 - Centril:canon-imports, r=Mark-SimulacrumMazdak Farrokhzad-4/+2
normalize some imports & prefer direct ones r? @Mark-Simulacrum
2020-03-24normalize some imports, prefer direct ones.Mazdak Farrokhzad-4/+2
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-41/+24
2020-03-24move rustc_hir::print -> rustc_hir_prettyMazdak Farrokhzad-4/+4
2020-03-24hir::map: simplify matching codeMazdak Farrokhzad-133/+73
2020-03-24{rustc::hir::map -> rustc_passes}::hir_id_validatorMazdak Farrokhzad-178/+0
2020-03-23Auto merge of #70204 - Centril:unshackled-lowering, r=Zoxcbors-552/+3
Liberate `rustc_ast_lowering` from `rustc` The whole point of this PR is the very last commit, in which we remove `rustc` as one of `rustc_ast_lowering`'s dependencies, thereby improving `./x.py` parallelism and working towards https://github.com/rust-lang/rust/issues/65031. Noteworthy: - From `rustc::arena` we move logic into `arena`, in particular `declare_arena!`. This is then used in `rustc_ast_lowering` so that lowering has its own separate arena. - Some linting code is unfortunately moved to `rustc_session::lint` cause its used both in `rustc_lint` and `rustc_ast_lowering`, and this is their common dependency. - `rustc_session::CrateDisambiguator` is moved into `rustc_ast` so that `rustc::hir::map::definitions` can be moved into `rustc_hir`, so that `rustc_ast_lowering` can stop referring to `rustc::hir`. r? @Zoxc
2020-03-22Rollup merge of #70254 - matthiaskrgr:cl4ppy, r=CentrilDylan DPC-3/+1
couple more clippy fixes (let_and_return, if_same_then_else) * summarize if-else-code with identical blocks (clippy::if_same_then_else) * don't create variable bindings just to return the bound value immediately (clippy::let_and_return)
2020-03-22don't create variable bindings just to return the bound value immediately ↵Matthias Krüger-3/+1
(clippy::let_and_return)
2020-03-21{rustc::hir::map -> rustc_hir}::definitionsMazdak Farrokhzad-551/+3
2020-03-21move CrateDisambiguator -> rustc_astMazdak Farrokhzad-3/+2
2020-03-21Allow `hir().find` to return `None`John Kåre Alsaker-17/+22
2020-03-19hir: replace "items" terminology with "nodes" where appropriate.Eduard-Mihai Burtescu-26/+29
2020-03-19rustc: use LocalDefId instead of DefIndex in hir::map::definitions.Eduard-Mihai Burtescu-106/+100
2020-03-19rustc: use LocalDefId instead of DefIndex in HirId.Eduard-Mihai Burtescu-54/+42
2020-03-19rustc: introduce DefId::as_local(self) -> Option<LocalDefId> and use it.Eduard-Mihai Burtescu-12/+16
2020-03-19rustc: make LocalDefId's index field public like DefId's is.Eduard-Mihai Burtescu-1/+1
2020-03-18Properly handle Spans that reference imported SourceFilesAaron Hill-2/+2
Previously, metadata encoding used DUMMY_SP to represent any spans that referenced an 'imported' SourceFile - e.g. a SourceFile from an upstream dependency. These leads to sub-optimal error messages in certain cases (see the included test). This PR changes how we encode and decode spans in crate metadata. We encode spans in one of two ways: * 'Local' spans, which reference non-imported SourceFiles, are encoded exactly as before. * 'Foreign' spans, which reference imported SourceFiles, are encoded with the CrateNum of their 'originating' crate. Additionally, their 'lo' and 'high' values are rebased on top of the 'originating' crate, which allows them to be used with the SourceMap data encoded for that crate. The `ExternalSource` enum is renamed to `ExternalSourceKind`. There is now a struct called `ExternalSource`, which holds an `ExternalSourceKind` along with the original line number information for the file. This is used during `Span` serialization to rebase spans onto their 'owning' crate.
2020-03-17Rename `from_u32_const` -> `from_u32`Dylan MacKenzie-1/+1
2020-03-15update commentMark Mansi-5/+1
2020-03-15More Method->Fn renamingMark Mansi-14/+19
2020-03-14Don't try to print missing HIR idsJohn Kåre Alsaker-2/+2
2020-03-14Create the `hir_to_node_id` map before `TyCtxt`John Kåre Alsaker-31/+25
2020-03-14Optimize the HIR mapJohn Kåre Alsaker-46/+49
2020-03-14Don't hash HIR with bodies thriceJohn Kåre Alsaker-37/+43
2020-03-14Fix HIR map validationJohn Kåre Alsaker-12/+14
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-142/+53
2020-03-14Only hash the Hir owner (including its bodies)John Kåre Alsaker-4/+36
2020-03-14Remove `Hir` and `HirBody` dep nodesJohn Kåre Alsaker-2/+2
2020-03-14Clean up the collectorJohn Kåre Alsaker-137/+31
2020-03-14Remove `AllLocalTraitImpls`John Kåre Alsaker-8/+0
2020-03-14Remove the `map` field from `Map`John Kåre Alsaker-27/+0
2020-03-14Update `trait_impls`John Kåre Alsaker-7/+3
2020-03-14Remove commentsJohn Kåre Alsaker-3/+0
2020-03-14Update `find_entry`John Kåre Alsaker-1/+1
2020-03-14Update `is_hir_id_module`John Kåre Alsaker-3/+3
2020-03-14Update `find`John Kåre Alsaker-7/+2
2020-03-14Update `get_parent_node`John Kåre Alsaker-9/+2
2020-03-14Update `visit_item_likes_in_module`John Kåre Alsaker-36/+12
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-25/+35
2020-03-14Update `body_owner` and `maybe_body_owned_by`John Kåre Alsaker-39/+31
2020-03-14Update `fn_decl_by_hir_id` and `fn_sig_by_hir_id`John Kåre Alsaker-42/+44
2020-03-14Update item functionsJohn Kåre Alsaker-15/+12
2020-03-14Create Map after TyCtxtJohn Kåre Alsaker-141/+95
2020-03-14Collect the new mapsJohn Kåre Alsaker-8/+62
2020-03-14Add HIR queriesJohn Kåre Alsaker-0/+24
2020-03-14Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddybYuki Okushi-2/+2
remove lifetimes that can be elided (clippy::needless_lifetimes)