Skip to content

Commit 317412a

Browse files
committed
std: add missing #[inline] annotation to the f64 arithmetic trait impls.
1 parent f8cf234 commit 317412a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/num/f64.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,18 +278,22 @@ impl One for f64 {
278278

279279
#[cfg(not(test))]
280280
impl Add<f64,f64> for f64 {
281+
#[inline]
281282
fn add(&self, other: &f64) -> f64 { *self + *other }
282283
}
283284
#[cfg(not(test))]
284285
impl Sub<f64,f64> for f64 {
286+
#[inline]
285287
fn sub(&self, other: &f64) -> f64 { *self - *other }
286288
}
287289
#[cfg(not(test))]
288290
impl Mul<f64,f64> for f64 {
291+
#[inline]
289292
fn mul(&self, other: &f64) -> f64 { *self * *other }
290293
}
291294
#[cfg(not(test))]
292295
impl Div<f64,f64> for f64 {
296+
#[inline]
293297
fn div(&self, other: &f64) -> f64 { *self / *other }
294298
}
295299
#[cfg(not(test))]

0 commit comments

Comments
 (0)