diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-01-13 15:50:21 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-01-20 22:05:26 +0100 |
| commit | fd005f53c204136732c446dc476afc1266de730b (patch) | |
| tree | c791d9ae2c0257743e6116d7e00bdc441b6128ef | |
| parent | 682ef4db8060a0b26266cdcf5631c5776cd45e0a (diff) | |
| download | rust-fd005f53c204136732c446dc476afc1266de730b.tar.gz rust-fd005f53c204136732c446dc476afc1266de730b.zip | |
Update doc_auto_cfg test
| -rw-r--r-- | src/test/rustdoc/doc-auto-cfg.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/rustdoc/doc-auto-cfg.rs b/src/test/rustdoc/doc-auto-cfg.rs index fcdd8354569..57dd0529535 100644 --- a/src/test/rustdoc/doc-auto-cfg.rs +++ b/src/test/rustdoc/doc-auto-cfg.rs @@ -3,6 +3,12 @@ #![crate_name = "foo"] // @has foo/fn.foo.html -// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-test' -#[cfg(not(test))] +// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-doctest' +#[cfg(not(doctest))] pub fn foo() {} + +// @has foo/fn.bar.html +// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc' +// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'test' +#[cfg(any(test, doc))] +pub fn bar() {} |
