-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand nested items within a backtrace. #12671
Conversation
|item| items.push(item)); | ||
decorator_items.push_all(items.move_iter() | ||
.flat_map(|item| expand_item(item, fld).move_iter()) | ||
.collect()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we avoid collect()
here? I don't know if there's a vec method that takes an Iterator<T>
, but if not, there probably should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's called .extend
r=me with |
(Oh, it seems |
It will be implemented when #12673 lands. |
We're using SmallVec anyway, so I will implement extend for that. Yeah, this was a total pain to track down. Sadly I couldn't think of a nice way to test it either. |
Fixes a regression from rust-lang#4913 which causes items to be exanded with spans lacking expn_info from the context's current backtrace.
@huon - ready for re-review - implemented using SmallVector::extend |
Fixes a regression from #4913 which causes items to be exanded with spans lacking expn_info from the context's current backtrace.
Fixes a regression from #4913 which causes items to be exanded with spans lacking expn_info from the context's current backtrace.