diff options
| author | bors <bors@rust-lang.org> | 2017-01-19 21:15:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-19 21:15:12 +0000 |
| commit | f0b42075981d9914c39e848377a3e12f0adf37d7 (patch) | |
| tree | 56dc08491470dcc39101f388c3823e84dec5ac46 | |
| parent | 8e29b4d3876fc141a0c451c65045bda2c1f39534 (diff) | |
| parent | d492433744d76e12151716ae688295570ebc5375 (diff) | |
| download | rust-f0b42075981d9914c39e848377a3e12f0adf37d7.tar.gz rust-f0b42075981d9914c39e848377a3e12f0adf37d7.zip | |
Auto merge of #39136 - keeperofdakeys:proc-macro-doc-test, r=alexcrichton
Stop warning when doc testing proc macro crates Fixes #39064 Add the test option to the session struct that is passed to phase_2_configure_and_expand function inside the rustdoc test module. This prevents the warning code from triggering when parsing proc_macro_derive attributes, just like when `--test` is normally invoked. This change makes the warning disappear, but I'm not sure what else it might change. So this early PR is mainly to run the test suite, and to get feedback.
| -rw-r--r-- | src/librustdoc/test.rs | 1 | ||||
| -rw-r--r-- | src/test/run-pass-fulldeps/proc-macro/derive-test.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index c242eea2362..26f331ac7d1 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -67,6 +67,7 @@ pub fn run(input: &str, crate_types: vec![config::CrateTypeDylib], externs: externs.clone(), unstable_features: UnstableFeatures::from_environment(), + actually_rustdoc: true, ..config::basic_options().clone() }; diff --git a/src/test/run-pass-fulldeps/proc-macro/derive-test.rs b/src/test/run-pass-fulldeps/proc-macro/derive-test.rs index a07e8b6cd7e..5a53a4e8db3 100644 --- a/src/test/run-pass-fulldeps/proc-macro/derive-test.rs +++ b/src/test/run-pass-fulldeps/proc-macro/derive-test.rs @@ -17,6 +17,9 @@ extern crate proc_macro; use proc_macro::TokenStream; +// ``` +// assert!(true); +// ``` #[proc_macro_derive(Foo)] pub fn derive_foo(_input: TokenStream) -> TokenStream { "".parse().unwrap() |
