Commit graph

1683 commits

Author SHA1 Message Date
Paul Daniel Faria
d5f11e530d Unsafe borrow of packed fields: account for borrow through ref binding, auto ref function calls 2020-08-10 08:44:54 -04:00
Paul Daniel Faria
fd30134cf8 Remove token tree from ReprKind::Other variant, expose ReprKind higher, remove debug println. 2020-08-10 08:44:54 -04:00
Paul Daniel Faria
263f9a7f23 Add tracking of packed repr, use it to highlight unsafe refs
Taking a reference to a misaligned field on a packed struct is an
unsafe operation. Highlight that behavior. Currently, the misaligned
part isn't tracked, so this highlight is a bit too aggressive.
2020-08-10 08:44:54 -04:00
Paul Daniel Faria
bf9b4578bb Remove Option<...> from result of Crate::root_module
There doesn't seem to be any need for it, and removing it simplies
several paths of code that depend on it.
2020-08-09 18:52:19 -04:00
Paul Daniel Faria
6cde0b1aa0 Add support for extern crate
This adds syntax highlighting, hover and goto def
functionality for extern crate
2020-08-08 14:14:18 -04:00
Aleksey Kladov
edd4a83ee3 Use salsa's purge to account for all memory 2020-08-05 15:28:20 +02:00
Aleksey Kladov
9818108798 Rename BindPat -> IdentPat 2020-07-31 20:12:10 +02:00
Aleksey Kladov
14cb96ec0e Allign RecordPat with RecordExpr 2020-07-31 20:00:48 +02:00
Aleksey Kladov
848f446a5a simplify 2020-07-30 22:56:43 +02:00
Aleksey Kladov
c5798c4d75 Finalize impl Grammar 2020-07-30 18:28:28 +02:00
Aleksey Kladov
c83467796b Finalize Trait grammar 2020-07-30 18:17:28 +02:00
Aleksey Kladov
3cd4112bdc Finalize const&static grammar 2020-07-30 18:02:20 +02:00
Aleksey Kladov
1766aae145 Rename EnumVariant -> Variant 2020-07-30 17:56:53 +02:00
Aleksey Kladov
609680ef97 Rename EnumDef -> Enum 2020-07-30 17:52:53 +02:00
Aleksey Kladov
216a5344c8 Rename StructDef -> Struct 2020-07-30 17:50:40 +02:00
Aleksey Kladov
1ae4721c9c Finalize union grammar 2020-07-30 17:38:52 +02:00
Aleksey Kladov
0a9e3ccc26 Rename FieldDef -> Field 2020-07-30 16:49:13 +02:00
Aleksey Kladov
6f8aa75329 Rename RecordLit -> RecordExpr 2020-07-30 16:21:30 +02:00
Aleksey Kladov
eb2f806344 Rename TypeAliasDef -> TypeAlias 2020-07-30 15:25:46 +02:00
Aleksey Kladov
1142112c70 Rename FnDef -> Fn 2020-07-30 15:16:05 +02:00
Jonas Schievink
6f02befee4 Add a builder for DiagnosticSink 2020-07-24 16:30:12 +02:00
Aleksey Kladov
a432f87d66 Cache macro expansion in semantics
#5497 accidentally made syntax highlighting quadratic, due to
 repeated tokentreeizing of macros.
2020-07-24 14:12:13 +02:00
Aleksey Kladov
b9ef6cf295 Add missing cancellation point 2020-07-24 13:51:27 +02:00
Aleksey Kladov
c0d8921148 Add profiling call 2020-07-24 13:13:36 +02:00
Laurențiu Nicola
cb958cf5fe Store macro invocation parameters as text instead of tt 2020-07-22 21:50:37 +03:00
Aleksey Kladov
371c5aec1c call_info works with closures 2020-07-17 12:04:10 +02:00
Aleksey Kladov
3823c2dc19 Remove FunctionSignature 2020-07-16 22:17:49 +02:00
Aleksey Kladov
a5ae8b8b92 Inlay hints use callables 2020-07-16 21:51:44 +02:00
Aleksey Kladov
6da22ed975 Redner self as param for call infor for assoc fn call 2020-07-16 18:24:26 +02:00
Aleksey Kladov
ff0312fa32 Semantical call info 2020-07-16 18:03:04 +02:00
Aleksey Kladov
b5ce84b170 Align CallableDefId naming with other ids 2020-07-16 13:16:34 +02:00
Florian Diebold
2077004463 Remove TypeCtor interning
Our TypeCtor and Chalk's TypeName match now!
2020-07-15 22:07:13 +02:00
Florian Diebold
a48843a16a Use Chalk closure support 2020-07-15 22:04:49 +02:00
Aleksey Kladov
6b9c725673 Cap macro expansion depth for IDE features
closes #4453
2020-07-15 17:18:19 +02:00
bors[bot]
0f8af1b824
Merge #5355
5355: Add a license field to all the crates r=matklad a=JohnTitor

Some are unnecessary but it's okay to have it, I think.
cc https://github.com/rust-lang/rust/issues/74269

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-07-14 09:18:17 +00:00
Aleksey Kladov
b2390f10fa Cleanup visibility 2020-07-14 10:52:18 +02:00
Aleksey Kladov
19450534cf Cleanup hir diagnostics API 2020-07-14 10:28:55 +02:00
Aleksey Kladov
1fdbf81181 Consolidate hir diagnostics code in one place 2020-07-14 10:18:08 +02:00
Yuki Okushi
6f423466d1
Add a license field to all the crates 2020-07-14 10:57:26 +09:00
Aleksey Kladov
693ac892f2 Don't copy-paste impl_froms into every crate 2020-07-13 16:21:02 +02:00
Aleksey Kladov
e1d6b7f7c4 Use dedicated semantic highlight tag for parameters
closes #5106
2020-07-11 14:51:41 +02:00
Aleksey Kladov
8c4919c9fd Fix goto definition for type alias type parameters
closes https://github.com/rust-analyzer/rust-analyzer/issues/5042
2020-07-11 12:45:30 +02:00
Aleksey Kladov
3fc4916b53 Reduce visibility 2020-07-11 12:31:50 +02:00
Aleksey Kladov
a36ff4a100 Speed up completion 2020-07-11 01:26:24 +02:00
Aleksey Kladov
f4147f6a34 Dont expose ID 2020-07-10 14:11:31 +02:00
Aleksey Kladov
9c54537ecf Rename 2020-07-10 14:09:31 +02:00
Aleksey Kladov
b85042601d Goto type definition works for self 2020-07-10 14:08:35 +02:00
Jonas Schievink
63ce2c7b5f Add argument count mismatch diagnostic 2020-07-09 12:16:29 +02:00
bors[bot]
a33eefa3b2
Merge #5149
5149: Implement Chalk variable kinds r=flodiebold a=flodiebold

This means we need to keep track of the kinds (general/int/float) of variables in `Canonical`, which requires some more ceremony. (It also exposes some places where we're not really dealing with canonicalization correctly -- another thing to be cleaned up when we switch to using Chalk's types directly.)

Should fix the last remaining issue of #2534.

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
2020-07-01 18:41:06 +00:00
Florian Diebold
d5d485ef92 Implement Chalk variable kinds
This means we need to keep track of the kinds (general/int/float) of variables
in `Canonical`, which requires some more ceremony. (It also exposes some places
where we're not really dealing with canonicalization correctly -- another thing
to be cleaned up when we switch to using Chalk's types directly.)

Should fix the last remaining issue of #2534.
2020-07-01 20:40:38 +02:00