rust/src/test
Mazdak Farrokhzad 3828fa2852
Rollup merge of #69384 - petrochenkov:nounnorm, r=Centril
parser: `token` -> `normalized_token`, `nonnormalized_token` -> `token`

So, after https://github.com/rust-lang/rust/pull/69006, its follow-ups and an attempt to remove `Parser::prev_span` I came to the conclusion that the unnormalized token and its span is what you want in most cases, so it should be default.

Normalization only makes difference in few cases where we are checking against `token::Ident` or `token::Lifetime` specifically.
This PR uses `normalized_token` for those cases.

Using normalization explicitly means that people writing code should remember about `NtIdent` and `NtLifetime` in general. (That is alleviated by the fact that `token.ident()` and `fn parse_ident_*` are already written.)
Remembering about `NtIdent`, was, however, already the case, kind of, because the implicit normalization was performed only for the current/previous token, but not for things like `look_ahead`.
As a result, most of token classification methods in `token.rs` already take `NtIdent` into account (this PR fixes a few pre-existing minor mistakes though).

The next step is removing `normalized(_prev)_token` entirely and replacing it with `token.ident()` (mostly) and `token.normalize()` (occasionally).
I want to make it a separate PR for that and run it though perf.
`normalized_token` filled on every bump has both a potential to avoid repeated normalization, and to do unnecessary work in advance (it probably doesn't matter anyway, the normalization is very cheap).

r? @Centril
2020-02-28 17:17:26 +01:00
..
assembly
auxiliary Auto merge of #68452 - msizanoen1:riscv-abi, r=nagisa,eddyb 2020-02-08 18:10:48 +00:00
codegen better lint names 2020-02-18 22:49:47 +01:00
codegen-units Update codegen-units tests 2020-02-26 19:45:46 +00:00
compile-fail remove no-longer-needed test 2020-02-15 19:40:33 +01:00
debuginfo Ignore GDB versions with broken str printing. 2020-02-16 17:49:45 -07:00
incremental Auto merge of #68505 - skinny121:canonicalize-const-eval-inputs, r=nikomatsakis 2020-02-28 06:14:52 +00:00
mir-opt suspend -> yield 2020-02-16 13:08:36 +01:00
pretty print vis & defaultness for nested items 2020-02-21 18:30:56 +01:00
run-fail better lint names 2020-02-18 22:49:47 +01:00
run-make Auto merge of #67878 - Others:opt-3, r=Mark-Simulacrum 2020-01-31 00:03:55 +00:00
run-make-fulldeps Rollup merge of #69146 - matthewjasper:literal-qualif, r=eddyb 2020-02-18 22:16:23 +01:00
run-pass-valgrind
rustdoc Record proc macro harness order for use during metadata deserialization 2020-02-15 15:48:36 -05:00
rustdoc-js Add tests for struct variant field in search 2020-02-02 19:18:31 +01:00
rustdoc-js-std
rustdoc-ui --bless --compare-mode=nll 2020-02-09 20:43:49 +01:00
rustfix
ui Rollup merge of #69384 - petrochenkov:nounnorm, r=Centril 2020-02-28 17:17:26 +01:00
ui-fulldeps Rename FunctionRetTy to FnRetTy 2020-02-17 11:24:29 +09:00
COMPILER_TESTS.md