2019-10-29 08:15:51 +00:00
|
|
|
[package]
|
2022-04-29 14:29:24 +00:00
|
|
|
name = "hir-expand"
|
2020-08-13 14:26:29 +00:00
|
|
|
version = "0.0.0"
|
2020-08-24 11:06:30 +00:00
|
|
|
description = "TBD"
|
2020-07-14 01:57:26 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2021-10-21 15:49:28 +00:00
|
|
|
edition = "2021"
|
2021-12-15 20:49:48 +00:00
|
|
|
rust-version = "1.57"
|
2019-10-29 08:15:51 +00:00
|
|
|
|
2019-11-17 15:35:05 +00:00
|
|
|
[lib]
|
|
|
|
doctest = false
|
|
|
|
|
2019-10-29 08:15:51 +00: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 13:06:49 +00:00
|
|
|
cov-mark = "2.0.0-pre.1"
|
2022-06-10 14:30:09 +00:00
|
|
|
tracing = "0.1.35"
|
2022-07-03 06:42:41 +00:00
|
|
|
either = "1.7.0"
|
2022-03-22 16:36:41 +00:00
|
|
|
rustc-hash = "1.1.0"
|
2022-05-14 10:33:48 +00:00
|
|
|
la-arena = { version = "0.3.0", path = "../../lib/la-arena" }
|
2022-03-22 16:36:41 +00:00
|
|
|
itertools = "0.10.3"
|
2022-06-10 14:30:09 +00:00
|
|
|
hashbrown = { version = "0.12.1", features = [
|
2022-01-21 17:44:03 +00:00
|
|
|
"inline-more",
|
|
|
|
], default-features = false }
|
2022-07-06 17:49:05 +00:00
|
|
|
smallvec = { version = "1.9.0", features = ["const_new"] }
|
2019-10-29 11:55:39 +00:00
|
|
|
|
2022-06-24 11:03:13 +00:00
|
|
|
stdx = { path = "../stdx", version = "0.0.0" }
|
2022-04-29 14:29:24 +00:00
|
|
|
base-db = { path = "../base-db", version = "0.0.0" }
|
2021-03-10 18:43:03 +00:00
|
|
|
cfg = { path = "../cfg", version = "0.0.0" }
|
2020-08-24 08:25:19 +00:00
|
|
|
syntax = { path = "../syntax", 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 20:49:17 +00:00
|
|
|
limit = { path = "../limit", version = "0.0.0" }
|
2022-02-07 19:30:28 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2022-07-19 11:00:45 +00:00
|
|
|
expect-test = "1.4.0"
|