mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
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.
This commit is contained in:
commit
f0b4207598
@ -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()
|
||||
};
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user