summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2018-03-17Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`Vadim Petrochenkov-1/+1
2018-03-17AST: Make renames in imports closer to the sourceVadim Petrochenkov-1/+2
Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`
2018-03-13add `canonicalize` method to `InferCtxt` [VIC]Niko Matsakis-0/+1
2018-03-07Do not panic on tuple struct access out of boundsShotaro Yamada-7/+10
2018-03-07Fix save-analysis generation panic with invalid tuple accessShotaro Yamada-1/+4
2018-02-24Rollup merge of #48490 - petrochenkov:orpat, r=eddybManish Goregaokar-78/+85
Implement multiple patterns with `|` in `if let` and `while let` (RFC 2175) cc https://github.com/rust-lang/rust/issues/48215
2018-02-24Rollup merge of #48258 - nrc:save-proc-nested, r=eddybManish Goregaokar-12/+14
save-analysis: power through bracket mis-counts Closes #47981 This is pretty unsatisfying since it is working around a span bug. However, I can't track down the span bug and it could be in the parser, proc macro expansion, the user macro, or Syn (or any other library that can manipulate spans). Given that user code can cause this error, I think we need to be more robust here. r? @eddyb
2018-02-24Implement multiple patterns with `|` in `if let` and `while let`Vadim Petrochenkov-78/+85
2018-02-18Replace dummy spans with empty spansSeiichi Uchida-3/+4
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-20/+16
2018-02-16save-analysis: power through bracket mis-countsNick Cameron-12/+14
Closes #47981 This is pretty unsatisfying since it is working around a span bug. However, I can't track down the span bug and it could be in the parser, proc macro expansion, the user macro, or Syn (or any other library that can manipulate spans). Given that user code can cause this error, I think we need to be more robust here.
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