File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
#![ feature( repr_simd) ]
2
-
2
+ #! [ warn ( missing_docs ) ]
3
3
#[ macro_use]
4
4
mod macros;
5
5
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ macro_rules! define_type {
69
69
70
70
// splat
71
71
impl From <$type> for $name {
72
+ #[ inline]
72
73
fn from( value: $type) -> Self {
73
74
Self :: splat( value)
74
75
}
@@ -126,16 +127,16 @@ macro_rules! define_type {
126
127
pub struct $name( $( $itype) ,* ) ;
127
128
128
129
impl $name {
129
- /// Construct a vector by setting each lane to a single value.
130
+ /// Construct a vector by setting all lanes to the given value.
130
131
#[ inline]
131
- pub fn splat( value: $type) -> Self {
132
+ pub const fn splat( value: $type) -> Self {
132
133
Self ( $( value as $itype) ,* )
133
134
}
134
135
135
- /// Construct a vector by setting each lane.
136
+ /// Construct a vector by setting each lane to the given values .
136
137
#[ allow( clippy:: too_many_arguments) ]
137
138
#[ inline]
138
- pub fn new( $( $ivar: $itype) ,* ) -> Self {
139
+ pub const fn new( $( $ivar: $itype) ,* ) -> Self {
139
140
Self ( $( $ivar) ,* )
140
141
}
141
142
}
You can’t perform that action at this time.
0 commit comments