Jonas Schievink
01df4c04d1
impl Display for AttrInput/ImportAlias
2021-05-21 23:45:09 +02:00
Jonas Schievink
da08198bc9
Rewrite attr.rs
to allow using syntax-based indices
2021-05-10 21:50:42 +02:00
Jonas Schievink
a87bec5148
Move AttrId
back into hir_def
2021-05-10 16:35:06 +02:00
Jonas Schievink
976a3226fe
Don't store call-site text offsets in hygiene info
2021-05-06 19:59:54 +02:00
Lukas Tobias Wirth
5a78d96d0e
Fix block comment intra doc link injection ranges
2021-05-04 13:51:57 +02:00
Aleksey Kladov
5f89a60f1a
fix: false positive about inner attrs in docs
...
closes #8541
2021-04-19 17:11:49 +03:00
Jonas Schievink
30ce8b20ec
Avoid an unnecessary collect
2021-04-09 22:52:13 +02:00
Jonas Schievink
546da15972
Rename Attr
s index
field to id
2021-04-09 13:36:22 +02:00
Jonas Schievink
3fcdd1bcdf
Add AttrId
to track attribute sources
2021-04-09 13:32:03 +02:00
Jonas Schievink
035d84558c
Avoid O(n²) when constructing AttrSourceMap
2021-04-06 22:25:44 +02:00
Jonas Schievink
0d4c931416
Lower attributes on tuple fields
2021-04-06 20:19:53 +02:00
bors[bot]
c2be91dcd8
Merge #8245
...
8245: Properly resolve intra doc links in hover and goto_definition r=matklad a=Veykril
Unfortunately involves a bit of weird workarounds due to pulldown_cmark's incorrect lifetimes on `BrokenLinkCallback`... I should probably open an issue there asking for the fixes to be pushed to a release since they already exist in the repo for quite some time it seems.
Fixes #8258 , Fixes #8238
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-05 12:30:20 +00:00
Jonas Schievink
3abcdc03ba
Make ast_to_token_tree
infallible
...
It could never return `None`, so reflect that in the return type
2021-04-04 01:46:45 +02:00
Jonas Schievink
39d992ef55
Intern Attr, MacroCall and Path components
2021-04-01 20:35:21 +02:00
Lukas Wirth
8d786dc4c3
Replace Range<usize> usage with TextRange
2021-03-30 22:42:21 +02:00
Lukas Wirth
9a327311e4
Implement basic Documentation source to syntax range mapping
2021-03-30 17:20:43 +02:00
Matthias Krüger
ae7e55c1dd
clippy::complexity simplifications related to Iterators
2021-03-21 13:13:34 +01:00
Jonas Schievink
636de3c709
Add AttrsWithOwner
and clean up source_map
2021-03-19 21:23:57 +01:00
Jonas Schievink
93aeb16eb2
Return Either
from MacroDefId::ast_id
2021-03-19 19:56:13 +01:00
bors[bot]
7200b994c9
Merge #8097
...
8097: Parse extended_key_value_attributes r=jonas-schievink a=Veykril
Companion PR https://github.com/rust-analyzer/ungrammar/pull/31
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-19 11:38:40 +00:00
Lukas Wirth
4771a56791
Parse extended_key_value_attributes
2021-03-19 02:13:46 +01:00
bors[bot]
b70bea0d79
Merge #8083
...
8083: Track source file IDs in source mapping of Attrs r=jonas-schievink a=Veykril
Fixes the panics/incorrect injection highlighting of outline module declarations until we figure out a nicer source mapping strategy for attributes.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-18 19:26:10 +00:00
Jonas Schievink
b84efbaacf
Make MacroDefId's AstId
mandatory when possible
2021-03-18 15:37:14 +01:00
Lukas Wirth
d41a1690d2
Track source file IDs in source mapping of Attrs
2021-03-18 13:16:27 +01:00
Jonas Schievink
759f8c83e5
Make ItemTreeId
its own type
2021-03-18 01:53:22 +01:00
Lukas Wirth
5734b347dd
Fix incorrect newline emission in Attrs::docs
2021-03-17 17:00:08 +01:00
Lukas Wirth
ec824a92d0
Better handling of block doc comments
2021-03-17 14:48:57 +01:00
bors[bot]
0fbfab3b45
Merge #8059
...
8059: Move doc-comment highlight injection from AST to HIR r=matklad,jonas-schievink a=Veykril
Fixes #5016
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 11:13:54 +00:00
Lukas Wirth
cdfb5c353f
Remove quadratic attr source lookup
2021-03-17 11:22:40 +01:00
Matthias Krüger
966c23f529
avoid converting types into themselves via .into() (clippy::useless-conversion)
...
example: let x: String = String::from("hello world").into();
2021-03-17 01:27:56 +01:00
Lukas Wirth
c766492d26
Properly handle doc attributes in doc-comment highlight injection
2021-03-16 21:15:26 +01:00
Lukas Wirth
3daa302cd3
Fix attribute index assignment in cfg_attr resolution
2021-03-16 19:55:40 +01:00
Lukas Wirth
11e9bc60a2
Move doc-comment highlight injection from AST to HIR
2021-03-16 18:57:47 +01:00
Jonas Schievink
1848bd0fa0
Handle cfg_attr
gating multiple attributes
2021-03-13 18:18:42 +01:00
Jonas Schievink
b885e6bdee
Delete ContainerId
2021-03-09 19:09:02 +01:00
Laurențiu Nicola
fc9eed4836
Use upstream cov-mark
2021-03-08 22:19:44 +02:00
Laurențiu Nicola
42057896bc
Fix some warnings
2021-03-05 15:59:50 +02:00
Lukas Wirth
999e020da2
Return inner attributes of outline mod declarations in attrs_query
2021-01-31 19:53:01 +01:00
Jonas Schievink
ce29730bc7
Obtain ModuleId
's DefMap
through a method
2021-01-22 16:33:58 +01:00
Jonas Schievink
82146737ac
Treat BlockExpr as a potential module origin
2021-01-20 20:05:48 +01:00
Aramis Razzaghipour
9b5ba090db
Remove map module from la-arena public API
...
It’s unlikely that more items will be added to the module,
so it’s simpler for users if `ArenaMap` is re-exported
and the module made private.
2021-01-15 11:14:04 +11:00
Aleksey Kladov
4c4e54ac8a
prepare to publish el libro de arena
2021-01-14 19:06:02 +03:00
Daniel Frampton
f08109bd2d
Introduce new queries to compute
...
1) the set of attributes for all variants of an enum, and
2) the set of attributes for all fields of a variant.
This avoids the current n^2 behavior when rendering completion for variants, which
prevents completion for enums with large numbers of variants.
2021-01-04 20:37:50 -08:00
bors[bot]
3bf4cec799
Merge #7128
...
7128: Implement HasAttrs for GenericParam r=matklad a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-03 08:49:59 +00:00
cynecx
3e9847f747
Use fully qualified Itertools::intersperse
call to silence nightly warnings about a potential name collision due to recent libstd api additions
2021-01-02 20:58:53 +01:00
Lukas Wirth
ec448ca4b3
Impl HasAttrs for GenericParam
2021-01-02 00:44:59 +01:00
Jonas Schievink
218e88ab55
Add API for mapping Attr
back to its syntax node
2020-12-19 15:15:02 +01:00
Jonas Schievink
a2062d1892
Make RawAttrs
crate-private
...
There should be no need to use this from outside
2020-12-19 02:44:22 +01:00
Jonas Schievink
81ccf37d3b
Remove Attrs::merge
...
Only the `RawAttrs` version of this is in use
2020-12-19 02:43:00 +01:00
Jonas Schievink
0ac75f8982
Remove resolved FIXME
2020-12-19 02:32:31 +01:00