| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
5846: Add references to fn args during completion r=matklad a=adamrk
When completing a function call, if there is an argument taken as a ref or mut ref which matches the name and type of a variable in scope, we will insert a `&` or `&mut` when filling in the function arguments. This addresses https://github.com/rust-analyzer/rust-analyzer/issues/5449.
E.g.
```rust
fn foo(x: &i32) {}
fn main() {
let x = 5;
foo # completing foo here generates `foo(&x)` now instead of `foo(x)`
}
```
Co-authored-by: adamrk <[email protected]>
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
It handles fn-like macros too, and will handle attribute macros in the
future
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
`hir` should know nothing about URLs, markdown and html. It should
only be able to:
* resolve stringy path from documentation
* generate canonical stringy path for a def
In contrast, link rewriting should not care about semantics of paths
and names resolution, and should be concern only with text mangling
bits.
|
| |
|
| |
|
|
|
|
|
| |
Doc comments *are* attributes, so there's no reason to have two crates
here.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We generally shouldn't expose TypeRef out of hir. So, let's just use a
placehoder here.
|
| |
|
|
|
|
| |
`consuming`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conjecture: it's impossible to use hir::Path *correctly* from an IDE.
I am not entirely sure about this, and we might need to add it back at
some point, but I have to arguments that convince me that we probably
won't:
* `hir::Path` has to know about hygiene, which an IDE can't set up
properly.
* `hir::Path` lacks identity, but you actually have to know identity
to resolve it correctly
|
| |
|
|
|