aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplifyveetaha2020-03-311-16/+13
|
* Simplifyveetaha2020-03-281-11/+4
|
* Remove some unwrapsAleksey Kladov2020-03-282-18/+16
|
* Nice string formattingAleksey Kladov2020-03-282-1/+4
|
* Cleanup memory usage statsAleksey Kladov2020-03-251-0/+1
|
* Remove collect proc_macro definitionsEdwin Cheng2020-03-251-6/+2
|
* Fix trailling whitespaceEdwin Cheng2020-03-251-1/+1
|
* Add basic custom derive loweringEdwin Cheng2020-03-251-0/+23
|
* Merge #3679bors[bot]2020-03-221-8/+8
|\ | | | | | | | | | | | | | | 3679: Some miniscule refactorings r=matklad a=Veetaha Co-authored-by: veetaha <[email protected]>
| * ra_hir_ty: fix formattingveetaha2020-03-221-8/+8
| |
* | Move test to hir_tyEdwin Cheng2020-03-211-0/+31
|/
* Make MBE expansion more resilient (WIP)Florian Diebold2020-03-161-4/+4
|
* Use `dyn Trait` for working with databseAleksey Kladov2020-03-1618-346/+337
| | | | | | | It improves compile time in `--release` mode quite a bit, it doesn't really slow things down and, conceptually, it seems closer to what we want the physical architecture to look like (we don't want to monomorphise EVERYTHING in a single leaf crate).
* Support local macro_rulesEdwin Cheng2020-03-141-0/+20
|
* Merge #3549bors[bot]2020-03-112-0/+27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3549: Implement env! macro r=matklad a=edwin0cheng This PR implements `env!` macro by adding following things: 1. Added `additional_outdirs` settings in vscode. (naming to be bikeshed) 2. Added `ExternSourceId` which is a wrapping for SourceRootId but only used in extern sources. It is because `OUT_DIR` is not belonged to any crate and we have to access it behind an `AstDatabase`. 3. This PR does not implement the `OUT_DIR` parsing from `cargo check`. I don't have general design about this, @kiljacken could we reuse some cargo watch code for that ? ~~Block on [#3536]~~ PS: After this PR , we (kind of) completed the `include!(concat!(env!('OUT_DIR'), "foo.rs")` macro call combo. [Exodia Obliterate!](https://www.youtube.com/watch?v=RfqNH3FoGi0) Co-authored-by: Edwin Cheng <[email protected]>
| * Add and fix testsEdwin Cheng2020-03-101-0/+20
| |
| * Add resolve_extern_path in DBEdwin Cheng2020-03-101-0/+7
| |
* | Fix completion with a partially unknown typeFlorian Diebold2020-03-101-3/+25
|/ | | | | | | | | | | | | | To test whether the receiver type matches for the impl, we unify the given self type (in this case `HashSet<{unknown}>`) with the self type of the impl (`HashSet<?0>`), but if the given self type contains Unknowns, they won't be unified with the variables in those places. So we got a receiver type that was different from the expected one, and concluded the impl doesn't match. The fix is slightly hacky; if after the unification, our variables are still there, we make them fall back to Unknown. This does make some sense though, since we don't want to 'leak' the variables. Fixes #3547.
* Updates insta to 0.15.0 and bumps console to 0.10.0kjeremy2020-03-091-1/+1
|
* Use `Index` for CrateGraphAleksey Kladov2020-03-091-1/+1
|
* Less abstract CrateData apiKirill Bulatov2020-03-091-1/+1
|
* Prevent include! macro include itselfEdwin Cheng2020-03-071-0/+18
|
* Use a not so dummy implementation of env macroEdwin Cheng2020-03-071-0/+27
|
* Normalize waiting queries namesAleksey Kladov2020-03-063-10/+10
|
* Don't reuse the Chalk solverFlorian Diebold2020-03-062-92/+28
| | | | | This slows down analysis-stats a bit (~5% in my measurement), but improves incremental checking a lot because we can reuse trait solve results.
* Resolve `Self::AssocTy` in implsFlorian Diebold2020-03-063-38/+93
| | | | | | | | | | To do this we need to carry around the original resolution a bit, because `Self` gets resolved to the actual type immediately, but you're not allowed to write the equivalent type in a projection. (I tried just comparing the projection base type with the impl self type, but that seemed too dirty.) This is basically how rustc does it as well. Fixes #3249.
* Allow specifying additional info on call to profileAleksey Kladov2020-03-062-2/+14
|
* Less confusing profile namesAleksey Kladov2020-03-062-2/+2
|
* Merge #3494bors[bot]2020-03-061-0/+45
|\ | | | | | | | | | | | | | | | | | | | | | | 3494: Implement include macro r=matklad a=edwin0cheng This PR implement builtin `include` macro. * It does not support include as expression yet. * It doesn't consider `env!("OUT_DIR")` yet. Co-authored-by: Edwin Cheng <[email protected]>
| * Implment include macroEdwin Cheng2020-03-061-0/+45
| |
* | Support aliases and Self in struct literalsFlorian Diebold2020-03-062-1/+68
| | | | | | | | Fixes #3306.
* | Source map returns a resultAleksey Kladov2020-03-062-8/+13
|/ | | | cc #2236
* Fix panic on eager expansionEdwin Cheng2020-03-031-0/+21
|
* Add testEdwin Cheng2020-03-031-0/+19
|
* Drop larlpop-intern depLaurențiu Nicola2020-03-032-4/+2
|
* Update chalk for Ty internersLaurențiu Nicola2020-03-022-11/+14
|
* Update chalk for RawId removalLaurențiu Nicola2020-03-022-16/+10
|
*-. Merge #3397 #3398bors[bot]2020-03-021-6/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3397: Minimal viable meta r=matklad a=matklad bors r+ 🤖 3398: Reformat? r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| | * Reformat?Aleksey Kladov2020-03-021-6/+2
| |/
* | Merge #3385bors[bot]2020-03-024-6/+45
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 3385: Fix #3373 r=matklad a=flodiebold Basically, we need to allow variables in the caller self type to unify with the impl's declared self type. That requires some more contortions in the variable handling. I'm looking forward to (hopefully) handling this in a cleaner way when we switch to Chalk's types and unification code. Co-authored-by: Florian Diebold <[email protected]>
| * Fix #3373Florian Diebold2020-03-014-6/+45
| | | | | | | | | | | | | | Basically, we need to allow variables in the caller self type to unify with the impl's declared self type. That requires some more contortions in the variable handling. I'm looking forward to (hopefully) handling this in a cleaner way when we switch to Chalk's types and unification code.
* | handle array pattern matching type inferenceJosh Mcguigan2020-03-012-10/+55
| |
* | remove match statement, handle suffixJosh Mcguigan2020-03-012-14/+11
| |
* | handle arbitrary length slicesJosh Mcguigan2020-03-012-12/+29
| |
* | match single prefix sliceJosh Mcguigan2020-03-012-1/+48
|/
* Do autoderef for indexingFlorian Diebold2020-02-294-7/+74
|
* Do array unsizing for method receiversFlorian Diebold2020-02-292-2/+37
| | | | | | | It turns out rustc actually only unsizes array method receivers, so we don't need to do any trait solving for this (at least for now). Fixes #2670.
* Rename ast::ImplBlock -> ast::ImplDefAleksey Kladov2020-02-296-29/+28
|
* Fix a common false-positive type mismatchFlorian Diebold2020-02-293-9/+71
| | | | | | | | | E.g. for `&{ some_string() }` in a context where a `&str` is expected, we reported a mismatch inside the block. The problem is that we're passing an expectation of `str` down, but the expectation is more of a hint in this case. There's a long comment in rustc about this, which I just copied. Also, fix reported location for type mismatches in macros.
* Basic injectionsAleksey Kladov2020-02-271-2/+2
|