Remove cfg(not(doc)) from doctests (#922)
This was changed from `cfg(dox)` to `cfg(doc)` in https://github.com/rust-lang/stdarch/pull/920. `cfg(doc)` is incorrect here; rustdoc sets `cfg(doctest)`, not `cfg(doc)` in doc-tests. However, this piece of code isn't needed anyway: this code will only ever be run as a doc-test, so it will never be compiled in.
This commit is contained in:
@@ -210,12 +210,6 @@ using LLVM's auto-vectorization to produce optimized vectorized code for
|
|||||||
AVX2 and also for the default platform.
|
AVX2 and also for the default platform.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
# #![cfg_attr(not(doc),feature(stdsimd))]
|
|
||||||
# #[allow(unused_imports)]
|
|
||||||
# #[cfg(not(doc))]
|
|
||||||
# #[macro_use(is_x86_feature_detected)]
|
|
||||||
# extern crate std_detect;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut dst = [0];
|
let mut dst = [0];
|
||||||
add_quickly(&[1], &[2], &mut dst);
|
add_quickly(&[1], &[2], &mut dst);
|
||||||
|
|||||||
Reference in New Issue
Block a user