about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-08-14 23:59:07 +0800
committerGitHub <noreply@github.com>2018-08-14 23:59:07 +0800
commiteeab08e97a86475446164600b0f144738b2bb567 (patch)
treeaf59b6ebdf27ceb504a33a2a07349dd7602ba53e /src/test/incremental/thinlto
parent700c5e89f22f4015e601984344c09cc6a3129caf (diff)
parent0511b01506434b7ee070ebf4ec6c5aacb406ab6a (diff)
downloadrust-eeab08e97a86475446164600b0f144738b2bb567.tar.gz
rust-eeab08e97a86475446164600b0f144738b2bb567.zip
Rollup merge of #53226 - QuietMisdreavus:editions-for-all, r=estebank
driver: set the syntax edition in phase 1

Fixes https://github.com/rust-lang/rust/issues/53203

It seems the way libsyntax handles the desired edition is to use a global, set via `syntax_pos::hygiene::set_default_edition`. Right now, this is set in the driver in `run_compiler`, which is the entry point for running the compiler all the way through to emitting files. Since rustdoc doesn't use this function, it wasn't properly setting this global. (When initially setting up editions in rustdoc, i'd assumed that setting `sessopts.edition` would have done this... `>_>`) This was "fixed" for doctests in https://github.com/rust-lang/rust/pull/52385, but rather than patching in a call to `set_default_edition` in all the places rustdoc sets up the compiler, i've instead moved the call in the driver to be farther in the process. This means that any use of `phase_1_parse_input` with the right session options will have the edition properly set without having to also remember to set libsyntax up separately.

r? @rust-lang/compiler
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions