]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/doc-cfg-target-feature.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / rustdoc / doc-cfg-target-feature.rs
1 // only-x86_64
2 // compile-flags:--test
3 // should-fail
4 // no-system-llvm
5
6 // #49723: rustdoc didn't add target features when extracting or running doctests
7
8 #![feature(doc_cfg)]
9
10 /// Foo
11 ///
12 /// # Examples
13 ///
14 /// ```
15 /// #![feature(cfg_target_feature)]
16 ///
17 /// #[cfg(target_feature = "sse")]
18 /// assert!(false);
19 /// ```
20 #[doc(cfg(target_feature = "sse"))]
21 pub unsafe fn foo() {}