about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorQuietMisdreavus <grey@quietmisdreavus.net>2018-04-12 13:12:53 -0500
committerQuietMisdreavus <grey@quietmisdreavus.net>2018-04-13 16:07:12 -0500
commit1a0d7a8207907e2459db8df72a8f604cdcc8285f (patch)
treee874290831de59268099567481b89ff42bddbf0e /src/test/rustdoc
parent3366032ab70f72763bdf45c7f1257aa20b4229ca (diff)
downloadrust-1a0d7a8207907e2459db8df72a8f604cdcc8285f.tar.gz
rust-1a0d7a8207907e2459db8df72a8f604cdcc8285f.zip
add -C parameter to rustdoc
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/force-target-feature.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/rustdoc/force-target-feature.rs b/src/test/rustdoc/force-target-feature.rs
new file mode 100644
index 00000000000..08f1f06baa3
--- /dev/null
+++ b/src/test/rustdoc/force-target-feature.rs
@@ -0,0 +1,21 @@
+// 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// only-x86_64
+// compile-flags:--test -C target-feature=+avx
+// should-fail
+
+/// (written on a spider's web) Some Struct
+///
+/// ```
+/// panic!("oh no");
+/// ```
+#[doc(cfg(target_feature = "avx"))]
+pub struct SomeStruct;