about summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2017-06-21Rollup merge of #42766 - nrc:versions, r=nagisaCorey Farwell-1/+1
Update rls-data version And update the RLS submod
2017-06-20Update rls-data depNick Cameron-1/+1
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-17Auto merge of #42650 - nrc:save-slim, r=eddybbors-3272/+844
save-analysis: remove a lot of stuff This commits us to the JSON format and the more general def/ref style of output, rather than also supporting different data formats for different data structures. This does not affect the RLS at all, but will break any clients of the CSV form - AFAIK there are none (beyond a few of my own toy projects) - DXR stopped working long ago. r? @eddyb
2017-06-16Remove intermediate forms and some other refactoringNick Cameron-2828/+843
2017-06-14Switch CrateNum queries to DefIdTaylor Cramer-1/+1
2017-06-14On-demandify extern_crateTaylor Cramer-1/+1
2017-06-14Remove CSV format of save-analysis dataNick Cameron-444/+1
2017-06-12Fix a bug where Json API save-analysis was not labelled as suchNick Cameron-2/+4
2017-06-12Impl and trait item sigsNick Cameron-27/+178
2017-06-12Implement a bunch more signature functionsNick Cameron-35/+231
2017-06-12Small refactoring + docsNick Cameron-31/+45
2017-06-12Use the new signature stuffNick Cameron-211/+95
And fix a couple of bugs
2017-06-12Update rls-dataNick Cameron-4/+1
2017-06-12Add a sig module to save-analysisNick Cameron-0/+561
Generates signatures for use in Rustdoc and similar tools.
2017-06-01Auto merge of #42281 - eddyb:well-adjusted, r=nikomatsakisbors-2/+1
Decompose Adjustment into smaller steps and remove the method map. The method map held method callee information for: * actual method calls (`x.f(...)`) * overloaded unary, binary, indexing and call operators * *every overloaded deref adjustment* (many can exist for each expression) That last one was a historical ~~accident~~ hack, and part of the motivation for this PR, along with: * a desire to compose adjustments more freely * containing the autoderef logic better to avoid mutation within an inference snapshot * not creating `TyFnDef` types which are incompatible with the original one * i.e. we used to take a`TyFnDef`'s `for<'a> &'a T -> &'a U` signature and instantiate `'a` using a region inference variable, *then* package the resulting `&'b T -> &'b U` signature in another `TyFnDef`, while keeping *the same* `DefId` and `Substs` * to fix #3548 by explicitly writing autorefs for the RHS of comparison operators Individual commits tell their own story, of "atomic" changes avoiding breaking semantics. Future work based on this PR could include: * removing the signature from `TyFnDef`, now that it's always "canonical" * some questions of variance remain, as subtyping *still* treats the signature differently * moving part of the typeck logic for methods, autoderef and coercion into `rustc::traits` * allowing LUB coercions (joining multiple expressions) to "stack up" many adjustments * transitive coercions (e.g. reify or unsize after multiple steps of autoderef) r? @nikomatsakis
2017-06-01rustc: replace method_map with Def::Method and node_substs entries.Eduard-Mihai Burtescu-1/+1
2017-06-01rustc: keep overloaded autoderef MethodCallee's in Adjust.Eduard-Mihai Burtescu-2/+1
2017-05-31Upgrade ProjectionTy's Name to a DefIdTobias Schottdorf-1/+1
Part of #42171, in preparation for downgrading the contained `TraitRef` to only its `substs`.
2017-05-25Hygienize lifetimes.Jeffrey Seyfried-1/+1
2017-05-13Auto merge of #41919 - nrc:save-crate, r=eddybbors-6/+31
Include the crate's root module in save-analysis r? @eddyb
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-12Pass crate attributes in visit.rsNick Cameron-5/+3
2017-05-11Ensure we walk the root module of the crateNick Cameron-6/+33
2017-05-09Update save-analysis deps and RLS submoduleNick Cameron-2/+2
2017-05-03convert save-analysis to use `ItemCtxt` and not `ast_ty_to_ty_cache`Niko Matsakis-7/+13
2017-05-02Removal pass for anonymous parametersest31-24/+24
Removes occurences of anonymous parameters from the rustc codebase, as they are to be deprecated. See issue #41686 and RFC 1685.
2017-04-28Auto merge of #41368 - nikomatsakis:incr-comp-dep-tracking-map, r=eddybbors-8/+8
make *most* maps private Currently we access the `DepTrackingMap` fields directly rather than using the query accessors. This seems bad. This branch removes several such uses, but not all, and extends the macro so that queries can hide their maps (so we can prevent regressions). The extension to the macro is kind of ugly :/ but couldn't find a simple way to do it otherwise (I guess I could use a nested macro...). Anyway I figure it's only temporary. r? @eddyb
2017-04-28introduce ability to if we have typeck-tables for a given def-idNiko Matsakis-5/+9
And use this in save-analysis, which used to read the map directly. This is an attempt to sidestep the failure occuring on homu that I cannot reproduce.
2017-04-28Auto merge of #41508 - michaelwoerister:generic-path-remapping, r=alexcrichtonbors-0/+2
Implement a file-path remapping feature in support of debuginfo and reproducible builds This PR adds the `-Zremap-path-prefix-from`/`-Zremap-path-prefix-to` commandline option pair and is a more general implementation of #41419. As opposed to the previous attempt, this implementation should enable reproducible builds regardless of the working directory of the compiler. This implementation of the feature is more general in the sense that the re-mapping will affect *all* paths the compiler emits, including the ones in error messages. r? @alexcrichton
2017-04-28do not access `typeck_tables` map directlyNiko Matsakis-9/+5
2017-04-27Auto merge of #37860 - giannicic:defaultimpl, r=nagisabors-1/+1
#37653 support `default impl` for specialization this commit implements the first step of the `default impl` feature: > all items in a `default impl` are (implicitly) `default` and hence > specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See [referenced](https://github.com/rust-lang/rust/issues/37653) issue for further info r? @aturon
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-0/+2
reproducible builds.
2017-04-25 support `default impl` for specializationGianni Ciccarelli-1/+1
pr review
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-2/+2
2017-04-24support `default impl` for specializationGianni Ciccarelli-2/+2
this commit implements the first step of the `default impl` feature: all items in a `default impl` are (implicitly) `default` and hence specializable. In order to test this feature I've copied all the tests provided for the `default` method implementation (in run-pass/specialization and compile-fail/specialization directories) and moved the `default` keyword from the item to the impl. See referenced issue for further info
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+2
2017-04-04rebasedNick Cameron-1/+5
2017-04-04save-analysis: index extern blocksNick Cameron-0/+90
2017-04-04save-analysis: only index path references onceNick Cameron-9/+2
2017-04-03Auto merge of #40915 - nrc:save-assoc, r=eddybbors-3/+27
save-analysis: track associated types r? @eddyb
2017-03-30save-analysis: track associated typesNick Cameron-3/+27
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-3/+3
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-6/+4
2017-03-27Rollup merge of #40751 - nrc:save-callback, r=eddybAlex Crichton-66/+159
save-analysis: allow clients to get data directly without writing to a file.
2017-03-27Fix various useless derefs and slicingsOliver Schneider-1/+1
2017-03-23Remove internal liblogAlex Crichton-1/+1
This commit deletes the internal liblog in favor of the implementation that lives on crates.io. Similarly it's also setting a convention for adding crates to the compiler. The main restriction right now is that we want compiler implementation details to be unreachable from normal Rust code (e.g. requires a feature), and by default everything in the sysroot is reachable via `extern crate`. The proposal here is to require that crates pulled in have these lines in their `src/lib.rs`: #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] This'll mean that by default they're not using these attributes but when compiled as part of the compiler they do a few things: * Mark themselves as entirely unstable via the `staged_api` feature and the `#![unstable]` attribute. * Allow usage of other unstable crates via `feature(rustc_private)` which is required if the crate relies on any other crates to compile (other than std).
2017-03-23save-analysis: allow clients to get data directly without writing to a fileNick Cameron-66/+159
2017-03-19Rollup merge of #40554 - nrc:rls-data, r=alexcrichtonCorey Farwell-782/+467
Use rls-data crate This basically pulls out a bunch of data structures used by save-analysis for serialization into an external crate, and pulls that crate in using Rustbuild. The RLS can then share these data structures with the compiler which in some cases will allow more efficient communication between the compiler and the RLS (i.e., without serialisation). Along the way, I have to pull in rls-span, which is the RLS's way of defining spans (more type-safe than the compiler's built-in way). This is basically just to convert from compiler spans to RLS spans. I also pull in the crates.io version of rustc-serialize, which is a bit annoying, but seems to be the only way to have serialisable data in an external crate. To make this work, all of the save-analysis crate has to use this version too (cc #40527). Finally I pull in a line from #40347 to make the unstable crate checking stuff working. There are a lot of changes to save-analysis but they are all mechanical and trivial - changing from using `From` to `Into` (because of orphan rules) being the main thing. r? @alexcrichton
2017-03-19Auto merge of #39799 - dpc:create_dir_all, r=alexcrichtonbors-1/+1
Fix race condition in fs::create_dir_all The code would crash if the directory was created after create_dir_all checked whether the directory already existed. This was contrary to the documentation which claimed to create the directory if it doesn't exist, implying (but not stating) that there would not be a failure due to the directory existing.