Skip redundant frames in const recursion errors by estebank · Pull Request #136649 · rust-lang/rust (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comments explaining what is done and why.

I am not sure I agree with removing duplicates from a backtrace -- that seems like it could be quite confusing. I can't quite follow the logic for printing the "N frames skipped" here, is that always printed when seeing a duplicate?

This new logic abuses the times field, where it no longer means "we saw this function N+1 times" -- I think that's too hacky and confusing.