about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-03 00:58:24 +0000
committerbors <bors@rust-lang.org>2020-11-03 00:58:24 +0000
commit4c0c5e099a3b1f1c6ad53115189c2710495588b3 (patch)
tree1d0f77ee3917bc7c01c656a405338ad1f9b85576 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent338f939a8d77061896cd0a1ca87a2c6d1f4ec359 (diff)
parent19dbb02a8923c5ffd969d4d7ac3008c4df7326e9 (diff)
downloadrust-4c0c5e099a3b1f1c6ad53115189c2710495588b3.tar.gz
rust-4c0c5e099a3b1f1c6ad53115189c2710495588b3.zip
Auto merge of #77271 - petrochenkov:notokenexp, r=Aaron1011
Expand `NtExpr` tokens only in key-value attributes

Implement the experiment described in https://github.com/rust-lang/rust/issues/55414#issuecomment-554005412

This PR also removes some customization points and token visiting functionality from AST visitors.
Read-only visitor no longer visits tokens, mutable visitor visits tokens only when specifically enabled, mutable token visiting is restricted to its single intended use case.

I haven't changed the representation of `MacArgs::Eq` yet, but it potentially can use a `TokenTree` or a `Token` instead of `TokenStream`.
It's hard to get rid of `Nonterminal::NtExpr` there (and e.g. replace it with `ast::Expr`) due to the dual nature of key-value attributes (the value is both an expression and a token stream, depending on context), and `Nonterminal` has all the machinery for maintaining both representations in sync.

Fixes https://github.com/rust-lang/rust/issues/55414
Fixes https://github.com/rust-lang/rust/issues/43860
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions