Repository navigation
Visit attribute tokens in DefCollector and BuildReducedGraphVisitor - #45464
Conversation
…ducedGraphVisitor`
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
DefCollector and BuildReducedGraphVisitorDefCollector and BuildReducedGraphVisitor
|
r? @jseyfried |
jseyfried
left a comment
There was a problem hiding this comment.
Great, thanks!
r=me modulo comment
| if let Token::Interpolated(nt) = t { | ||
| match nt.0 { | ||
| token::NtExpr(ref expr) => { | ||
| if let ExprKind::Mac(..) = expr.node { |
There was a problem hiding this comment.
I believe this should just be token::Expr(ref expr) => self.visit_expr(expr),.
Ideally, we'd add visit_interpolated and walk_interpolated (a la https://github.com/sinkuu/rust/blob/c0ccab4c2330659b67edb5889d7f9ee702aebbe3/src/libsyntax/fold.rs#L618) -- could you add a FIXME for this?
There was a problem hiding this comment.
It should, but doesn't work due to lifetimes:(
There was a problem hiding this comment.
I believe you can fix the lifetime error by chaging fn visit_token to take the token by reference instead of by value.
There was a problem hiding this comment.
Wait, nvm -- you can get a reference to the token with an appropriate lifetime from a token stream, so that won't work. I think what you have is fine for now.
There was a problem hiding this comment.
(comment removed)
Nvm, I didn't reload the browser
|
@bors r+ |
|
📌 Commit 9f1a8bf has been approved by |
Visit attribute tokens in `DefCollector` and `BuildReducedGraphVisitor` Fixes #44851.
|
☀️ Test successful - status-appveyor, status-travis |
Fixes #44851.