summary refs log tree commit diff
path: root/src/librustc_save_analysis/lib.rs
AgeCommit message (Collapse)AuthorLines
2017-09-08Use NodeId/HirId instead of DefId for local variables.Eduard-Mihai Burtescu-7/+22
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-6/+6
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-4/+4
Like #43008 (f668999), but _much more aggressive_.
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-11Make TypeckTables::type_dependent_defs use ItemLocalId instead of NodeId.Michael Woerister-3/+5
2017-08-01review changesNick Cameron-0/+1
2017-07-24Point RLS submodule at a branch with required changesNick Cameron-1/+2
And cargo update
2017-07-22Use config::pub_only rather than a spearate api modeNick Cameron-54/+13
2017-07-22Use Config::full_docs to trim documentationNick Cameron-29/+35
2017-07-22Use a config file with save-analysisNick Cameron-30/+49
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.
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-17Auto merge of #42650 - nrc:save-slim, r=eddybbors-301/+334
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-293/+333
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-8/+1
2017-06-12Impl and trait item sigsNick Cameron-3/+5
2017-06-12Implement a bunch more signature functionsNick Cameron-6/+3
2017-06-12Small refactoring + docsNick Cameron-1/+15
2017-06-12Use the new signature stuffNick Cameron-65/+14
And fix a couple of bugs
2017-06-12Add a sig module to save-analysisNick Cameron-0/+1
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-1/+1
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-11Ensure we walk the root module of the crateNick Cameron-1/+1
2017-05-03convert save-analysis to use `ItemCtxt` and not `ast_ty_to_ty_cache`Niko Matsakis-6/+11
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-1/+1
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+1
2017-04-04rebasedNick Cameron-1/+5
2017-04-04save-analysis: index extern blocksNick Cameron-0/+55
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-1/+1
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-4/+3
2017-03-23save-analysis: allow clients to get data directly without writing to a fileNick Cameron-56/+119
2017-03-19Rollup merge of #40554 - nrc:rls-data, r=alexcrichtonCorey Farwell-1/+4
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.
2017-03-17Fix race condition in fs::create_dir_allDavid Roundy-1/+1
It is more robust to not fail if any directory in a path was created concurrently. This change lifts rustc internal `create_dir_racy` that was created to handle such conditions to be new `create_dir_all` implementation.
2017-03-15Add rls-span to do some conversions into rls-data.Nick Cameron-0/+1
And fix some warnings and borrow errors
2017-03-15Use out-of-tree rustc serializeNick Cameron-1/+1
And remove a few data structures in favour of rls-data ones