about summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2017-11-06save-analysis: fix bugs in method chainsNick Cameron-57/+20
Use the span we save in the PathSegment for a method call, rather than searching for it in the text. Fixes https://github.com/nrc/rls-analysis/issues/111
2017-11-06save-analysis: give better info for UnionsNick Cameron-26/+28
2017-11-04Auto merge of #45709 - nrc:rls-bugs-2, r=eddybbors-65/+112
Fix a bunch of minor save-analysis bugs r? @eddyb
2017-11-03add `auto` keyword, parse `auto trait`, lower to HIRleonardo.yvens-2/+7
Adds an `IsAuto` field to `ItemTrait` which flags if the trait was declared as an `auto trait`. Auto traits cannot have generics nor super traits.
2017-11-03[Syntax Breaking] Rename DefaultImpl to AutoImplleonardo.yvens-1/+1
DefaultImpl is a highly confusing name for what we now call auto impls, as in `impl Send for ..`. The name auto impl is not formally decided but for sanity anything is better than `DefaultImpl` which refers neither to `default impl` nor to `impl Default`.
2017-11-02Auto merge of #45647 - nrc:rls-bugs, r=eddybbors-2/+9
save-analysis: support unions r? @eddyb
2017-11-02Auto merge of #45468 - Xanewok:crate-source, r=nrcbors-13/+17
Emit crate disambiguators in save-analysis data Needed for https://github.com/nrc/rls-analysis/issues/93. Blocked by https://github.com/nrc/rls-data/pull/11. (For now, this pulls my branch [rls-data/crate-source](https://github.com/Xanewok/rls-data/tree/crate-source)) This will allow to disambiguate different crates types/versions when indexing resulting save-analysis data (most importantly allow to support bin+lib and different crate versions). r? @nrc
2017-11-02save-analysis: fix issue with sub-exprs in for loopsNick Cameron-3/+3
Fixes https://github.com/nrc/rls-analysis/issues/78
2017-11-02save-analysis: corrects reference for tuple struct and unit struct literalsNick Cameron-2/+13
Fixes https://github.com/nrc/rls-analysis/issues/77
2017-11-02save-analysis: handle types in turbofishNick Cameron-2/+15
fixes https://github.com/nrc/rls-analysis/issues/52
2017-11-02save-analysis: handle function types in boundsNick Cameron-58/+81
This special cases the function type sugar in paths and deals with traits bounds as just the path parts. That required refactoring the path collector to distinguish between variable decls and references in patterns, basically just to please the borrow checker. cc https://github.com/nrc/rls-analysis/issues/37
2017-10-31save-analysis: support unionsNick Cameron-2/+9
2017-10-27Use rls-data 0.12Igor Matuszewski-3/+5
2017-10-27Implement RFC 1861: Extern typesPaul Lietar-0/+27
2017-10-27Emit crate disambiguators in save-analysis dataIgor Matuszewski-13/+15
2017-10-24Merge branch 'master' into update-rls-data-for-save-analysisDustin Speckhals-6/+11
2017-10-17Lifting Generics from MethodSig to TraitItem and ImplItem since we want to ↵Sunjay Varma-5/+10
support generics in each variant of TraitItem and ImplItem
2017-10-14Implement `dyn Trait` syntaxVadim Petrochenkov-1/+1
2017-10-07Update rls-data for librustc-save-analysisDustin Speckhals-3/+3
0.10 -> 0.11 This will allow for more fine-grained save analysis for enum variants (tuple and struct)
2017-09-08Use NodeId/HirId instead of DefId for local variables.Eduard-Mihai Burtescu-9/+23
2017-09-07rustc: Remove `CrateStore::crates` as a methodAlex Crichton-1/+1
This commit moves the `crates` method to a query and then migrates all callers to use a query instead of the now-renamed `crates_untracked` method where possible. Closes #41417
2017-09-05rustc: Flag some CrateStore methods as "untracked"Alex Crichton-1/+1
The main use of `CrateStore` *before* the `TyCtxt` is created is during resolution, but we want to be sure that any methods used before resolution are not used after the `TyCtxt` is created. This commit starts moving the methods used by resolve to all be named `{name}_untracked` where the rest of the compiler uses just `{name}` as a query. During this transition a number of new queries were added to account for post-resolve usage of these methods.
2017-08-30Make fields of `Span` privateVadim Petrochenkov-8/+8
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-21Auto merge of #43971 - alexcrichton:lint-statements, r=michaelwoeristerbors-1/+1
rustc: Add `Local` to the HIR map of parents When walking parents for lints we want to be sure to hit `let` statements which can have attributes, so hook up these statements in the HIR map. Closes #43910
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-8/+1
2017-08-17rustc: Rename NodeLocal to NodeBindingAlex Crichton-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-13/+13
Like #43008 (f668999), but _much more aggressive_.
2017-08-14Auto merge of #43826 - kennytm:fix-43796-mis-calculated-spans, r=petrochenkovbors-123/+6
Fix "Mis-calculated spans" errors from `-Z save-analysis` + refactoring Removed the path span extraction methods from `SpanUtils`: * spans_with_brackets * spans_for_path_segments * spans_for_ty_params Use the `span` fields in `PathSegment` and `TyParam` instead. (Note that since it processes `ast::Path` not a qualified path (`hir::QPath` / `ast::QSelf`), UFCS path will be flattened: `<Foo as a::b::c::Trait>::D::E::F::g` will be seen as `a::b::c::Trait::D::E::F::g`.) Fix #43796. Close #41478. r? @nrc
2017-08-14Auto merge of #43740 - michaelwoerister:local-id-in-typecktables, r=arielb1bors-14/+25
Use hir::ItemLocalId as keys in TypeckTables. This PR makes `TypeckTables` use `ItemLocalId` instead of `NodeId` as key. This is needed for incremental compilation -- for stable hashing and for being able to persist and reload these tables. The PR implements the most important part of https://github.com/rust-lang/rust/issues/40303. Some notes on the implementation: * The PR adds the `HirId` to HIR nodes where needed (`Expr`, `Local`, `Block`, `Pat`) which obviates the need to store a `NodeId -> HirId` mapping in crate metadata. Thanks @eddyb for the suggestion! In the future the `HirId` should completely replace the `NodeId` in HIR nodes. * Before something is read or stored in one of the various `TypeckTables` subtables, the entry's key is validated via the new `TypeckTables::validate_hir_id()` method. This makes sure that we are not mixing information from different items in a single table. That last part could be made a bit nicer by either (a) new-typing the table-key and making `validate_hir_id()` the only way to convert a `HirId` to the new-typed key, or (b) just encapsulate sub-table access a little better. This PR, however, contents itself with not making things significantly worse. Also, there's quite a bit of switching around between `NodeId`, `HirId`, and `DefIndex`. These conversions are cheap except for `HirId -> NodeId`, so if the valued reviewer finds such an instance in a performance critical place, please let me know. Ideally we convert more and more code from `NodeId` to `HirId` in the future so that there are no more `NodeId`s after HIR lowering anywhere. Then the amount of switching should be minimal again. r? @eddyb, maybe?
2017-08-14save-analysis: Remove path span extraction methods from SpanUtilskennytm-123/+6
Use the `span` field in PathSegment and TyParam instead. Fix #43796. Close #41478.
2017-08-12Fix some typosBastien Orivel-3/+3
2017-08-11Improve validation of TypeckTables keys.Michael Woerister-1/+1
2017-08-11Encapsulate sub-table access in TypeckTables and validate keys on each access.Michael Woerister-2/+2
2017-08-11Add missing TypeckTables-switch in save-analysis.Michael Woerister-6/+8
2017-08-11Use ItemLocalId as key for node_types, node_substs, and adjustments in ↵Michael Woerister-5/+12
TypeckTables.
2017-08-11Make TypeckTables::type_dependent_defs use ItemLocalId instead of NodeId.Michael Woerister-3/+5
2017-08-03Appease tidy and fix save-analysis config for dist buildsNick Cameron-11/+12
2017-08-02Update rls-data depNick Cameron-4/+8
2017-08-02save-analysis: only emit public fields in value of a struct if the config ↵Nick Cameron-4/+10
permits
2017-08-01review changesNick Cameron-7/+10
2017-07-28save-anlaysis: fix filter_generatedNick Cameron-1/+1
2017-07-25save-analysis: dedup macro referencesNick Cameron-1/+11
2017-07-24Catch a panic in save-analysisNick Cameron-2/+2
2017-07-24Point RLS submodule at a branch with required changesNick Cameron-3/+10
And cargo update
2017-07-22Gate signatures on the configNick Cameron-0/+21
2017-07-22Use config::pub_only rather than a spearate api modeNick Cameron-142/+49
2017-07-22Use Config::full_docs to trim documentationNick Cameron-38/+44
2017-07-22Use a config file with save-analysisNick Cameron-31/+50
Replaces the output path env var. Can be passed to save-analysis via a function call or env var.
2017-07-11Downgrade ProjectionTy's TraitRef to its substsTobias Schottdorf-7/+1
Addresses the second part of #42171 by removing the `TraitRef` from `ProjectionTy`, and directly storing its `Substs`. Closes #42171.