Jonas Schievink
35e5c3b3f9
Fix resolution of eager macro contents
2022-01-26 18:31:07 +01:00
Jonas Schievink
5088926ec3
Make syntax bridge fully infallible
2022-01-24 17:27:39 +01:00
Lukas Wirth
ebd723995a
fix: don't panic in semantics due to cfg_attr
disrupting offsets
2022-01-23 17:42:38 +01:00
Laurențiu Nicola
485f318b70
Bump dashmap
2022-01-21 19:42:04 +02:00
Jonas Schievink
e52e1aaca1
Clean up assoc item collection a bit
2022-01-14 18:45:23 +01:00
Jonas Schievink
72fd08d8d2
Remove redundant recursion limit
2022-01-14 17:45:57 +01:00
Jonas Schievink
7e8b96f07c
Fix concatenation of super
mod paths
2022-01-11 15:39:13 +01:00
Jonas Schievink
0706de94bb
Report DefDiagnostic
s from inside item bodies
2022-01-11 14:34:25 +01:00
bors[bot]
5a711d4f3a
Merge #11210
...
11210: feat: Deprioritize ops methods in completion r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10593
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-11 09:39:12 +00:00
Lukas Wirth
4901ea3eef
Lookup lang attribute on assoc item trait directly
2022-01-11 10:28:38 +01:00
Lukas Wirth
ca0633c808
feat: Deprioritize ops methods in completion
2022-01-11 09:26:53 +01:00
Lukas Wirth
b32f611b6e
fix: Fix outline modules spilling inner doc injections into their parent
2022-01-08 14:54:31 +01:00
Lukas Wirth
47591f0fb2
Remove InFile
wrapping from DynMap keys
2022-01-08 12:16:44 +01:00
Lukas Wirth
b6826e9246
Only add generics with the correct file id to DynMap
2022-01-08 11:34:58 +01:00
Lukas Wirth
8d4f40e881
Do less allocs in trait_data
and impl_data
queries
2022-01-08 11:04:16 +01:00
Lukas Wirth
6746ba5839
Record attribute calls on assoc items in TraitData and ImplData
2022-01-08 10:45:12 +01:00
Lukas Wirth
6cf0cadfaa
Simplify
2022-01-07 21:52:37 +01:00
Lukas Wirth
0c9268c1ee
Filter out macro calls by file id in when building DynMap
2022-01-07 21:31:08 +01:00
Lukas Wirth
87735e5e9e
Update item tree test output
2022-01-07 14:29:58 +01:00
Lukas Wirth
ca4baa6e55
Use FileAstId<ast::Adt>
in nameres where appropriate instead
2022-01-07 14:20:27 +01:00
Lukas Wirth
08adce61a1
Better interface for doc comment and attribute processing
2022-01-07 14:14:33 +01:00
Lukas Wirth
dc135cc076
internal: Support registered tools and attributes in ide layer
2022-01-06 14:56:50 +01:00
Jonas Schievink
b1d6aea394
Fix parsing of #[derive]
paths
2022-01-06 13:39:20 +01:00
Jonas Schievink
3ff68f25b8
Expand attribute macros on impl and trait items
2022-01-06 12:30:16 +01:00
Jonas Schievink
3eddda6f4c
simplify
2022-01-05 17:26:34 +01:00
bors[bot]
68bc12c3b8
Merge #11157
...
11157: internal: Remove `SemanticScope::speculative_resolve_as_mac` r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11132
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-04 16:49:47 +00:00
Aleksey Kladov
b688d84a4b
minor: add missing test
...
This test kills the following mutant:
diff --git a/crates/mbe/src/tt_iter.rs b/crates/mbe/src/tt_iter.rs
index 9d2b1da9a..055d9a733 100644
--- a/crates/mbe/src/tt_iter.rs
+++ b/crates/mbe/src/tt_iter.rs
@@ -134,7 +134,7 @@ impl<'a> TtIter<'a> {
self.inner = self.inner.as_slice()[res.len()..].iter();
let res = match res.len() {
1 => Some(res[0].cloned()),
- 0 => None,
+ // 0 => None,
_ => Some(tt::TokenTree::Subtree(tt::Subtree {
delimiter: None,
token_trees: res.into_iter().map(|it| it.cloned()).collect(),
2022-01-03 17:21:43 +03:00
Lukas Wirth
44b0fe8ec7
cleanup
2022-01-02 23:44:26 +01:00
Lukas Wirth
6b7b09d329
internal: Record unresolved derive invocations in hir
2022-01-02 23:44:23 +01:00
bors[bot]
2e7170e07b
Merge #11166
...
11166: minor: Simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-02 16:49:40 +00:00
Lukas Wirth
f31863b189
minor: Simplify
2022-01-02 17:37:16 +01:00
Aleksey Kladov
d846afdeef
check top level entry point invariants
2022-01-02 18:41:32 +03:00
Aleksey Kladov
e78424846e
enforce parsing invariant for patterns
2022-01-02 17:32:15 +03:00
Aleksey Kladov
7989d567e2
internal: more macro tests
2022-01-02 17:18:21 +03:00
Lukas Wirth
44d61766b5
internal: Record unresolved derive invocations in hir
2022-01-01 20:43:25 +01:00
Aleksey Kladov
287e748aa9
add expr tests
2022-01-01 18:58:30 +03:00
Aleksey Kladov
b5369927d7
parse empty statemet as statemetn
2021-12-29 20:04:36 +03:00
Aleksey Kladov
841cd30b45
Add test
2021-12-29 19:37:35 +03:00
Aleksey Kladov
ad4b02ecc0
add automated semicolon insertion test
2021-12-29 18:37:06 +03:00
Aleksey Kladov
afffa096f6
add TopEntryPoint
2021-12-28 17:00:55 +03:00
Lukas Wirth
e76e0e843d
Simplify
2021-12-21 18:28:04 +01:00
Lukas Wirth
0b1c434d53
Deduplicate lower ctx hygiene field
2021-12-21 18:27:54 +01:00
bors[bot]
8dc3a270f6
Merge #11067
...
11067: internal: Store function param names in ItemTree r=Veykril a=Veykril
This prevents us reparsing source files for completions, sometimes slowing them down massively if the source file is not cached at the expense of a slightly bigger memory usage.
related info https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Completion.20performance
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-20 14:43:39 +00:00
Lukas Wirth
8eb7ee9099
Update test output
2021-12-20 15:43:15 +01:00
Lukas Wirth
cd9d76e0ca
internal: Store function param names in ItemTree
2021-12-20 15:24:37 +01:00
bors[bot]
f46731a230
Merge #11028
...
11028: Bump MSRV (1.57) r=Veykril a=iDawer
This bumps MSRV on all crates to 1.57 except `la-arena`
#10986 requires >=1.57
Co-authored-by: iDawer <ilnur.iskhakov.oss@outlook.com>
2021-12-20 13:45:35 +00:00
bors[bot]
7f28b49759
Merge #11043
...
11043: fix: fix incorrect mismatched argument count diagnostic with `std::arch` functions r=jonas-schievink a=jonas-schievink
Adds basic support for `#[rustc_legacy_const_generics]`.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10009
Full support would involve actually checking call arguments against the right expected types.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2021-12-17 17:46:42 +00:00
Jonas Schievink
fcc76e93a0
Initial support for #[rustc_legacy_const_generics]
2021-12-17 18:45:56 +01:00
Laurențiu Nicola
8ad7c0439c
Remove needless clones
2021-12-17 17:35:10 +02:00
Lukas Wirth
d3e538638a
fix: Don't duplicate attribute completions
2021-12-17 15:22:53 +01:00