| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
For references, we make sure Chalk actually gets a lifetime here.
|
|
|
|
|
| |
As always, this just makes compilation work, we don't use the newly available
functionality yet.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4497: Create LowerCtx on the fly r=matklad a=edwin0cheng
Previously we create `LowerCtx` at the beginning of lowering, however, the hygiene content is in fact changing between macro expression expanding.
This PR change it to create the `LowerCtx` on the fly to fix above bug.
However, #4465 is not fixed by this PR, the goto-def is still not work yet. It only fixed the infer part.
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
| | |
|
|/
|
|
|
| |
This also removes some vestiges of the old impl trait support which I think
aren't currently in use.
|
| |
|
|
|
|
|
|
|
|
|
| |
I.e.
- `Self(x)` or `Self` in tuple/unit struct impls
- `Self::Variant(x)` or `Self::Variant` in enum impls
- the same in patterns
Fixes #4454.
|
| |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4394: Simplify r=matklad a=Veetaha
4414: Highlighting improvements r=matklad a=matthewjasper
- `static mut`s are highlighted as `mutable`.
- The name of the macro declared by `macro_rules!` is now highlighted.
Co-authored-by: veetaha <[email protected]>
Co-authored-by: Matthew Jasper <[email protected]>
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes an issue where the following code sample would fail to infer
the type contained in the option:
```rust
fn main() {
let mut end = None; // TODO: Fix inference for this in RA
loop {
end = Some(true);
}
}
```
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4175: Introduce HirDisplay method for rendering source code & use it in add_function assist r=flodiebold a=TimoFreiberg
Next feature for #3639.
So far the only change in the new `HirDisplay` method is that paths are qualified, but more changes will be necessary (omitting the function name from function types, returning an error instead of printing `"{unknown}"`, probably more).
Is that approach okay?
Co-authored-by: Timo Freiberg <[email protected]>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
E.g. in
```rust
match x {
1 => function1,
2 => function2,
}
```
we need to try coercing both to pointers. Turns out this is a special case in
rustc as well (see the link in the comment).
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Still no break-with-value or labels, but at least we know that `loop { break; }`
doesn't diverge.
|
|/
|
|
|
|
|
|
| |
Divergence here means that for some reason, the end of a block will not be
reached. We tried to model this just using the never type, but that doesn't work
fully (e.g. in `let x = { loop {}; "foo" };` x should still have type `&str`);
so this introduces a `diverges` flag that the type checker keeps track of, like
rustc does.
|
|
|
|
| |
They're `&[u8; N]`, not `&[u8]` (see #4374).
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
4305: Favor types for record type struct in name resolution r=matklad a=edwin0cheng
Fixed #4235
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4283: Support macro for trait items r=matklad a=edwin0cheng
Fixed #4039
r? @flodiebold
Co-authored-by: Edwin Cheng <[email protected]>
Co-authored-by: Edwin Cheng <[email protected]>
|
| | | |
|
| |/ |
|
|/
|
|
| |
Signed-off-by: Benjamin Coenen <[email protected]>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4234: Support local_inner_macros r=jonas-schievink a=edwin0cheng
This PR implements `#[macro_export(local_inner_macros)]` support.
Note that the rustc implementation is quite [hacky][1] too. :)
[1]: https://github.com/rust-lang/rust/blob/614f273e9388ddd7804d5cbc80b8865068a3744e/src/librustc_resolve/macros.rs#L456
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This reverts commit a5f2b16366f027ad60c58266a66eb7fbdcbda9f9, reversing
changes made to c96b2180c1c4206a0a98c280b4d30897eb116336.
|
| | | |
| \ | |
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4220: Introduce LowerCtx r=matklad a=edwin0cheng
This PR introduces `LowerCtx` for path lowering.
After this PR, there are only 2 places remains for using deprecated `Path::from_ast`, which is related to `AstTransform` I am not familiar. I would like to change these in another PR by others ;)
related disscusiion: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Path.3A.3Afrom_src
And also fixed part of https://github.com/rust-analyzer/rust-analyzer/issues/4176#issuecomment-620672930
4240: Bump deps r=matklad a=lnicola
Co-authored-by: Edwin Cheng <[email protected]>
Co-authored-by: Laurențiu Nicola <[email protected]>
|
| |/
|/| |
|
|/ |
|
| |
|
| |
|
| |
|