This fixes a common problem when running under VS Code, the user
doesn't have permissions to create a `log` directory in the CWD.
The old behavior can be re-enabled by setting RA_INTERNAL_MODE=1
The cast expression expected any type via types::type_() function,
but the language spec does only allow TypeNoBounds (types without direct extra bounds
via `+`).
**Example:**
```rust
fn test() {
6i8 as i32 + 5;
}
```
This fails, because the types::type_() function which should parse the type after the
as keyword is greedy, and takes all plus sign after path types as extra.
My proposed fix is to replace the not implemented `type_no_plus()` just calls (`type_()`)
function, which is used at several places. The replacement is `type_with_bounds_cond(p: &mut Parser, allow_bounds: bool)`, which passes the condition to relevant sub-parsers.
This function is then called by `type_()` and the new public `type_no_bounds()`.
271: Implement format hook r=matklad a=DJMcNab
Tentatively: fixes#155.
However, this does add all changes in staged files, which might not be desirable. However, I think we can't solve that without explicit support in rustfmt for it, so it should be fine.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
267: Fix the extend keybinding r=DJMcNab a=DJMcNab
Make the extend selection keybinding less annoying for users not used to Injelli-J (myself included). Also fixes a minor style issue and runs `npm update`.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
265: Refactor symbol resolve API r=matklad a=matklad
Introduce ReferenceResolution to avoid nesting to many non-nominal
types.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
256: Improve/add use_item documentation r=matklad a=DJMcNab
Adds some documentation to use_item explaining all code paths (use imports are hard, especially with the ongoing discussion of anchored v. uniform paths - see https://github.com/rust-lang/rust/issues/55618 for what appears to be the latest developments)
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
253: Fix diagnostic fixes showing up everywhere r=matklad a=flodiebold
The LSP code action request always returned the fixes for all diagnostics anywhere in the file, because of a shadowed variable.
There's no test yet; I wasn't sure where to add it. I tried adding one in `heavy_tests`, but that's a bit uncomfortable because the code action response contains the (random) file paths. I could make it work, but wanted to ask beforehand what you think.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
250: Improve the suggestion for test functions r=DJMcNab a=DJMcNab
I haven't fully updated the previous commented out test - I don't know why it was commented out so some clarification would be welcome.
Co-authored-by: Daniel McNab <36049421+djmcnab@users.noreply.github.com>
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
252: Improve 'introduce variable' r=matklad a=flodiebold
- make it possible to extract a prefix of an expression statement (e.g.
`<|>foo.bar()<|>.baz()`)
- don't turn the last expression in a block into a let statement
- also fix a few typos
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
- make it possible to extract a prefix of an expression statement (e.g.
<|>foo.bar()<|>.baz())
- don't turn the last expression in a block into a let statement