From a2b888675accccedec7601cc3bd67ca028b4757c Mon Sep 17 00:00:00 2001 From: kennytm Date: Sat, 5 Aug 2017 14:38:52 +0800 Subject: Implemented #[doc(cfg(...))]. This attribute has two effects: 1. Items with this attribute and their children will have the "This is supported on **** only" message attached in the documentation. 2. The items' doc tests will be skipped if the configuration does not match. --- src/test/compile-fail/feature-gate-doc_cfg.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/compile-fail/feature-gate-doc_cfg.rs (limited to 'src/test/compile-fail') diff --git a/src/test/compile-fail/feature-gate-doc_cfg.rs b/src/test/compile-fail/feature-gate-doc_cfg.rs new file mode 100644 index 00000000000..1a77d918014 --- /dev/null +++ b/src/test/compile-fail/feature-gate-doc_cfg.rs @@ -0,0 +1,12 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental +fn main() {} -- cgit 1.4.1-3-g733a5