File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
curve25519-dalek/src/backend/vector Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -81,14 +81,7 @@ to build out more elaborate abstractions it starts to become painful to use.
81
81
This crate exposes an `#[unsafe_target_feature]` macro which works just like `#[target_feature]` except
82
82
it moves the `unsafe ` from the function prototype into the macro name , and can be used on safe functions .
83
83
84
- ```rust ,compile_fail
85
- // ERROR: `#[target_feature(..)]` can only be applied to `unsafe` functions
86
- #[target_feature(enable = " avx2" )]
87
- fn func () {}
88
- ```
89
-
90
84
```rust
91
- // It works, but must be `unsafe`
92
85
# #[cfg(any(target_arch = " x86" , target_arch = " x86_64" ))]
93
86
#[target_feature(enable = " avx2" )]
94
87
unsafe fn func () {}
Original file line number Diff line number Diff line change 9
9
// - isis agora lovecruft <isis@patternsinthevoid.net>
10
10
// - Henry de Valence <hdevalence@hdevalence.ca>
11
11
12
+ // Nightly and stable currently disagree on the requirement of unsafe blocks when `unsafe_target_feature`
13
+ // gets used.
14
+ // See: https://github.com/rust-lang/rust/issues/132856
15
+ #![ allow( unused_unsafe) ]
16
+
12
17
//! An implementation of 4-way vectorized 32bit field arithmetic using
13
18
//! AVX2.
14
19
//!
Original file line number Diff line number Diff line change 9
9
// - isis agora lovecruft <isis@patternsinthevoid.net>
10
10
// - Henry de Valence <hdevalence@hdevalence.ca>
11
11
12
+ // Nightly and stable currently disagree on the requirement of unsafe blocks when `unsafe_target_feature`
13
+ // gets used.
14
+ // See: https://github.com/rust-lang/rust/issues/132856
15
+ #![ allow( unused_unsafe) ]
12
16
#![ allow( non_snake_case) ]
13
17
14
18
use crate :: backend:: vector:: packed_simd:: u64x4;
Original file line number Diff line number Diff line change 3
3
// This file is part of curve25519-dalek.
4
4
// See LICENSE for licensing information.
5
5
6
+ // Nightly and stable currently disagree on the requirement of unsafe blocks when `unsafe_target_feature`
7
+ // gets used.
8
+ // See: https://github.com/rust-lang/rust/issues/132856
9
+ #![ allow( unused_unsafe) ]
10
+
6
11
//! This module defines wrappers over platform-specific SIMD types to make them
7
12
//! more convenient to use.
8
13
//!
You can’t perform that action at this time.
0 commit comments