aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
* Move config to config.rsAleksey Kladov2020-04-014-72/+77
|
* Generalize rustfmt configAleksey Kladov2020-04-013-11/+40
|
* Merge #3805bors[bot]2020-04-011-21/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3805: lower literal patterns r=JoshMcguigan a=JoshMcguigan While working on #3706 I discovered literal patterns weren't being lowered. This PR implements that lowering. Questions for reviewers: 1. This re-uses the existing conversion from `ast::LiteralKind` to `Literal`, but `ast::LiteralKind` doesn't include information about the actual value of the literal, which causes `Literal` to be created with the default value for the type (rather than the actual value in the source code). Am I correct in thinking that we'd eventually want to change things in such a way that we could initialize the `Literal` with the actual literal value? Is there an existing issue for this, or else perhaps I should create one to discuss how it should be implemented? My main question would be whether `ast::LiteralKind` should be extended to hold the actual value, or if we should provide some other way to get that information from `ast::Literal`? 2. I couldn't find tests which directly cover this, but it does seem to work in #3706. Do we have unit tests for this lowering code? 3. I'm not sure why `lit.literal()` returns an `Option`. Is returning a `Pat::Missing` in the `None` case the right thing to do? 4. I was basically practicing type-system driven development to figure out the transformation from `ast::Pat::LiteralPat` to `Pat::Lit`. I don't have an immediate question here, but I just wanted to ensure this section is looked at closely during review. Co-authored-by: Josh Mcguigan <[email protected]>
| * lower literal patternsJosh Mcguigan2020-04-011-21/+33
| |
* | Simplify error handingAleksey Kladov2020-04-011-38/+17
| |
* | Generalize FlycheckconfigAleksey Kladov2020-04-012-15/+21
| |
* | Merge #3779bors[bot]2020-04-014-363/+413
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 3779: Complete only missing fields in pats r=matklad a=SomeoneToIgnore A follow-up for https://github.com/rust-analyzer/rust-analyzer/pull/3694 Same name vs string [issue](https://github.com/rust-analyzer/rust-analyzer/pull/3694#discussion_r396986819) persists here, now I'm able to obtain `ast::Name`, but I see no way to convert it into `hir::Name` or vice versa. Co-authored-by: Kirill Bulatov <[email protected]>
| * | Unite record completion logic into a single moduleKirill Bulatov2020-04-014-450/+413
| | |
| * | Split draftKirill Bulatov2020-04-013-59/+85
| | |
| * | Complete only missing fields in patsKirill Bulatov2020-04-011-1/+62
| |/
* | Merge #3803bors[bot]2020-04-013-39/+35
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3803: Cleanup r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | CleanupAleksey Kladov2020-04-013-39/+35
| |/
* | Merge #3765bors[bot]2020-04-011-26/+90
|\ \ | |/ |/| | | | | | | | | | | 3765: Adds sort for RecordLit comparison in SSR r=edwin0cheng a=mikhail-m1 an item from #3186 Co-authored-by: Mikhail Modin <[email protected]>
| * Adds sort for RecordLit comparison in SSRMikhail Modin2020-04-011-26/+90
| |
* | SimplifyAleksey Kladov2020-04-011-2/+2
| |
* | Crisper nameAleksey Kladov2020-04-013-22/+22
| | | | | | | | https://www.flycheck.org/en/latest/
* | Pull enabled check upAleksey Kladov2020-04-013-11/+12
| |
* | Streamline flycheck implementationAleksey Kladov2020-04-011-80/+68
| |
* | sort importsAleksey Kladov2020-03-311-7/+8
| |
| |
| \
*-. \ Merge #3780 #3787bors[bot]2020-03-311-16/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3780: Simplify r=matklad a=Veetaha I absolutely love tha fact that removing `.clone()` simplifies the code comparing to other languages where it's actually the contrary (ahem ~~`std::move()`~~) 3787: vscode: add syntax tree inspection hovers and highlights r=matklad a=Veetaha ![inspect-tree](https://user-images.githubusercontent.com/36276403/78029767-c7426900-7369-11ea-9ed6-b8a0f8e05bac.gif) I implemented the reverse mapping (when you hover in the rust editor), but it seems overcomplicated, so I removed it Related #3682 Co-authored-by: veetaha <[email protected]> Co-authored-by: Veetaha <[email protected]>
| * | | Simplifyveetaha2020-03-311-16/+13
| |/ /
* | | Reduce depsAleksey Kladov2020-03-313-38/+40
| | |
* | | Add integrated test for concat include envAleksey Kladov2020-03-312-5/+62
| | |
* | | Rename cargo_watch -> flycheckAleksey Kladov2020-03-3117-14/+14
| | |
* | | Fix rebasedEdwin Cheng2020-03-311-1/+1
| | |
* | | Redirect stderr to nullEdwin Cheng2020-03-311-0/+1
| | |
* | | Pipe error to stderrEdwin Cheng2020-03-311-2/+5
| | |
* | | Refactor a bitEdwin Cheng2020-03-311-11/+9
| | |
* | | Use a weak ptr to hold the send end of channelEdwin Cheng2020-03-311-28/+18
| | |
* | | Add drop for processEdwin Cheng2020-03-311-2/+6
| | |
* | | Unwrap channel send()Edwin Cheng2020-03-311-13/+4
| | |
* | | Use jod_threadEdwin Cheng2020-03-312-17/+15
| | |
* | | Fix formattingEdwin Cheng2020-03-312-6/+6
| | |
* | | Simple cross-process message protocolEdwin Cheng2020-03-313-225/+86
| | |
* | | Remove unused structEdwin Cheng2020-03-311-10/+5
| | |
* | | Improve shutdown processEdwin Cheng2020-03-312-19/+54
| | |
* | | Use matches in is_dylibEdwin Cheng2020-03-311-11/+3
| | |
* | | Add back doc string for processEdwin Cheng2020-03-311-0/+2
| | |
* | | Fix testEdwin Cheng2020-03-312-4/+3
| | |
* | | Implement ra_proc_macro client logicEdwin Cheng2020-03-3110-23/+822
| | |
* | | Better names for config structsAleksey Kladov2020-03-3113-104/+102
| | |
* | | Merge #3778bors[bot]2020-03-311-8/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3778: Use more functional programming in ArenaMap::insert r=matklad a=kjeremy I find this more readable and it flattens out the body a little. Others may disagree. Co-authored-by: kjeremy <[email protected]>
| * | | Use resize_withkjeremy2020-03-311-2/+1
| | | |
| * | | Do not call reserve since extend will handle it.kjeremy2020-03-301-3/+0
| | | | | | | | | | | | | | | | | | | | `Take` implements `TrustedLen` so we are guaranteed that only one reserve call will be made.
| * | | Use more functional programming in ArenaMap::insertkjeremy2020-03-301-5/+3
| |/ / | | | | | | | | | I find this more readable and it flattens out the body a little.
* | | Merge #3786bors[bot]2020-03-312-14/+45
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3786: When adding match arm, don't let the floating comma r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | When adding match arm, don't let the floating commaAleksey Kladov2020-03-312-14/+45
| | | |
* | | | Merge #3781bors[bot]2020-03-312-1/+15
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3781: Add crate versions when running cargo -p commands. r=matklad a=o0Ignition0o If someone (unfortunately) creates a project that happens to have the same name as one of its (future) dependencies, there is [a way for them to change the dependency's alias in the Cargo.toml file](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml), to mitigate the name conflict. Unfortunately cargo -p commands don't seem to pick it up, which seems to put rust-analyzer run commands in a tough situation: ``` > Executing task: cargo test --package config --example default -- tests --nocapture < error: There are multiple `config` packages in your project, and the specification `config` is ambiguous. Please re-run this command with `-p <spec>` where `<spec>` is one of the following: config:0.1.0 config:0.9.3 The terminal process terminated with exit code: 101 ``` cargo suggests us to be more specific and refer to a package by its name and version, which this PR achieves. I passed the version as a String because I don't really understand how the ra_db types work, but I would love to switch it to [a fully fledged Version type](https://steveklabnik.github.io/semver/semver/index.html) if you guide me towards that :) Co-authored-by: o0Ignition0o <[email protected]>
| * | | | Add crate versions when running cargo -p commands.o0Ignition0o2020-03-312-1/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Until now cargo commands with the -p flag would pass the package name only. It doesn't play super well with the toml Renaming dependencies feature. This commit specifies the package name and version when a cargo command is run with the -p flag, to avoid ambiguities.
* / / / Attach doc-comment to declaration if there are newlines in betweenLeander Tentrup2020-03-313-1/+32
|/ / / | | | | | | | | | This commit changes the parser to attach doc-comments to the corresponding declaration in case there are newlines in between the doc-comment and the declaration.