aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-11280-4971/+3500
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | | | | | | | Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-116-30/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | | | | | | | Merge #4111 #4112bors[bot]2020-04-232-3/+38
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4111: Record definitions in `extern` blocks r=jonas-schievink a=jonas-schievink Enables completion of extern functions and statics. Closes https://github.com/rust-analyzer/rust-analyzer/issues/3711 4112: Add Launch configuration for release build r=matklad a=jonas-schievink The debug build takes very long until I can test anything useful, with the release build it's much quicker. Add another Run configuration for it. Co-authored-by: Jonas Schievink <[email protected]>
* | | | | | | | | | | minorAleksey Kladov2020-04-231-4/+0
| | | | | | | | | | |
| * | | | | | | | | | Record definitions in `extern` blocksJonas Schievink2020-04-232-3/+38
|/ / / / / / / / / /
* | | | | | | / / / Fully get rid of SyntaxNodePtr::rangeAleksey Kladov2020-04-233-24/+40
| |_|_|_|_|_|/ / / |/| | | | | | | |
* | | | | | | | | Cleanup proc_macro configAleksey Kladov2020-04-233-11/+8
| |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general, there should be no reason to call `.to_string_lossy`. If you want to display the path, use `.display()`. If you want to pass the path to an OS API (like std::process::Command) than use `PathBuf` or `OsString`.
* | | | | | | | Merge #4065bors[bot]2020-04-232-7/+217
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4065: Complete unqualified enum names in patterns and expressions r=matklad a=nathanwhit This PR implements the completion described in #4014. The result looks like so for patterns: <img width="542" alt="Screen Shot 2020-04-20 at 3 53 55 PM" src="https://user-images.githubusercontent.com/17734409/79794010-8f529400-831f-11ea-9673-f838aa9bc962.png"> and for `expr`s: <img width="620" alt="Screen Shot 2020-04-21 at 3 51 24 PM" src="https://user-images.githubusercontent.com/17734409/79908784-d73ded80-83e9-11ea-991d-921f0cb27e6f.png"> I'm not confident that the completion text itself is very robust, as it will unconditionally add completions for enum variants with the form `Enum::Variant`. This means (I believe) it would still suggest `Enum::Variant` even if the local name is changed i.e. `use Enum as Foo` or the variants are brought into scope such as through `use Enum::*`. Co-authored-by: nathanwhit <[email protected]>
| * | | | | | | | Update tests to reflect new completionsnathanwhit2020-04-221-1/+1
| | | | | | | | |
| * | | | | | | | Add tests for enum completionnathanwhit2020-04-221-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds tests for completion of enum variants in match arms, if-let statements, and basic expressions.
| * | | | | | | | Complete unqualified enum variants when possiblenathanwhit2020-04-221-5/+26
| | | | | | | | |
| * | | | | | | | Add utility fn for expected type of a nodenathanwhit2020-04-221-1/+12
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds `expected_type_of` to `CompletionContext` to return the expected type of a node, if it is known.
* | | | | | | | Remove SyntaxPtr::range from more placesAleksey Kladov2020-04-233-3/+8
| | | | | | | |
* | | | | | | | Merge #4093bors[bot]2020-04-231-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4093: Simplify config r=matklad a=Veetaha Co-authored-by: veetaha <[email protected]>
| * | | | | | | | Simplify configveetaha2020-04-221-1/+1
| | | | | | | | |
* | | | | | | | | Merge #4094bors[bot]2020-04-231-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4094: proc_macro: add ability to log to stderr and view output in vscode r=matklad a=Veetaha r? @edwin0cheng Co-authored-by: veetaha <[email protected]>
| * | | | | | | | | proc_macro: add ability to log to stderr and view output in vscodeveetaha2020-04-221-1/+1
| |/ / / / / / / /
* | | | | | | | | Merge #4092bors[bot]2020-04-233-4/+38
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4092: feat: run ignored tests r=matklad a=hdevalke I started making some exercices on https://exercism.io/ and a lot of test have the `#[ignore]` attribute. The `Run Test|Debug` code lens show up, but running the test results in: ``` running 1 test test test_one_piece ... ignored test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 5 filtered out ``` This pull request adds the `--ignored` flag if needed. Co-authored-by: Hannes De Valkeneer <[email protected]>
| * | | | | | | | | feat: run ignored testsHannes De Valkeneer2020-04-223-4/+38
| |/ / / / / / / /
* / / / / / / / / Fix typoveetaha2020-04-231-1/+1
|/ / / / / / / /
* | | | | | | | Merge #4090bors[bot]2020-04-221-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4090: Fix config naming r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | | | Align the name of proc-macro enabling flagAleksey Kladov2020-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use `enable`, not `enabled` elsewhere
| * | | | | | | | Match implementation of diagnostics flag to the docsAleksey Kladov2020-04-221-1/+1
| | |_|_|_|_|_|/ | |/| | | | | |
* / | | | | | | Don't panic on `rust-analyzer --help`Andrew Chin2020-04-221-8/+16
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special case handling for `-h` and `--help` if no subcommand is given. Closes #4068
* | | | | | | Do not add default and closure types in 'add explicit type' assistKirill Bulatov2020-04-212-5/+47
| | | | | | |
* | | | | | | Merge #4076bors[bot]2020-04-212-10/+97
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4076: Improve remove derive attrs r=matklad a=edwin0cheng This PR implemented a proper `remove_derive_attrs` function which **merely** remove any `#[derive(*)]` attributes. Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | | | Improve remove dervie attrsEdwin Cheng2020-04-212-10/+97
| | | | | | | |
* | | | | | | | Merge #4038bors[bot]2020-04-211-1462/+1462
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4038: Group generated ast boilerplate apart from the interesting part r=matklad a=Veetaha Boilerplate `AstNode` and `From` impls are moved to the end further from the interesting part in `generated.rs` Co-authored-by: veetaha <[email protected]>
| * | | | | | | Group generated ast boilerplate apart from the interesting partveetaha2020-04-181-1462/+1462
| | | | | | | |
* | | | | | | | Merge #4071bors[bot]2020-04-211-7/+9
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4071: Cleanup args a bit r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | | Cleanup args a bitAleksey Kladov2020-04-211-7/+9
| | | | | | | |
* | | | | | | | Refactor a bitEdwin Cheng2020-04-201-54/+51
| | | | | | | |
* | | | | | | | Fix restart missing arguments in proc-macro-srvEdwin Cheng2020-04-201-5/+9
|/ / / / / / /
* | | | | | | Merge #4061bors[bot]2020-04-2012-191/+142
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4061: ra_proc_macro: cleanups here and there r=edwin0cheng a=Veetaha r? @edwin0cheng Co-authored-by: veetaha <[email protected]> Co-authored-by: Veetaha <[email protected]>
| * | | | | | | Migrate to Result<T, io::Error> -> io::Result<T>veetaha2020-04-201-3/+3
| | | | | | | |
| * | | | | | | Fix doc commentveetaha2020-04-201-3/+3
| | | | | | | |
| * | | | | | | Fix typoVeetaha2020-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Co-Authored-By: LaurenČ›iu Nicola <[email protected]>
| * | | | | | | Display path not debug itVeetaha2020-04-202-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-Authored-By: LaurenČ›iu Nicola <[email protected]>
| * | | | | | | Display path not debug itVeetaha2020-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Co-Authored-By: LaurenČ›iu Nicola <[email protected]>
| * | | | | | | ra_proc_macro: cleanups here and thereveetaha2020-04-2012-190/+141
| | | | | | | |
* | | | | | | | Update Chalk, and cache Chalk env elaboration through a queryFlorian Diebold2020-04-205-29/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should fix some of the worst performance problems.
* | | | | | | | Fix panic in split_imports assistAleksey Kladov2020-04-203-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix is admittedly quit literally just papering over. Long-term, I see two more principled approaches: * we switch to a fully tree-based impl, without parse . to_string step; with this approach, there shouldn't be any panics. The results might be nonsensical, but so was the original input. * we preserve the invariant that re-parsing constructed node is an identity, and make all the `make_xxx` method return an `Option`. closes #4044
* | | | | | | | Some clippy fixesJeremy Kolb2020-04-1911-19/+16
|/ / / / / / /
* | | | | | | Merge #4036bors[bot]2020-04-189-6/+87
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4036: Fix a bunch of unresovled references r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | | Correctly infer types in guard expressionsAleksey Kladov2020-04-182-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The root cause was that we forgot to add bindings from the arm to the guard expression closes #3980
| * | | | | | | Fix goto definition for record patternsAleksey Kladov2020-04-187-6/+57
| | | | | | | |
* | | | | | | | Merge #4035bors[bot]2020-04-185-14/+47
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4035: Convert bool to ident instead of literal in mbe r=matklad a=edwin0cheng Fixed #1249 Currently we treat boolean literal as `tt::Literal` , which makes parsing $lit:lit matcher easily. However, proc-macro2 treat boolean literal as `ident` : https://github.com/alexcrichton/proc-macro2/blob/4173a21dc497c67326095e438ff989cc63cd9279/src/lib.rs#L939 OT: I am quite happy we finally need to fix this bug :) Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | | | | Convert bool to ident instead of literal in mbeEdwin Cheng2020-04-185-14/+47
| | |/ / / / / / | |/| | | | | |
* | | | | | | | Merge #4034bors[bot]2020-04-186-21/+30
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4034: Add semantic tag for unresolved references r=matklad a=matklad This is a quick way to implement unresolved reference diagnostics. For example, adding to VS Code config "editor.tokenColorCustomizationsExperimental": { "unresolvedReference": "#FF0000" }, will highlight all unresolved refs in red. Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | | Add semantic tag for unresolved referencesAleksey Kladov2020-04-186-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a quick way to implement unresolved reference diagnostics. For example, adding to VS Code config "editor.tokenColorCustomizationsExperimental": { "unresolvedReference": "#FF0000" }, will highlight all unresolved refs in red.