Commit graph

27 commits

Author SHA1 Message Date
Lukas Wirth
8e91bb7660 minor: Bump dependencies 2022-03-22 17:42:24 +01:00
Florian Diebold
1b5cd03a37 Actually check in fixup.rs 2022-02-07 20:30:28 +01:00
Laurențiu Nicola
09fb755432 Bump hashbrown 2022-01-21 19:44:03 +02:00
iDawer
676744be6e Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
Aleksey Kladov
278e7c3311 more frugal map 2021-12-11 17:49:09 +03:00
Aleksey Kladov
4f3fc6fa1a try to optimize things unsuccessfully
Baseline
```
Database loaded:     598.40ms, 304minstr, 118mb (metadata 390.57ms, 21minstr, 841kb; build 111.31ms, 8764kinstr, -214kb)
  crates: 39, mods: 824, decls: 18647, fns: 13910
Item Collection:     9.70s, 75ginstr, 377mb
  exprs: 382426, ??ty: 387 (0%), ?ty: 285 (0%), !ty: 145
Inference:           43.16s, 342ginstr, 641mb
Total:               52.86s, 417ginstr, 1018mb
```

Eager
```
Database loaded:     625.86ms, 304minstr, 118mb (metadata 414.52ms, 21minstr, 841kb; build 113.81ms, 8764kinstr, -230kb)
  crates: 39, mods: 824, decls: 18647, fns: 13910
Item Collection:     10.09s, 75ginstr, 389mb
  exprs: 382426, ??ty: 387 (0%), ?ty: 285 (0%), !ty: 145
Inference:           43.27s, 341ginstr, 644mb
Total:               53.37s, 417ginstr, 1034mb
```

Lazy
```
Database loaded:     626.34ms, 304minstr, 118mb (metadata 416.26ms, 21minstr, 841kb; build 113.67ms, 8750kinstr, -209kb)
  crates: 39, mods: 824, decls: 18647, fns: 13910
Item Collection:     10.16s, 75ginstr, 389mb
  exprs: 382426, ??ty: 387 (0%), ?ty: 285 (0%), !ty: 145
Inference:           44.51s, 342ginstr, 644mb
Total:               54.67s, 417ginstr, 1034mb
```
2021-12-05 15:32:39 +03:00
Laurențiu Nicola
bff377c712 Clean up some unused cross-crate dependencies 2021-12-05 13:54:49 +02:00
Laurențiu Nicola
8457ae34bd Set MSRV 2021-10-23 15:07:11 +03:00
Lukas Wirth
1294bfce86 Migrate to edition 2021 2021-10-21 20:10:40 +02:00
Aramis Razzaghipour
dce5c640f8
Move IdxRange into la_arena 2021-10-15 13:03:28 +11:00
Aleksey Kladov
afacdd612d internal: update expect 2021-10-09 17:17:16 +03:00
Giles Cope
15312aab58
removing seemingly unused dev deps. 2021-09-11 16:26:36 +01:00
Aleksey Kladov
dbb702cfc1 internal: remove accidental code re-use
FragmentKind played two roles:

* entry point to the parser
* syntactic category of a macro call

These are different use-cases, and warrant different types. For example,
macro can't expand to visibility, but we have such fragment today.

This PR introduces `ExpandsTo` enum to separate this two use-cases.

I suspect we might further split `FragmentKind` into `$x:specifier` enum
specific to MBE, and a general parser entry point, but that's for
another PR!
2021-09-05 22:36:36 +03:00
Dezhi Wu
ba0947dded switch log crate to tracing 2021-08-30 15:11:42 +08:00
Lukas Wirth
d6134b6802 Don't mutate syntax trees when preparing proc-macro input 2021-08-25 18:57:24 +02:00
Aleksey Kladov
3e5b155716 fix: avoid pathological macro expansions
Today, rust-analyzer (and rustc, and bat, and IntelliJ) fail badly on
some kinds of maliciously constructed code, like a deep sequence of
nested parenthesis.

"Who writes 100k nested parenthesis" you'd ask?

Well, in a language with macros, a run-away macro expansion might do
that (see the added tests)! Such expansion can be broad, rather than
deep, so it bypasses recursion check at the macro-expansion layer, but
triggers deep recursion in parser.

In the ideal world, the parser would just handle deeply nested structs
gracefully. We'll get there some day, but at the moment, let's try to be
simple, and just avoid expanding macros with unbalanced parenthesis in
the first place.

closes #9358
2021-08-09 16:15:02 +03:00
Robert Bartlensky
0b3d0cde8b Add Limit struct.
Fixes #9286.
2021-07-19 13:26:11 +01:00
Aleksey Kladov
86720f2953 minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
Jonas Schievink
bc4ecb199b Use expect-test for builtin macro/derive tests 2021-03-10 21:05:02 +01:00
Jonas Schievink
2b8674b37e Implement builtin cfg! macro 2021-03-10 19:43:03 +01:00
Aleksey Kladov
842d8ad9c8 Compilation speed 2021-03-09 22:30:58 +03:00
Aleksey Kladov
1c8feac01f ⬆️ arena 2021-01-17 11:43:04 +03:00
Aramis Razzaghipour
709034d123
Depend on local copy of la-arena instead of crates.io’s 2021-01-17 17:52:57 +11:00
Aleksey Kladov
4c4e54ac8a prepare to publish el libro de arena 2021-01-14 19:06:02 +03:00
Pavan Kumar Sunkara
335add49db Add description for crates that will be published 2020-08-24 13:07:22 +02:00
Pavan Kumar Sunkara
a8fa5cd42e Add version to deps in cargo.toml 2020-08-24 11:10:41 +02:00
Aleksey Kladov
b7aa4898e0 Rename ra_hir_expand -> hir_expand 2020-08-13 16:29:33 +02:00
Renamed from crates/ra_hir_expand/Cargo.toml (Browse further)