Skip to content

Commit 802085d

Browse files
inline FloatExt::one and move this traitimpl for IEEE
1 parent 199c92c commit 802085d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/miri/src/math.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ pub(crate) fn sqrt<S: rustc_apfloat::ieee::Semantics>(x: IeeeFloat<S>) -> IeeeFl
125125
}
126126
}
127127

128-
impl<S: rustc_apfloat::ieee::Semantics> IeeeExt for IeeeFloat<S> {}
129128
/// Extend functionality of rustc_apfloat softfloats
130129
pub trait IeeeExt: rustc_apfloat::Float {
130+
#[inline]
131131
fn one() -> Self {
132132
Self::from_u128(1).value
133133
}
@@ -137,6 +137,7 @@ pub trait IeeeExt: rustc_apfloat::Float {
137137
self.maximum(min).minimum(max)
138138
}
139139
}
140+
impl<S: rustc_apfloat::ieee::Semantics> IeeeExt for IeeeFloat<S> {}
140141

141142
#[cfg(test)]
142143
mod tests {

0 commit comments

Comments
 (0)