aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/db.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Move expression lowering to hir_defAleksey Kladov2019-11-121-2/+2
|
* Minor cleanupAleksey Kladov2019-11-121-7/+5
|
* Merge #2179bors[bot]2019-11-061-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | 2179: Use HirDatabase to compute `is_deprecated` r=matklad a=martskins This PR fixes #2167 by introducing `attributes_query` and adding `fn attrs(&self, def: crate::AttrDef) -> Option<Arc<[Attr]>>;` to the `DefDatabase` trait. I'm a little concerned about the two spots in `attributes_query` where code is repeated, but I couldn't figure out a way to avoid that, so.. I welcome suggestions :smile: Co-authored-by: Martin Asquino <[email protected]>
| * HirDatabase stored attributesMartin Asquino2019-11-041-0/+4
| |
* | Move Namespace enum closer to usageAleksey Kladov2019-11-041-2/+2
|/
* Remove last traces of nameres from hirAleksey Kladov2019-11-031-2/+1
|
* Move CrateDefMap to hir_defAleksey Kladov2019-11-031-6/+3
|
* move struct & enum data to hir_defAleksey Kladov2019-10-311-11/+4
|
* fix compilationAleksey Kladov2019-10-301-2/+5
|
* move raw_items to hir_defAleksey Kladov2019-10-301-13/+4
|
* Move ids to hir_def crateAleksey Kladov2019-10-301-25/+3
|
* move ty interning to tyAleksey Kladov2019-10-301-6/+6
|
* rename hir_def -> hir_expandAleksey Kladov2019-10-291-1/+1
|
* move expansion-related code to a separate crateAleksey Kladov2019-10-291-35/+9
|
* start ra_hir_def crateAleksey Kladov2019-10-291-2/+2
|
* minor cleanupAleksey Kladov2019-10-161-9/+9
|
* Added test for check doc strings in crates.Alexander Andreev2019-09-301-0/+2
| | | | #1856
* Fix retrieval of the Fn traitsFlorian Diebold2019-09-251-2/+2
| | | | | I used the wrong query, so it only used the lang items from the respective crate...
* Make closures impl closure traitsFlorian Diebold2019-09-241-3/+3
|
* Handle associated type shorthand (`T::Item`)Florian Diebold2019-09-221-0/+7
| | | | | | | | | | | | This is only allowed for generic parameters (including `Self` in traits), and special care needs to be taken to not run into cycles while resolving it, because we use the where clauses of the generic parameter to find candidates for the trait containing the associated type, but the where clauses may themselves contain instances of short-hand associated types. In some cases this is even fine, e.g. we might have `T: Trait<U::Item>, U: Iterator`. If there is a cycle, we'll currently panic, which isn't great, but better than overflowing the stack...
* introduce hir debugging infraAleksey Kladov2019-09-091-1/+2
| | | | | | | | | | | | This is to make debugging rust-analyzer easier. The idea is that `dbg!(krate.debug(db))` will print the actual, fuzzy crate name, instead of precise ID. Debug printing infra is a separate thing, to make sure that the actual hir doesn't have access to global information. Do not use `.debug` for `log::` logging: debugging executes queries, and might introduce unneded dependencies to the crate graph
* slightly simplify expr lowering flowAleksey Kladov2019-09-031-2/+2
|
* move expr lowering to lowerAleksey Kladov2019-09-031-2/+2
|
* switch from volatile to untracked readAleksey Kladov2019-08-151-5/+4
|
* migrate ra_hir to the new rowanAleksey Kladov2019-07-191-3/+3
|
* use Parse in mbeAleksey Kladov2019-07-181-2/+2
|
* Some renamings for clarityFlorian Diebold2019-07-141-4/+4
|
* Unify `normalize` and `implements` to simplify codeFlorian Diebold2019-07-081-10/+3
|
* Use environment for associated type normalization as wellFlorian Diebold2019-07-081-1/+1
|
* Refactor a bit & introduce Environment structFlorian Diebold2019-07-081-1/+1
|
* Add trait obligations for where clauses when calling functions/methodsFlorian Diebold2019-07-061-2/+2
| | | | | E.g. if we call `foo<T: Into<u32>>(x)`, that adds an obligation that `x: Into<u32>`, etc.
* allow rustfmt to reorder importsAleksey Kladov2019-07-041-13/+15
| | | | | | This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway
* put source maps first for better statsAleksey Kladov2019-06-301-6/+6
|
* print memory usage for queriesAleksey Kladov2019-06-301-0/+4
|
* make sure that CrateDefMap is independent from syntaxAleksey Kladov2019-06-261-27/+33
|
* cache chalk queriesAleksey Kladov2019-06-261-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a significant speedup, because chalk will call these functions several times even withing a single revision. The only significant one here is `impl_data`, but I figured it might be good to cache others just for consistency. The results I get are: Before: from scratch: 16.081457952s no change: 15.846493ms trivial change: 352.95592ms comment change: 361.998408ms const change: 457.629212ms After: from scratch: 14.910610278s no change: 14.934647ms trivial change: 85.633023ms comment change: 96.433023ms const change: 171.543296ms Seems like a nice win!
* Add firewall query to lang itemsAleksey Kladov2019-06-191-0/+3
| | | | | With an intermediate query, changing one module won't cause reparsing of all modules
* rename XSignature -> XDataAleksey Kladov2019-06-181-8/+8
|
* Simplifications / cleanup from reviewFlorian Diebold2019-06-161-2/+2
|
* Add basic infrastructure for assoc type projectionFlorian Diebold2019-06-151-4/+10
|
* move docs under code modelAleksey Kladov2019-06-111-2/+2
|
* make documenation a queryAleksey Kladov2019-06-081-0/+3
|
* don't cache parses twiceAleksey Kladov2019-06-021-0/+3
| | | | | | | | | Before this commit, `Parse`s for original file ended up two times in salsa's db: first, when we parse original file, and second, when we parse macro or a file. Given that parse trees are the worst ofenders in terms of memory, it makes sense to make sure we store them only once.
* add AstDatabaseAleksey Kladov2019-06-021-22/+28
|
* collect impl source mapsAleksey Kladov2019-06-011-3/+0
|
* don't cache ast_id_to_nodeAleksey Kladov2019-06-011-0/+1
|
* don't poison mutex around chalkAleksey Kladov2019-06-011-1/+2
| | | | | | | | | We use panics for cancellation, so we could trigger panic while holding the solver. std::sync::Mutex will be poisoned as a result, which and all further attempts to use solver (from other threads) will panic as well. This commit switches to parking_lot::Mutex which just unlocks on panic.
* profile type inferenceAleksey Kladov2019-05-211-1/+1
|
* add _query to query functionsAleksey Kladov2019-05-211-3/+3
|
* Add infer for generic default typeEdwin Cheng2019-05-191-1/+4
|