about summary refs log tree commit diff
path: root/src/librustc/ich
AgeCommit message (Collapse)AuthorLines
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-873/+0
2020-03-28Auto merge of #70483 - Centril:rollup-slli4yf, r=Centrilbors-1/+1
Rollup of 5 pull requests Successful merges: - #70345 (Remove `no_integrated_as` mode.) - #70434 (suggest `;` on expr `mac!()` which is good as stmt `mac!()`) - #70457 (non-exhastive diagnostic: add note re. scrutinee type) - #70478 (Refactor type_of for constants) - #70480 (clarify hir_id <-> node_id method names) Failed merges: r? @ghost
2020-03-27clarify hir_id <-> node_id method namesBastian Kauschke-1/+1
2020-03-26Retire DepGraphSafe and HashStableContext.Camille GILLOT-2/+0
2020-03-24normalize some imports, prefer direct ones.Mazdak Farrokhzad-7/+8
2020-03-24Rollup merge of #70277 - matthewjasper:remove-closurebound, r=nikomatsakisMazdak Farrokhzad-3/+0
Remove `ReClosureBound` We now substitute external names for regions in the query response. r? @nikomatsakis
2020-03-23Remove `ReClosureBound`Matthew Jasper-3/+0
2020-03-19rustc: use LocalDefId instead of DefIndex in hir::map::definitions.Eduard-Mihai Burtescu-1/+1
2020-03-19rustc: use LocalDefId instead of DefIndex in ich.Eduard-Mihai Burtescu-24/+9
2020-03-19rustc: use LocalDefId instead of DefIndex in HirId.Eduard-Mihai Burtescu-2/+2
2020-03-19rustc: introduce DefId::as_local(self) -> Option<LocalDefId> and use it.Eduard-Mihai Burtescu-2/+2
2020-03-18Properly handle Spans that reference imported SourceFilesAaron Hill-5/+3
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-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-3/+2
2020-03-14Update `visit_item_likes_in_module`John Kåre Alsaker-15/+7
2020-03-14Add HIR queriesJohn Kåre Alsaker-62/+9
2020-03-01Rollup merge of #69580 - matthiaskrgr:map_clone, r=CentrilYuki Okushi-1/+1
use .copied() instead of .map(|x| *x) on iterators
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-3/+3
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29use .copied() instead of .map(|x| *x) on iteratorsMatthias Krüger-1/+1
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-2/+2
2020-02-22Rename CodeMap to SourceMap follow upMaxim Zholobak-1/+1
2020-02-15Panic when hashing node IDsJohn Kåre Alsaker-6/+3
2020-02-15Treat NodeIs as pure values for incremental compilationJohn Kåre Alsaker-19/+3
2020-02-13Use HirId in TraitCandidate.Camille GILLOT-1/+0
2020-02-11Move it all into rustc_hir.Camille GILLOT-2/+0
2020-02-11Move lang_items definitions to librustc_lang_items.Camille GILLOT-6/+2
2020-02-09Rollup merge of #68718 - Aaron1011:move-def-hir-span, r=petrochenkovDylan DPC-6/+6
Move `rustc_hir::def_id` to `rustc_span::def_id` This will allow `HygieneData` to refer to `DefId` and `DefIndex`, which will enable proper serialization of Span hygiene information. This also reduces the number of things imported from `rustc_hir`, which might make it easier to remove dependencies on it.
2020-02-08Move librustc_hir/def_id.rs to librustc_span/def_id.rsAaron Hill-6/+6
For noww, librustc_hir re-exports the `def_id` module from librustc_span, so the rest of rustc can continue to reference rustc_hir::def_id
2020-02-07Auto merge of #65232 - nikomatsakis:lazy-norm-anon-const-push-2, r=matthewjasperbors-1/+4
replace the leak check with universes, take 2 This PR is an attempt to revive the "universe-based region check", which is an important step towards lazy normalization. Unlike before, we also modify the definition of `'empty` so that it is indexed by a universe. This sidesteps some of the surprising effects we saw before -- at the core, we no longer think that `exists<'a> { forall<'b> { 'b: 'a } }` is solveable. The new region lattice looks like this: ``` static ----------+-----...------+ (greatest) | | | early-bound and | | free regions | | | | | scope regions | | | | | empty(root) placeholder(U1) | | / | | / placeholder(Un) empty(U1) -- / | / ... / | / empty(Un) -------- (smallest) ``` This PR has three effects: * It changes a fair number of error messages, I think for the better. * It fixes a number of bugs. The old algorithm was too conservative and caused us to reject legal subtypings. * It also causes two regressions (things that used to compile, but now do not). * `coherence-subtyping.rs` gets an additional error. This is expected. * `issue-57639.rs` regresses as before, for the reasons covered in #57639. Both of the regressions stem from the same underlying property: without the leak check, the instantaneous "subtype" check is not able to tell whether higher-ranked subtyping will succeed or not. In both cases, we might be able to fix the problem by doing a 'leak-check like change' at some later point (e.g., as part of coherence). This is a draft PR because: * I didn't finish ripping out the leak-check completely. * We might want to consider a crater run before landing this. * We might want some kind of design meeting to cover the overall strategy. * I just remembered I never finished 100% integrating this into the canonicalization code. * I should also review what happens in NLL region checking -- it probably still has a notion of bottom (empty set). r? @matthewjasper
2020-02-07Remove HashStable impl for ast::LifetimeJohn Kåre Alsaker-7/+0
2020-02-06index ReEmpty by universeNiko Matsakis-1/+4
We now make `'empty` indexed by a universe index, resulting in a region lattice like this: ``` static ----------+-----...------+ (greatest) | | | early-bound and | | free regions | | | | | scope regions | | | | | empty(root) placeholder(U1) | | / | | / placeholder(Un) empty(U1) -- / | / ... / | / empty(Un) -------- (smallest) ``` Therefore, `exists<A> { forall<B> { B: A } }` is now unprovable, because A must be at least Empty(U1) and B is placeholder(U2), and hence the two regions are unrelated.
2020-02-05move item reference commentljedrz-7/+0
2020-02-05merge item id stable hashing functionsljedrz-20/+1
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-1/+1
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-13/+10
2020-01-04hir::{hir,def,itemlikevisit,pat_util,print} -> rustc_hirMazdak Farrokhzad-145/+137
Also fix fallout wrt. HashStable.
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-2/+2
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-13/+13
2019-12-27Syntax for hir::Ty.Camille GILLOT-2/+2
2019-12-26Syntax for hir::Expr.Camille GILLOT-1/+1
2019-12-22Format the worldMark Rousskov-190/+110
2019-12-21Use Arena inside hir::Body.Camille GILLOT-2/+2
2019-12-21Use Arena inside hir::Mod.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::ImplItem.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::TraitItem.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::Item.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::Crate.Camille GILLOT-2/+2
2019-12-18Remove some unnecessary `ATTR_*` constants.Nicholas Nethercote-15/+7
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-2/+1