]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/doc-cfg-target-feature.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / 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() {}