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
Jonas Schievink
ea5cc8d07a
More accurate #[derive]
parsing
...
This now allows full paths to the derive macro
2020-12-19 01:10:56 +01:00
Jonas Schievink
aab9cc9cfb
Hit a mark
2020-12-18 20:25:41 +01:00
Jonas Schievink
d42d1d33f0
Fix parsing of active cfg_attr
2020-12-18 20:00:59 +01:00
Jonas Schievink
08de1b4fa5
Implement RawAttr::filter
2020-12-18 18:58:42 +01:00
Jonas Schievink
4f07d8dd58
Refactor attributes API to allow handling cfg_attr
2020-12-18 02:24:14 +01:00
Jonas Schievink
9231821c03
Make Attrs::from_attrs_owner
private
2020-12-17 15:45:26 +01:00
Lukas Wirth
8ed8e4f25a
Use Attrs::docs in NavigationTarget instead of DocCommentsOwner
2020-12-11 21:19:58 +01:00
Lukas Wirth
ac19a71459
Use Attrs::docs in runnables instead of DocCommentsOwner
2020-12-11 20:11:03 +01:00
Lukas Wirth
f8823e8cbc
Properly fetch inner and outer docs on hir-level
2020-12-09 09:22:41 +01:00
Lukas Wirth
eac77997bf
Properly fetch inner and outer attributes on hir-level
2020-12-08 23:21:20 +01:00
Lukas Wirth
2facd9517f
Escape string literals in Attr::from_src
2020-12-08 13:47:58 +01:00
Lukas Wirth
7a338e5207
Replace Arc<[str]> with String in attr::Documentation
2020-12-07 21:55:00 +01:00
Lukas Wirth
b064f6da9e
Keep doc attribute order
2020-12-07 20:38:28 +01:00
Lukas Wirth
efe86a42dc
Remove raw pre and suffixes from string attr literals
2020-12-07 19:58:17 +01:00
Lukas Wirth
1caaa201fa
Remove hir_def/docs.rs module
2020-12-07 19:58:17 +01:00
Lukas Wirth
b3652ef288
Remove documentation query
2020-12-07 19:58:17 +01:00
Jonas Schievink
3421b645e6
Emit better #[cfg] diagnostics
2020-10-22 19:19:18 +02:00
Aleksey Kladov
b28c54a2c2
Rename ra_hir_def -> hir_def
2020-08-13 16:29:33 +02:00