rust/src/libsyntax_pos
Mazdak Farrokhzad fe807fcf3e
Rollup merge of #62213 - QuietMisdreavus:cfg-doctest, r=GuillaumeGomez
rustdoc: set cfg(doctest) when collecting doctests

Note: This PR builds on top of https://github.com/rust-lang/rust/pull/61199; only the last commit is specific to this PR.

As discussed in https://github.com/rust-lang/rust/pull/61199, we want the ability to isolate items to only when rustdoc is collecting doctests, but we can't use `cfg(test)` because of libcore's `#![cfg(not(test))]`. This PR proposes a new cfg flag, `cfg(doctest)`, specific to this situation, rather than reusing an existing flag. I've isolated it behind a feature gate so that we can contain the effects to nightly only. (A stable workaround that can be used in lieu of `#[cfg(doctest)]` is `#[cfg(rustdoc)] #[doc(hidden)]`, at least once https://github.com/rust-lang/rust/pull/61351 lands.)

Tracking issue: https://github.com/rust-lang/rust/issues/62210
2019-07-07 17:00:18 +02:00
..
analyze_source_file.rs rustc: doc comments 2019-02-10 23:42:32 +00:00
Cargo.toml rustc: Remove dylib crate type from most rustc crates 2019-07-07 03:23:00 +02:00
edition.rs Move edition outside the hygiene lock and avoid accessing it 2019-05-21 18:17:05 +02:00
hygiene.rs Enforce 'cond: bool' in while-expr + improve reachability diags. 2019-07-06 06:43:58 +02:00
lib.rs Enable internal lints in bootstrap 2019-06-24 10:45:20 +02:00
span_encoding.rs Increase Span from 4 bytes to 8 bytes. 2019-04-05 12:26:09 +11:00
symbol.rs Rollup merge of #62213 - QuietMisdreavus:cfg-doctest, r=GuillaumeGomez 2019-07-07 17:00:18 +02:00