Peh
1f011fa4a3
style: rename crates to kebab case
2022-05-01 10:48:58 +00:00
hkalbasi
b301b040f5
Add const generics
2022-03-14 14:38:37 +03:30
Matthias Krüger
56e4ea59d9
more clippy fixes:
...
clippy::match_like_matches_macro
clippy::to_string_in_format_args
clippy::single_char_add_str
clippy::filter_map_identity
clippy::clone_on_copy
clippy::useless_format
clippy::unused_unit
2022-03-12 16:50:49 +01:00
Lukas Wirth
6940cca760
Move attribute path completions into attribute completion module
2022-02-03 15:50:14 +01:00
Jonas Schievink
35e5c3b3f9
Fix resolution of eager macro contents
2022-01-26 18:31:07 +01:00
Lukas Wirth
91def936bc
Replace Vec with Box in Path.generic_args field
2021-11-20 16:37:41 +01:00
Jonas Schievink
9f4c26e780
Format Fn
traits using parentheses
2021-11-19 19:58:00 +01:00
Lukas Wirth
439a8194b0
Replace more Name::to_string usages with Name::to_smol_str
2021-11-04 18:12:05 +01:00
Clemens Wasser
47747cd412
Apply some clippy suggestions
2021-06-21 16:40:21 +02:00
Dawer
e7c49666be
Expand fixme comments
2021-06-01 01:44:51 +05:00
Dawer
466345ca81
Clean up, more docs.
2021-06-01 00:08:27 +05:00
Dawer
678d85ca7e
Implement struct ctor application
2021-06-01 00:03:46 +05:00
Jonas Schievink
b52df91877
Stop expanding UseTrees during ItemTree lowering
2021-05-26 01:01:58 +02:00
Aleksey Kladov
5c9f31d4c2
internal: move diagnostics to hir
...
The idea here is to eventually get rid of `dyn Diagnostic` and
`DiagnosticSink` infrastructure altogether, and just have a `enum
hir::Diagnostic` instead.
The problem with `dyn Diagnostic` is that it is defined in the lowest
level of the stack (hir_expand), but is used by the highest level (ide).
As a first step, we free hir_expand and hir_def from `dyn Diagnostic`
and kick the can up to `hir_ty`, as an intermediate state. The plan is
then to move DiagnosticSink similarly to the hir crate, and, as final
third step, remove its usage from the ide.
One currently unsolved problem is testing. You can notice that the test
which checks precise diagnostic ranges, unresolved_import_in_use_tree,
was moved to the ide layer. Logically, only IDE should have the infra to
render a specific range.
At the same time, the range is determined with the data produced in
hir_def and hir crates, so this layering is rather unfortunate. Working
on hir_def shouldn't require compiling `ide` for testing.
2021-05-25 17:49:59 +03:00
Jonas Schievink
533e9207d3
Intern GenericArgs
...
This shaves off another ~4 mb or so
2021-05-24 15:35:46 +02:00
Jonas Schievink
8ebb8d29e1
internal: intern TypeBound
s
...
Doesn't save much memory (~2 mb), but interning things is generally a
good pattern to follow
2021-05-24 15:13:23 +02:00
Jonas Schievink
01df4c04d1
impl Display for AttrInput/ImportAlias
2021-05-21 23:45:09 +02:00
Jonas Schievink
20ae41c1a1
Reuse database in LowerCtx
2021-05-06 23:23:50 +02:00
Jonas Schievink
976a3226fe
Don't store call-site text offsets in hygiene info
2021-05-06 19:59:54 +02:00
cynecx
cf3b4f1e20
hir_ty: Expand macros at type position
2021-04-17 16:24:56 +02:00
Alexandru Macovei
32304d14a1
Use Box'es to reduce the size of hir_def::expr::Pat from 112 to 64 bytes on 64bit
2021-04-06 16:01:31 +03:00
Jonas Schievink
24e876b52e
Intern more TypeRef
s in generics
...
Saves ~3 MB
2021-04-05 02:03:37 +02:00
Jonas Schievink
39d992ef55
Intern Attr, MacroCall and Path components
2021-04-01 20:35:21 +02:00
oxalica
ef416e0154
Impl HirDisplay for function hover message
2021-03-16 01:04:20 +08:00
Jonas Schievink
474df093a9
Avoid using ModPath's fields directly
2021-02-04 22:42:21 +01:00
Jonas Schievink
5d99ba1d9a
Make ModPath
's representation private
2021-02-04 20:49:24 +01:00
Phil Ellison
8c7ccdc29d
Identify methods using functions ids rather than string names
2021-01-23 07:40:25 +00:00
bors[bot]
fcc109e890
Merge #7326
...
7326: Use `is_ident` when converting Path to an Identifier r=edwin0cheng a=kevaundray
Co-authored-by: Kevaundray Wedderburn <kevtheappdev@gmail.com>
2021-01-18 17:40:11 +00:00
Kevaundray Wedderburn
da104bb0f5
cargo fmt
2021-01-18 16:58:29 +00:00
Kevaundray Wedderburn
725c20e8c5
use is_ident
method
2021-01-18 16:54:07 +00:00
Phil Ellison
b2dbe6e43a
Add fix to wrap return expression in Some
2021-01-07 19:01:33 +00: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
Lukas Wirth
11f8664182
Add Lifetimes to the HIR
2020-12-12 00:56:52 +01:00
Aleksey Kladov
2090b534fc
Move ModPath->ast::Path function to IDE layer
...
closes #6092
2020-10-06 16:19:18 +02:00
bors[bot]
18c62c8a39
Merge #6019
...
6019: Remove make::path_from_text r=matklad a=Veykril
This removes the `make::path_from_text` function, which according to a note should've been private. I removed it since it didn't really serve a purpose as it was simply wrapping `make::ast_from_text`.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-09-29 10:29:33 +00:00
Jonas Schievink
6eea06415d
Give ExternCrate
a Name
, not a ModPath
2020-09-17 15:28:23 +02:00
Lukas Wirth
f2ae412ccf
Remove make::path_from_text
2020-09-16 21:36:10 +02:00
Aleksey Kladov
2052d33b9b
Remove deprecated Path::from_ast
...
Long term, we probably should make hir::Path private to hir.
2020-08-15 18:22:16 +02:00
Aleksey Kladov
b28c54a2c2
Rename ra_hir_def -> hir_def
2020-08-13 16:29:33 +02:00