| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | | |
It isn't used anywhere except in `crate_lang_items`. Remove it to
slightly reduce memory usage and simplify the code.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
ItemTree is per-file, so there is no unique crate associated with it.
This means that it cannot know the active CfgOptions and thus couldn't
handle `cfg_attr`.
Prepare it for `cfg_attr`s by avoiding accessing attributes.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
6896: Node-ify lifetimes r=jonas-schievink a=Veykril
Let's see if this passes the tests 🤞
Depends on https://github.com/rust-analyzer/ungrammar/pull/15
Co-authored-by: Jonas Schievink <[email protected]>
Co-authored-by: Jonas Schievink <[email protected]>
Co-authored-by: Lukas Wirth <[email protected]>
|
| | | |
|
|\| |
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
6897: Basic support for macros 2.0 r=jonas-schievink a=jonas-schievink
This adds support for (built-in-only) macros 2.0, and removes some hacks used for builtin derives, which are declared via macros 2.0 in libcore.
First steps for https://github.com/rust-analyzer/rust-analyzer/issues/2248.
Blocked on https://github.com/rust-analyzer/ungrammar/pull/16.
Co-authored-by: Jonas Schievink <[email protected]>
Co-authored-by: Jonas Schievink <[email protected]>
|
| |
| |
| |
| | |
Refactors builtin derive support to go through proper name resolution
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
6861: generate default implementation for an enum from an enum variant #6860 r=matklad a=bnjjj
close #6860
Co-authored-by: Benjamin Coenen <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Benjamin Coenen <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Benjamin Coenen <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Benjamin Coenen <[email protected]>
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6894: Parenthesize composite if condition before inverting in invert-if assist r=matklad a=Jesse-Bakker
Fixes #6867
Co-authored-by: Jesse Bakker <[email protected]>
|
| |/ / |
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | | |
6879: Change HasChildSource::ChildId assoc item to generic param r=matklad a=Veykril
Co-authored-by: Lukas Wirth <[email protected]>
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6886: Expand statements for macros in lowering r=matklad a=edwin0cheng
Fixes #6811
Co-authored-by: Edwin Cheng <[email protected]>
|
| | | | |
|
| | | | |
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6888: Use standard test style r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
6889: Resolve `macro-error` diagnostics on asm & llvm_asm r=matklad a=lf-
We currently stub these out as returning unit.
This fixes spurious RA `macro-error` diagnostics introduced somewhere around 0.2.400 in the following:
```rust
unsafe { asm!(""); llvm_asm!(""); }
```
I'd ideally like to write a unit test for this, but I'm not familiar with where the tests for `hir_expand` are.
Thanks to @edwin0cheng for help on resolving this issue.
Co-authored-by: lf- <[email protected]>
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We currently stub these out as returning unit.
This fixes spurious RA diagnostics in the following:
```rust
unsafe { asm!(""); llvm_asm!(""); }
```
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6875: Add find usages for enum constructors r=matklad a=sasurau4
Fix #2549 for enum
Co-authored-by: Daiki Ihara <[email protected]>
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6874: Implement `module_path!()` r=jonas-schievink a=jonas-schievink
Closes https://github.com/rust-analyzer/rust-analyzer/issues/6747
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
|
| | |/
| |/| |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
6862: Add LifetimeParam resolving to Semantics r=matklad a=Veykril
This is stuff required for the lifetime references/definitions PR. I pulled this out to make it easier to review as well as because there is one thing that still has to be addressed which can be found in the review comments.
Co-authored-by: Lukas Wirth <[email protected]>
|
| |/ |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
6817: Replace goblin crate with object r=matklad a=lnicola
Continuation of #4385.
Co-authored-by: Laurențiu Nicola <[email protected]>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we just tried running `rustup component add`, it doesn't make sense to me
to recommend trying that again. If we're reaching this case, it's probably more
likely that rustc was installed via package manager, in which case the source
should be installed the same way (e.g. if you install the rust-src package on
Ubuntu it will install a symlink in the right place to make our sysroot
detection work).
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
6852: Ignore lifetime params in substitutions r=matklad a=Veykril
[`hir_ty::utils::Generics`](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/hir_ty/src/utils.rs#L153) currently only assumes type parameters but not lifetime parameters and therefor creates incorrect index and length calculations, this PR just makes the use sites ignore LifetimeGenerics for now.
This fixes the panic at least locally for me for `analysis-stats`. Funnily enough this panic prevented me from using reference search for the `args` field to fix this problem.
Co-authored-by: Lukas Wirth <[email protected]>
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
6845: Don't HirDisplay unknown types when displaying for source r=Veykril a=Veykril
Was wondering why the add missing impl assist didn't do anything here:
![Code_JCA1Qo0V9P](https://user-images.githubusercontent.com/3757771/101990300-7af44a80-3ca6-11eb-8431-e5eb4de4e78c.png)
Turns out me forgetting to set the Index::Idx type in the trait causes RA to panic due to it trying to to create an unparsable type in the `make` module.
Now we get this instead which imo is definitely better to have.
![Code_MUFPJUCULY](https://user-images.githubusercontent.com/3757771/101990347-c9094e00-3ca6-11eb-9c6a-146bddf64b7c.png)
Co-authored-by: Lukas Wirth <[email protected]>
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6818: Add Lifetimes to the HIR r=matklad a=Veykril
This doesn't handle resolve yet as I don't know yet how that will be used. I'll get to that once I start moving the lifetime reference PR to the hir.
This also adds a new `hir` name type for lifetimes and labels, `hir::LifetimeName`.
Co-authored-by: Lukas Wirth <[email protected]>
|
| | |/
| |/| |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6839: Infer labeled blocks r=flodiebold a=Veykril
The test should cover all the interesting cases I believe(main part of it is copied from the loop label break test above it).
The test is indented to stay consistent with the rest of the tests in the file, I can dedent all the tests in the file in a follow up PR if desired.
Co-authored-by: Lukas Wirth <[email protected]>
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6813: negative sign matching in mbe matching for literal r=edwin0cheng a=edwin0cheng
Fix #6292
r @jonas-schievink
Co-authored-by: Edwin Cheng <[email protected]>
|
| | | | |
|
| | |/
| |/| |
|
| |/
|/| |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
6834: Use Attrs::docs in runnables instead of DocCommentsOwner r=kjeremy a=Veykril
I figured that we should probably move as much of the doc usage to the HIR as possible hence this PR. If we should keep this AST-based feel free to close.
This change does have the nice(but not really useful as I doubt anyones gonna write doc tests like these) side effect that these two doc string snippets allow being run now.
![image](https://user-images.githubusercontent.com/3757771/101945607-bf241400-3bee-11eb-96ce-ccae80028b1f.png)
![image](https://user-images.githubusercontent.com/3757771/101946375-2e9a0380-3bef-11eb-9950-e35168fdd048.png)
Co-authored-by: Lukas Wirth <[email protected]>
|