2019-10-29 03:15:51 -05:00
|
|
|
[package]
|
2020-08-13 09:26:29 -05:00
|
|
|
name = "hir_expand"
|
|
|
|
version = "0.0.0"
|
2020-08-24 06:06:30 -05:00
|
|
|
description = "TBD"
|
2020-07-13 20:57:26 -05:00
|
|
|
license = "MIT OR Apache-2.0"
|
2020-08-13 09:26:29 -05:00
|
|
|
edition = "2018"
|
2019-10-29 03:15:51 -05:00
|
|
|
|
2019-11-17 09:35:05 -06:00
|
|
|
[lib]
|
|
|
|
doctest = false
|
|
|
|
|
2019-10-29 03:15:51 -05:00
|
|
|
[dependencies]
|
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 08:06:49 -05:00
|
|
|
cov-mark = "2.0.0-pre.1"
|
2021-08-15 07:46:13 -05:00
|
|
|
tracing = "0.1"
|
2020-02-18 07:57:41 -06:00
|
|
|
either = "1.5.3"
|
2020-06-11 04:30:06 -05:00
|
|
|
rustc-hash = "1.0.0"
|
2021-01-17 02:41:45 -06:00
|
|
|
la-arena = { version = "0.2.0", path = "../../lib/arena" }
|
2021-08-25 11:57:24 -05:00
|
|
|
itertools = "0.10.0"
|
2019-10-29 06:55:39 -05:00
|
|
|
|
2020-08-24 03:25:19 -05:00
|
|
|
base_db = { path = "../base_db", version = "0.0.0" }
|
2021-03-10 12:43:03 -06:00
|
|
|
cfg = { path = "../cfg", version = "0.0.0" }
|
2020-08-24 03:25:19 -05:00
|
|
|
syntax = { path = "../syntax", version = "0.0.0" }
|
|
|
|
parser = { path = "../parser", version = "0.0.0" }
|
|
|
|
profile = { path = "../profile", version = "0.0.0" }
|
|
|
|
tt = { path = "../tt", version = "0.0.0" }
|
|
|
|
mbe = { path = "../mbe", version = "0.0.0" }
|
2021-07-10 15:49:17 -05:00
|
|
|
limit = { path = "../limit", version = "0.0.0" }
|
2021-03-09 13:30:58 -06:00
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
test_utils = { path = "../test_utils" }
|
2021-03-10 14:05:02 -06:00
|
|
|
expect-test = "1.1"
|