about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-12 10:55:02 +0100
committerGitHub <noreply@github.com>2019-01-12 10:55:02 +0100
commita61ebac367a5021c95a69d823a156318a88516e6 (patch)
tree7d47ef66a8733aff99cc460a125a97698e89de70 /src/rustllvm/RustWrapper.cpp
parent7be2ff3d48a5f34f85c40542a665df818d94ffa8 (diff)
parentdac6eeca92e08a252fa952a1e89f6cd9cb6ba6f5 (diff)
downloadrust-a61ebac367a5021c95a69d823a156318a88516e6.tar.gz
rust-a61ebac367a5021c95a69d823a156318a88516e6.zip
Rollup merge of #57417 - QuietMisdreavus:semi-revert-doctest-parsing, r=GuillaumeGomez
rustdoc: use text-based doctest parsing if a macro is wrapping main

This is a "forward-port" of https://github.com/rust-lang/rust/pull/57019, intended to get https://github.com/rust-lang/rust/issues/56898 on nightly, since it's now fixed on beta (and already worked on stable).

To recap:

* The libsyntax-based doctest parsing now checks to see whether there is a top-level macro invocation in the doctest while it's checking for `fn main` and an `extern crate` statement.
* If it finds a macro invocation and *didn't* find `fn main`, then it performs the older text-based scan to allow doctests like the ones in `allocator_api` to still compile.

A "proper" fix will involve changing how `make_test` works to call it later in the `run_test` function, after the initial steps of compilation have completed. I've filed [a separate issue](https://github.com/rust-lang/rust/issues/57415) for that, though.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions