aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting/highlight.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-08 17:51:11 +0100
committerGitHub <[email protected]>2021-04-08 17:51:11 +0100
commit5f279d57f0cba600eae8c550654a00b4268812ac (patch)
tree29195bd210adb94fbf8d5780484c931d8ffd5d66 /crates/ide/src/syntax_highlighting/highlight.rs
parent94d9fc2a28ea5d97e3a9293b9dac05bdb00304cc (diff)
parent014774764a2a9bd029046e01c757c9892572c0b0 (diff)
Merge #8426
8426: Track recursion limit when expanding custom derive r=jonas-schievink a=jonas-schievink You can write a custom derive that expands to itself: ```rust #[proc_macro_derive(Derive)] pub fn derive(item: TokenStream) -> TokenStream { let mut out: TokenStream = "#[derive(Derive)]".parse().unwrap(); out.extend(item); out } ``` rustc reports a recursion limit error, but rust-analyzer used to spin in name resolution and eventually fail with "name resolution is stuck". This makes it fail fast by respecting the recursion depth of the invocation. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ide/src/syntax_highlighting/highlight.rs')
0 files changed, 0 insertions, 0 deletions