summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2018-02-10Emit data::Impl in save-analysisMartin Algesten-9/+48
2018-02-06Rollup merge of #48007 - nrc:rls-field-init, r=eddybkennytm-1/+1
save-analysis: avoid implicit unwrap When looking up a field defintion, since the name might be incorrect in the field init shorthand case. cc https://github.com/rust-lang-nursery/rls/issues/699 r? @eddyb
2018-02-06Rollup merge of #47496 - QuietMisdreavus:rls-doc-include, r=estebankkennytm-0/+11
add documentation from doc(include) to analysis data cc #44732 Currently save-analysis only loads docs from plain doc comments and doc attributes. Since `#[doc(include="filename.md")]` doesn't create a plain doc attribute when it loads the file, we need to be sure to pick up this info for the analysis data.
2018-02-05save-analysis: avoid implicit unwrapNick Cameron-1/+1
When looking up a field defintion, since the name might be incorrect in the field init shorthand case. cc https://github.com/rust-lang-nursery/rls/issues/699
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-1/+1
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2018-01-16add documentation from doc(include) to analysis dataQuietMisdreavus-0/+11
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-11/+0
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2018-01-13Auto merge of #47181 - michaelwoerister:var-len-def-index, r=eddybbors-1/+1
Use DefIndex encoding that works better with on-disk variable length integer representations. Use the least instead of the most significant bit for representing the address space. r? @eddyb
2018-01-13Rollup merge of #47081 - pietroalbini:fix-nested-tree-dump, r=nrckennytm-1/+7
Fix nested imports not included in the save_analysis output This PR fixes #46823. The bug was caused by the old access level checking code, which checked against the root UseTree even for nested trees. The problem with that is, for nested trees the root is lowered as an empty `ListStem`, which is not reachable by definition. The new code computes the access level with each tree's own ID, and with the root tree's visibility. I tested this manually and it works, but I'm not really satisfied with that. I looked at the existing tests though, and no one checked for the save_analysis output as far as I can see. How should I proceed with that? I think having a test about this would be really nice.
2018-01-09Replace uses of DepGraph.in_ignore with DepGraph.with_ignoreJohn Kåre Alsaker-12/+12
2018-01-09Rollup merge of #47258 - rkruppe:struct-assert, r=eddybkennytm-2/+4
rustc::ty: Rename struct_variant to non_enum_variant r? @eddyb
2018-01-08Use different DefIndex representation that is better suited for variable ↵Michael Woerister-1/+1
length integer encodings.
2018-01-08rustc::ty: Rename `struct_variant` to `non_enum_variant`Robin Kruppe-2/+4
It is also intended for use with unions.
2018-01-07Try to fix a perf regression by updating logMalo Jaffré-1/+1
Upgrade `log` to `0.4` in multiple crates.
2017-12-30Fix nested imports not included in the save_analysis outputPietro Albini-1/+7
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-89/+100
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-15save-analysis: dump extern crate importsAndy Russell-1/+4
2017-12-15save-analysis: document `process_use_tree`Andy Russell-0/+10
2017-12-15save-analysis: add parents to importsAndy Russell-4/+10
2017-12-14stub out trait aliases in save_analysisAlex Burka-0/+21
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-14/+14
2017-11-30Implement RFC 2128 (use_nested_groups)Pietro Albini-81/+107
This commit adds support for nested groups inside `use` declarations, such as `use foo::{bar, sub::{baz::Foo, *}};`.
2017-11-19initialize `Access` with macroAndy Russell-52/+19
2017-11-19allow filtering analysis by reachabilityAndy Russell-44/+119
2017-11-19upgrade rls-dataAndy Russell-1/+1
2017-11-08save-analysis: run rustfmtNick Cameron-767/+945
2017-11-08save-analysis: fix bug with method idsNick Cameron-1/+7
This just handles a missing entry, doesn't try to recover, because I couldn't actually find a test case. cc https://github.com/rust-lang-nursery/rls/issues/558
2017-11-08save-analysis: fix regression from #45709Nick Cameron-11/+16
closes https://github.com/nrc/rls-analysis/issues/117
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.