Skip to content

Commit

Permalink
fix: Increase recursion limit
Browse files Browse the repository at this point in the history
This helps with demangling some heavily-nested types.
I do see some types that have generics nested 7 levels deep or more.
Some boost and std types can also lead to very deep nesting.
  • Loading branch information
Swatinem committed Jul 13, 2020
1 parent 1e51bce commit d479a06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pub struct ParseContext {
impl Default for ParseContext {
fn default() -> ParseContext {
ParseContext {
max_recursion: 64,
max_recursion: 96,
state: Cell::new(ParseContextState::default()),
}
}
Expand Down
5 changes: 5 additions & 0 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,8 @@ demangles!(
___ZN19URLConnectionClient33_clientInterface_cancelConnectionEP16dispatch_queue_sU13block_pointerFvvE_block_invoke14,
"invocation function for block in URLConnectionClient::_clientInterface_cancelConnection(dispatch_queue_s*, void () block_pointer)"
);

demangles!(
_ZNK8xxxxxxxx14xxxxxxxxxxxxxxINS_14xxxxxxxxxxxxxxINS1_INS1_INS1_INS1_INS1_INS_10xxxxxxxxxxE32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxEES3_EE22xxxxxxxxxxxxxxxxxxxxxxEES6_EE13xxxxxxxxxxxxxEE17xxxxxxxxxxxxxxxxxEE14xxxxxxxxxxxxxxE8xxxxxxxxE7xxxxxxxRKN4xxxx5xxxxxEb,
"xxxxxxxx::xxxxxxxxxxxxxx<xxxxxxxx::xxxxxxxxxxxxxx<xxxxxxxx::xxxxxxxxxxxxxx<xxxxxxxx::xxxxxxxxxxxxxx<xxxxxxxx::xxxxxxxxxxxxxx<xxxxxxxx::xxxxxxxxxxxxxx<xxxxxxxx::xxxxxxxxxxxxxx<xxxxxxxx::xxxxxxxxxx, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxx>, xxxxxxxxxxxxxxxxx>, xxxxxxxxxxxxxx>::xxxxxxxx(xxxxxxx, xxxx::xxxxx const&, bool) const"
);

0 comments on commit d479a06

Please sign in to comment.