aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
Commit message (Collapse)AuthorAgeFilesLines
...
| * add record pat missing field diagnosticJosh Mcguigan2020-04-104-28/+149
| |
* | Implement Chalk's debug methods using TLSFlorian Diebold2020-04-105-56/+297
|/ | | | | | | | | | Chalk now panics if we don't implement these methods and run with CHALK_DEBUG, so I thought I'd try to implement them 'properly'. Sadly, it seems impossible to do without transmuting lifetimes somewhere. The problem is that we need a `&dyn HirDatabase` to get names etc., which we can't just put into TLS. I thought I could just use `scoped-tls`, but that doesn't support references to unsized types. So I put the `&dyn` into another struct and put the reference to *that* into the TLS, but I have to transmute the lifetime to 'static for that to work.
* Simpler acessors for keywordsAleksey Kladov2020-04-091-2/+2
|
* Merge #3918bors[bot]2020-04-091-0/+60
|\ | | | | | | | | | | | | | | | | 3918: Add support for feature attributes in struct literal r=matklad a=bnjjj As promised here is the next PR to solve 2 different scenarios with feature flag on struct literal. close #3870 Co-authored-by: Benjamin Coenen <[email protected]>
| * feat: add support for feature attributes in struct literalBenjamin Coenen2020-04-091-3/+3
| |\ | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | feat: add support for feature attributes in struct literalBenjamin Coenen2020-04-091-0/+60
| | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | Add _token suffix to token accessorsAleksey Kladov2020-04-091-1/+1
| |/ |/| | | | | | | I think this makes is more clear which things are : AstNode and which are : AstToken
* | Provide more complete AST accessors to support usage in rustcLuca Barbieri2020-04-091-2/+2
|/
* feat: add attributes support on struct fields and method #3870Benjamin Coenen2020-04-093-83/+151
|\ | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * match checking add additional test for match checking tuple with missing patternJosh Mcguigan2020-04-081-0/+14
| |
| * fix panic in match checking when tuple enum missing patternJosh Mcguigan2020-04-081-15/+45
| |
| * Move computation of missing fields into hirAleksey Kladov2020-04-071-67/+91
| |
* | feat: add attributes support on struct fields and method #3870Benjamin Coenen2020-04-082-12/+6
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | Merge branch 'master' of github.com:rust-analyzer/rust-analyzerBenjamin Coenen2020-04-0711-11/+1579
|\|
| * add fixme to use type checker rather than manually comparing typesJosh Mcguigan2020-04-071-0/+7
| |
| * PR feedback implementationJosh Mcguigan2020-04-071-94/+331
| |
| * missing match arms diagnostic change source to match expressionJosh Mcguigan2020-04-073-3/+7
| |
| * handle match auto-derefJosh Mcguigan2020-04-072-1/+45
| |
| * improving documentationJosh Mcguigan2020-04-071-16/+64
| |
| * handle non matching enum pattern typesJosh Mcguigan2020-04-072-41/+57
| |
| * remove panicsJosh Mcguigan2020-04-072-66/+214
| |
| * missing match arms diagnosticJosh Mcguigan2020-04-079-9/+1037
| |
| * Fix Chalk panicFlorian Diebold2020-04-063-2/+33
| | | | | | | | | | Fixes #3865. Basically I forgot to shift 'back' when we got `dyn Trait`s back from Chalk, so after going through Chalk a few times, the panic happened.
| * Check for eprintln on CIAleksey Kladov2020-04-061-0/+5
| |
* | feat: add attributes support on struct fields #3870Benjamin Coenen2020-04-072-3/+38
|/ | | | Signed-off-by: Benjamin Coenen <[email protected]>
* Use log info in trait_solve_queryEdwin Cheng2020-04-061-1/+1
|
* Merge #3744bors[bot]2020-04-0611-136/+294
|\ | | | | | | | | | | | | | | | | 3744: Upgrade Chalk r=matklad a=flodiebold Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Florian Diebold <[email protected]>
| * Upgrade Chalk againFlorian Diebold2020-04-0511-109/+192
| | | | | | | | | | | | | | The big change here is counting binders, not variables (https://github.com/rust-lang/chalk/pull/360). We have to adapt to the same scheme for our `Ty::Bound`. It's mostly fine though, even makes some things more clear.
| * Upgrade ChalkFlorian Diebold2020-04-053-30/+105
| |
* | Hide unit fn return typesLaurențiu Nicola2020-04-055-20/+28
|/
* Fix inference of function pointer return typesLaurențiu Nicola2020-04-051-0/+26
|
* Macro patterns are not confused with expressions.Aleksey Kladov2020-04-031-2/+29
| | | | | | | | | | | We treat macro calls as expressions (there's appropriate Into impl), which causes problem if there's expresison and non-expression macro in the same node (like in the match arm). We fix this problem by nesting macor patterns into another node (the same way we nest path into PathExpr or PathPat). Ideally, we probably should add a similar nesting for macro expressions, but that needs some careful thinking about macros in blocks: `{ am_i_expression!() }`.
* Add inference for literal and range patternsFlorian Diebold2020-04-015-3/+104
|
* 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
| |