aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Be consistent about token accesorsAleksey Kladov2020-04-0913-112/+33
| | | | |
| | * | | Add _token suffix to token accessorsAleksey Kladov2020-04-0911-213/+209
| | | | | | | | | | | | | | | | | | | | | | | | | I think this makes is more clear which things are : AstNode and which are : AstToken
| | * | | SimplifyAleksey Kladov2020-04-091-26/+13
| | | | |
| * | | | Merge #3917bors[bot]2020-04-093-2/+136
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 3917: Improve tt::Subtree debug print r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| | * | | Improve tt::Subtree debug printEdwin Cheng2020-04-093-2/+136
| | | | |
* | | | | Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-116-30/+194
| |_|_|/ |/| | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | feat: add support for feature attributes in struct literalBenjamin Coenen2020-04-0924-7989/+7218
|\| | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | Put displays at the endAleksey Kladov2020-04-091-690/+690
| | | |
| * | | More compactAleksey Kladov2020-04-092-1428/+238
| | | |
| * | | More compact generated codeAleksey Kladov2020-04-093-2184/+730
| | | |
| * | | Move the rest of the tokens to generated/tokensAleksey Kladov2020-04-092-653/+653
| | | |
| * | | Move generated tokens to a separate fileAleksey Kladov2020-04-093-3055/+3060
| | | |
| * | | Start ast/generated/tokensAleksey Kladov2020-04-092-0/+2
| | | |
| * | | Prepare for spliting generated into tokens and nodesAleksey Kladov2020-04-093-9625/+9628
| |/ /
| * | Remove allocations from LCAAleksey Kladov2020-04-091-3/+13
| | | | | | | | | | | | | | | I haven't actually profiled this, but not allocating a hash map (or anything, really) seems like a good idea
| * | Parse correctly fn f<T>() where T: Fn() -> u8 + Send {}Luca Barbieri2020-04-093-1/+63
| | | | | | | | | | | | | | | We used to parse it as T: Fn() -> (u8 + Send), which is different from the rustc behavior of T: (Fn() -> u8) + Send
| * | Scale back to only two traitsAleksey Kladov2020-04-096-190/+1961
| | |
| * | Provide more complete AST accessors to support usage in rustcLuca Barbieri2020-04-0917-123/+144
| | |
* | | feat: add support for feature attributes in struct literalBenjamin Coenen2020-04-096-45/+143
|/ / | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | Merge #3909bors[bot]2020-04-093-64/+3038
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 3909: Generate tokense r=matklad a=matklad bors r+ 🤖 Co-authored-by: Luca Barbieri <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
| * | Scale back the traitsAleksey Kladov2020-04-092-105/+3033
| | |
| * | Add AstElement trait, generate tokens, support tokens in enumsLuca Barbieri2020-04-082-65/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds a new AstElement trait that is implemented by all generated node, token and enum structs - Overhauls the code generators to code-generate all tokens, and also enhances enums to support including tokens, node, and nested enums
* | | Merge #3880bors[bot]2020-04-094-7/+58
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3880: Add support for attributes for struct fields r=matklad a=bnjjj Hello I try to solve this example: ```rust struct MyStruct { my_val: usize, #[cfg(feature = "foo")] bar: bool, } impl MyStruct { #[cfg(feature = "foo")] pub(crate) fn new(my_val: usize, bar: bool) -> Self { Self { my_val, bar } } #[cfg(not(feature = "foo"))] pub(crate) fn new(my_val: usize, _bar: bool) -> Self { Self { my_val } } } ``` Here is a draft PR to try to solve this issue. In fact for now when i have this kind of example, rust-analyzer tells me that my second Self {} miss the bar field. Which is a bug. I have some difficulties to add this features. Here in my draft I share my work about adding attributes support on struct field data. But I'm stuck when I have to fetch attributes from parent expressions. I don't really know how to do that. For the first iteration I just want to solve my issue without solving on all different expressions. And then after I will try to implement that on different kind of expression. I think I have to fetch my FunctionId and then I will be able to find attributes with myFunction.attrs() But I don't know if it's the right way. @matklad (or anyone else) if you can help me it would be great :D Co-authored-by: Benjamin Coenen <[email protected]>
| * \ \ feat: add attributes support on struct fields and method #3870Benjamin Coenen2020-04-0917-244/+467
| |\ \ \ | | | |/ | | |/| | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | feat: add attributes support on struct fields and method #3870Benjamin Coenen2020-04-084-43/+30
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | Merge branch 'master' of github.com:rust-analyzer/rust-analyzerBenjamin Coenen2020-04-07317-151/+1801
| |\ \ \
| * | | | feat: add attributes support on struct fields #3870Benjamin Coenen2020-04-074-7/+71
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | | Fix add missing items assist orderAleksey Kladov2020-04-091-2/+4
| | | | | | | | | | | | | | | | | | | | closes #3904
* | | | | Remove unused funcEdwin Cheng2020-04-091-3/+1
| | | | |
* | | | | Add rustc_server (ra_tt rustc bridge)Edwin Cheng2020-04-093-1/+690
| |_|/ / |/| | |
* | | | 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
| |_|/ |/| |
* | | Fix warnings emitted when compiling as part of rustcLuca Barbieri2020-04-081-1/+1
| | |
* | | Merge #3826bors[bot]2020-04-085-51/+148
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3826: Flatten nested highlight ranges during DFS traversal r=matklad a=ltentrup Implements the flattening of nested highlights from #3447. There is a caveat: I needed to add `Clone` to `HighlightedRange` to split highlight ranges ~and the nesting does not appear in the syntax highlighting test (it does appear in the accidental-quadratic test but there it is not checked against a ground-truth)~. I have added a test case for the example mentioned in #3447. Co-authored-by: Leander Tentrup <[email protected]>
| * | | Simplify HTML highlighter and add test case for highlight_injection logicLeander Tentrup2020-04-065-59/+97
| | | |
| * | | Flatten nested highlight ranges during DFS traversalLeander Tentrup2020-04-032-6/+65
| | | |
* | | | Merge #3892bors[bot]2020-04-082-1/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3892: Add L_DOLLAR for TYPE_RECOVERY_SET r=matklad a=edwin0cheng This PR is a hot fix for issue #3861 that just prevent it make the parser being stuck. The actual problem described in https://github.com/rust-analyzer/rust-analyzer/pull/3873#issuecomment-610208693 is a very deep rabbit hole I don't want to dig right now :( Co-authored-by: Edwin Cheng <[email protected]>
| * | | | Add L_DOLLAR for TYPE_RECOVERY_SETEdwin Cheng2020-04-082-1/+18
| | | | |
* | | | | fmtAleksey Kladov2020-04-082-5/+7
|/ / / /
* | | | Move computation of missing fields into hirAleksey Kladov2020-04-075-168/+198
| | | |
* | | | Add functional update testAleksey Kladov2020-04-071-0/+33
| | | |
* | | | Fix names of test modulesAleksey Kladov2020-04-071-2/+2
| |_|/ |/| |
* | | Merge #3878bors[bot]2020-04-074-7/+52
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3878: A more precise panic macro r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | A more precise panic macroAleksey Kladov2020-04-071-1/+1
| | | |
| * | | Don't insert !() if there's already someAleksey Kladov2020-04-073-3/+45
| | | |
| * | | Reorder importsAleksey Kladov2020-04-071-3/+6
| | | |
* | | | 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
| | | |