aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
* restore coloring of attributesAleksey Kladov2019-10-082-1/+4
|
* hard-code nightly-only CFGsAleksey Kladov2019-10-081-0/+8
|
* macro DSL for cfg in testsAleksey Kladov2019-10-083-16/+23
|
* use slightly more idiomatic api for cfgAleksey Kladov2019-10-087-40/+59
|
* Merge #1922bors[bot]2019-10-082-18/+93
|\ | | | | | | | | | | | | | | 1922: feat(assists): Make raw string unescaped r=matklad a=Geobert Last piece of https://github.com/rust-analyzer/rust-analyzer/issues/1730 Co-authored-by: Geobert Quach <[email protected]>
| * feat(assists): Address some PR commentsGeobert Quach2019-10-041-25/+24
| |
| * feat(assists): Even smarter with hashesGeobert Quach2019-10-011-12/+44
| | | | | | | | Count `"#*` streak only, extract the counting in a function, unit test this function
| * feat(assists): Be smart about hashesGeobert Quach2019-09-301-1/+36
| | | | | | | | Add max_hashes_streak + 1 hashes to the raw string
| * feat(assists): Keep only one version of make_raw_stringGeobert Quach2019-09-292-83/+13
| |
| * feat(assists): Make raw string unescapedGeobert Quach2019-09-263-1/+79
| |
* | Merge #1951bors[bot]2019-10-085-1/+160
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1951: Lower the precedence of the `as` operator. r=matklad a=goffrie Previously, the `as` operator was being parsed like a postfix expression, and therefore being given the highest possible precedence. That caused it to bind more tightly than prefix operators, which it should not. Instead, parse it somewhat like a normal binary expression with some special-casing. Fixes #1851. Co-authored-by: Geoffry Song <[email protected]>
| * | Move tests aroundGeoffry Song2019-10-069-147/+198
| | |
| * | Lower the precedence of the `as` operator.Geoffry Song2019-10-035-45/+153
| | | | | | | | | | | | | | | | | | | | | Previously, the `as` operator was being parsed like a postfix expression, and therefore being given the highest possible precedence. That caused it to bind more tightly than prefix operators, which it should not. Instead, parse it somewhat like a normal binary expression with some special-casing.
* | | Merge #1960bors[bot]2019-10-0513-424/+346
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1960: Replace AST visitors with macro r=viorina a=viorina Fixes #1672. Co-authored-by: Ekaterina Babshukova <[email protected]>
| * | | remove `visitor` moduleEkaterina Babshukova2019-10-054-139/+24
| | | |
| * | | replace AST visitors with macroEkaterina Babshukova2019-10-0510-297/+334
| | | |
* | | | Merge #1928bors[bot]2019-10-0528-66/+656
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1928: Support `#[cfg(..)]` r=matklad a=oxalica This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled. Front-end settings are **not** included in this PR. There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949 Fixes #1920 Related: #1073 Co-authored-by: uHOOCCOOHu <[email protected]> Co-authored-by: oxalica <[email protected]>
| * | | Use raw cfgs in json project and fix typooxalica2019-10-053-9/+18
| | | |
| * | | Add docsuHOOCCOOHu2019-10-022-0/+6
| | | |
| * | | Read default cfgs from rustcuHOOCCOOHu2019-10-027-14/+75
| | | |
| * | | OptimizeuHOOCCOOHu2019-10-025-13/+28
| | | |
| * | | Refactor CfgOptions insideuHOOCCOOHu2019-10-023-13/+20
| | | |
| * | | Support cfg attribute on impl blocksuHOOCCOOHu2019-10-025-13/+90
| | | |
| * | | Enable CfgOptions `test` for workspace cratesuHOOCCOOHu2019-10-029-26/+134
| | | |
| * | | Introduce ra_cfg to parse and evaluate CfgExpruHOOCCOOHu2019-10-0210-27/+301
| | | |
| * | | Pass attributes as token tree to DefCollectoruHOOCCOOHu2019-10-024-21/+54
| | | |
* | | | [#1807] Refactor file structureLúcás Meier2019-10-041-33/+33
| | | | | | | | | | | | | | | | | | | | Use the more conventional way of importing the ast types, and put the assist at the top of the file.
* | | | Fix formattingLúcás Meier2019-10-041-22/+9
| | | |
* | | | Create an assist for applying De Morgan's lawLúcás Meier2019-10-031-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #1807 This assist can transform expressions of the form `!x || !y` into `!(x && y)`. This also works with `&&`. This assist will only trigger if the cursor is on the central logical operator. The main limitation of this current implementation is that both operands need to be an explicit negation, either of the form `!x`, or `x != y`. More operands could be accepted, but this would complicate the implementation quite a bit.
* | | | WIP: Add demorgan application with naive negationLúcás Meier2019-10-031-0/+2
| | | |
* | | | Fix parsing of block expressions in "forbid_structs" contexts.Geoffry Song2019-10-0311-54/+242
| |/ / |/| | | | | | | | | | | | | | Forbidding block expressions entirely is too strict; instead, we should only forbid them in contexts where we are parsing an optional RHS (i.e. the RHS of a range expression).
* | | Merge #1945bors[bot]2019-10-022-3/+72
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 1945: Handle divergence in type inference for blocks r=flodiebold a=lnicola Fixes #1944. The `infer_basics` test is failing, not sure what to do about it. Co-authored-by: Laurențiu Nicola <[email protected]>
| * | Handle divergence in type inference for blocksLaurențiu Nicola2019-10-022-3/+72
| | |
* | | Update pico-argskjeremy2019-10-023-6/+6
|/ /
* | Change user message.Alexander Andreev2019-09-301-1/+1
| |
* | Drop debug strings.Alexander Andreev2019-09-301-5/+1
| |
* | Merge branch 'master' into feature/issue/1856Alexander Andreev2019-09-3051-953/+1160
|\ \ | | | | | | | | | | | | # Conflicts: # crates/ra_assists/src/ast_editor.rs
| * | FixesuHOOCCOOHu2019-09-302-19/+8
| | |
| * | Fix API of AttruHOOCCOOHu2019-09-309-54/+32
| | |
| * | Parse correct AttrInputuHOOCCOOHu2019-09-3033-601/+844
| | |
| * | cleanup editorAleksey Kladov2019-09-302-5/+11
| | |
| * | remove ast_editor.rsAleksey Kladov2019-09-304-59/+16
| | |
| * | move remove bounds to ast/edit.rsAleksey Kladov2019-09-303-18/+16
| | |
| * | move field list to ast/edit.rsAleksey Kladov2019-09-305-108/+106
| | |
| * | migrate add impl items to the new editing APIAleksey Kladov2019-09-284-80/+109
| | |
| * | simplify strip attrsAleksey Kladov2019-09-285-29/+35
| | |
| * | correctly reset chalk state after a panicAleksey Kladov2019-09-281-6/+9
| | |
| * | replace horrible hack with a slightly less horrible oneAleksey Kladov2019-09-272-3/+5
| | |
* | | Added test for check doc strings in crates.Alexander Andreev2019-09-30171-29/+419
|/ / | | | | | | #1856
* | Merge #1815bors[bot]2019-09-2720-126/+373
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1815: Support correct `$crate` expansion in macros r=uHOOCCOOHu a=uHOOCCOOHu This PR makes normal use cases of `$crate` from macros work as expected. It makes more macros from `std` work. Type inference works well with `panic`, `unimplemented`, `format`, and maybe more. Sadly that `vec![1, 2, 3]` still not works, but it is not longer an issue about macro. Screenshot: ![Screenshot_20190927_022136](https://user-images.githubusercontent.com/14816024/65714465-b4568f80-e0cd-11e9-8043-dd44c2ae8040.png) Co-authored-by: uHOOCCOOHu <[email protected]>