aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Strip indents and empty lines in check_apply_diagnostic_fix_from_positionPhil Ellison2019-08-251-36/+55
| | | |
| * | | Specify cursor position in ok-wrapping tests, and switch to using ↵Phil Ellison2019-08-252-35/+31
| | | | | | | | | | | | | | | | analysis_and_position function
| * | | Simplify checking return type, add new testPhil Ellison2019-08-252-23/+32
| | | |
| * | | Fix build for Diagnostic type changePhil Ellison2019-08-251-7/+4
| | | |
| * | | Cast SyntaxNodePtr to AstPtr directlyPhil Ellison2019-08-252-14/+10
| | | |
| * | | Remove reliance on expr orderingPhil Ellison2019-08-251-10/+4
| | | |
| * | | cargo formatPhil Ellison2019-08-252-23/+23
| | | |
| * | | Change test to not rely on trait inferencePhil Ellison2019-08-251-12/+7
| | | |
| * | | Check type rather than just name in ok-wrapping diagnostic. Add test for ↵Phil Ellison2019-08-253-8/+77
| | | | | | | | | | | | | | | | handling generic functions (which currently fails)
| * | | Add test that ok-wrapping handles type aliasesPhil Ellison2019-08-251-0/+38
| | | |
| * | | Mock std String and Result types in tests for ok-wrapping diagnosticPhil Ellison2019-08-253-16/+65
| | | |
| * | | Add type_mismatches to InferenceResult and use this in ok-wrapping code fixPhil Ellison2019-08-253-8/+27
| | | |
| * | | Initial implementation of Ok-wrappingPhil Ellison2019-08-254-3/+136
| |/ /
* | | Merge #1733bors[bot]2019-08-2514-108/+305
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1733: Parse arbitrarily complex `box` patterns. r=matklad a=ecstatic-morse This fully resolves the pattern part of #1412 by enabling the parsing of complex `box` patterns such as: ```rust let box Struct { box i, j: box Inner(box &x) } = todo!(); ``` This introduces a new `ast::BoxPat` (in the mold of `ast::RefPat`) that gets translated to `hir::Pat::Missing`. Co-authored-by: Dylan MacKenzie <[email protected]>
| * | Generate and bless testsDylan MacKenzie2019-08-247-85/+227
| | |
| * | Handle `Struct { box i }` syntaxDylan MacKenzie2019-08-241-0/+3
| | | | | | | | | | | | | | | | | | Named structs can have `box` patterns that will bind to their fields. This is similar to the behavior of the `ref` and `mut` fields, but is at least a little bit surprising.
| * | Centralize `box` pattern tests in `patterns.rs`Dylan MacKenzie2019-08-243-7/+6
| | |
| * | Convert `BoxPat` to `Missing` in HIRDylan MacKenzie2019-08-241-0/+1
| | |
| * | Parse `BoxPat`Dylan MacKenzie2019-08-241-19/+32
| | |
| * | Add `BoxPat` variantDylan MacKenzie2019-08-233-2/+41
|/ /
* | Merge #1732bors[bot]2019-08-231-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | 1732: remove wrong config from .travis.yml r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | remove wrong config from .travis.ymlAleksey Kladov2019-08-231-1/+0
|/ / | | | | | | | | | | The right key here is target_branch, not branch. However, this works anyway b/c gh-pages is the default.
* | Merge #1731bors[bot]2019-08-2378-592/+598
|\ \ | | | | | | | | | | | | | | | | | | | | | 1731: rename pos_field -> tuple_field r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | rename struct -> record, pos -> tupleAleksey Kladov2019-08-2378-592/+598
|/ /
* | Merge #1716bors[bot]2019-08-232-4/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | 1716: make ast object safe r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | make ast object safeAleksey Kladov2019-08-232-4/+15
|/ /
* | Merge #1724bors[bot]2019-08-233-132/+170
|\ \ | |/ |/| | | | | | | | | | | 1724: Refactor fill_match_arms assist to use AstBuilder facilities r=matklad a=viorina Co-authored-by: Ekaterina Babshukova <[email protected]>
| * refactor fill_match_arms assistEkaterina Babshukova2019-08-223-132/+170
| |
| |
| \
*-. \ Merge #1721 #1723bors[bot]2019-08-2211-55/+471
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1721: Impl/dyn trait r=flodiebold a=flodiebold This adds support for `impl Trait` and `dyn Trait` types as far as possible without Chalk. So we can represent them in the type system, and handle them in method resolution, but Chalk doesn't know about them yet. There's a small temporary hack here where we bypass Chalk during method resolution, so we can handle simple method calls on them and completion works. Fixes #1608. 1723: Make sysroot use `RUST_SRC_PATH` if set r=matklad a=bkchr Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
| | * | Make sysroot use `RUST_SRC_PATH` if setBastian Köcher2019-08-222-11/+22
| | |/
| * | Improve/fix type bound loweringFlorian Diebold2019-08-223-30/+64
| | |
| * | Handle impl/dyn Trait in method resolutionFlorian Diebold2019-08-223-32/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have one of these, the `Trait` doesn't need to be in scope to call its methods. So we need to consider this when looking for method candidates. (Actually I think the same is true when we have a bound `T: some::Trait`, but we don't handle that yet). At the same time, since Chalk doesn't handle these types yet, add a small hack to skip Chalk in method resolution and just consider `impl Trait: Trait` always true. This is enough to e.g. get completions for `impl Trait`, but since we don't do any unification we won't infer the return type of e.g. `impl Into<i64>::into()`.
| * | Add `impl Trait` and `dyn Trait` typesFlorian Diebold2019-08-228-42/+366
| |/ | | | | | | | | | | | | - refactor bounds handling in the AST a bit - add HIR for bounds - add `Ty::Dyn` and `Ty::Opaque` variants and lower `dyn Trait` / `impl Trait` syntax to them
* | Merge #1722bors[bot]2019-08-224-13/+52
|\ \ | |/ |/| | | | | | | | | | | | | | | 1722: Parse `box` keyword in patterns below top-level r=matklad a=ecstatic-morse This extends the parser to handle patterns like `if let Some(box x) = ...` where the `box` keyword is not at the top-level. The last line of the added test caused a `ParseError`. This is a variant of #1412 which was not fixed by #1414. ~~I'm not familiar with `rust-analyzer`, otherwise I would fix this as well :smile:.~~ Co-authored-by: Dylan MacKenzie <[email protected]>
| * Add test for nested box patternDylan MacKenzie2019-08-223-12/+51
| |
| * Add BOX_KW to PATTERN_FIRSTDylan MacKenzie2019-08-221-1/+1
|/
* Merge #1719bors[bot]2019-08-221-6/+6
|\ | | | | | | | | | | | | | | 1719: :arrow_up: salsa r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * :arrow_up: salsaAleksey Kladov2019-08-221-6/+6
|/
* Merge #1717bors[bot]2019-08-223-0/+49
|\ | | | | | | | | | | | | | | | | 1717: Don't add `?` bounds as real bounds r=flodiebold a=matklad closes #1709 Co-authored-by: Aleksey Kladov <[email protected]>
| * Don't add `?` bounds as real boundsAleksey Kladov2019-08-223-0/+49
| | | | | | | | closes #1709
* | Merge #1718bors[bot]2019-08-223-27/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 1718: disable clap's features r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | disable clap's featuresAleksey Kladov2019-08-223-27/+2
|/ /
* | Merge #1715bors[bot]2019-08-2213-44/+172
|\ \ | |/ |/| | | | | | | | | | | 1715: Feature flags r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * implement feature flagsAleksey Kladov2019-08-2211-36/+150
| |
| * show error to the user when deserializing configAleksey Kladov2019-08-223-8/+22
| |
* | Merge #1714bors[bot]2019-08-222-16/+12
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1714: Fix syntax-highlighting for fields (`NAMED_FIELD_DEF`) r=matklad a=cynecx Before: `ralsp.function: "#ff0000"` ![image](https://user-images.githubusercontent.com/5961244/63473802-13920600-c477-11e9-93df-67c04fc67636.png) After: `ralsp.field: "#9cdcfe"` ![image](https://user-images.githubusercontent.com/5961244/63473976-a894ff00-c477-11e9-8731-269a4c942e05.png) Co-authored-by: cynecx <[email protected]>
| * Update snapshots/highlighting.html to use correct highlightingcynecx2019-08-221-2/+2
| |
| * Fix syntax-highlighting for fields (`NAMED_FIELD_DEF`)cynecx2019-08-211-14/+10
|/
* Merge #1712bors[bot]2019-08-213-3/+7
|\ | | | | | | | | | | | | | | 1712: fix default for the exlude key r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * fix default for the exlude keyAleksey Kladov2019-08-213-3/+7
|/