|
| 1 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 2 | + --> $DIR/unary_precedence.rs:5:13 |
| 3 | + | |
| 4 | +LL | let _ = -1i32.abs(); |
| 5 | + | ^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: `#[deny(ambiguous_unary_precedence)]` on by default |
| 8 | +help: use parentheses to clarify your intent |
| 9 | + | |
| 10 | +LL | let _ = -(1i32.abs()); |
| 11 | + | + + |
| 12 | + |
| 13 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 14 | + --> $DIR/unary_precedence.rs:7:13 |
| 15 | + | |
| 16 | +LL | let _ = -1f32.abs(); |
| 17 | + | ^^^^^^^^^^^ |
| 18 | + | |
| 19 | +help: use parentheses to clarify your intent |
| 20 | + | |
| 21 | +LL | let _ = -(1f32.abs()); |
| 22 | + | + + |
| 23 | + |
| 24 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 25 | + --> $DIR/unary_precedence.rs:9:13 |
| 26 | + | |
| 27 | +LL | let _ = -1f64.asin(); |
| 28 | + | ^^^^^^^^^^^^ |
| 29 | + | |
| 30 | +help: use parentheses to clarify your intent |
| 31 | + | |
| 32 | +LL | let _ = -(1f64.asin()); |
| 33 | + | + + |
| 34 | + |
| 35 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 36 | + --> $DIR/unary_precedence.rs:11:13 |
| 37 | + | |
| 38 | +LL | let _ = -1f64.asinh(); |
| 39 | + | ^^^^^^^^^^^^^ |
| 40 | + | |
| 41 | +help: use parentheses to clarify your intent |
| 42 | + | |
| 43 | +LL | let _ = -(1f64.asinh()); |
| 44 | + | + + |
| 45 | + |
| 46 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 47 | + --> $DIR/unary_precedence.rs:13:13 |
| 48 | + | |
| 49 | +LL | let _ = -1f64.tan(); |
| 50 | + | ^^^^^^^^^^^ |
| 51 | + | |
| 52 | +help: use parentheses to clarify your intent |
| 53 | + | |
| 54 | +LL | let _ = -(1f64.tan()); |
| 55 | + | + + |
| 56 | + |
| 57 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 58 | + --> $DIR/unary_precedence.rs:15:13 |
| 59 | + | |
| 60 | +LL | let _ = -1f64.tanh(); |
| 61 | + | ^^^^^^^^^^^^ |
| 62 | + | |
| 63 | +help: use parentheses to clarify your intent |
| 64 | + | |
| 65 | +LL | let _ = -(1f64.tanh()); |
| 66 | + | + + |
| 67 | + |
| 68 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 69 | + --> $DIR/unary_precedence.rs:17:13 |
| 70 | + | |
| 71 | +LL | let _ = -1.0_f64.cos().cos(); |
| 72 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 73 | + | |
| 74 | +help: use parentheses to clarify your intent |
| 75 | + | |
| 76 | +LL | let _ = -(1.0_f64.cos().cos()); |
| 77 | + | + + |
| 78 | + |
| 79 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 80 | + --> $DIR/unary_precedence.rs:19:13 |
| 81 | + | |
| 82 | +LL | let _ = -1.0_f64.cos().sin(); |
| 83 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 84 | + | |
| 85 | +help: use parentheses to clarify your intent |
| 86 | + | |
| 87 | +LL | let _ = -(1.0_f64.cos().sin()); |
| 88 | + | + + |
| 89 | + |
| 90 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 91 | + --> $DIR/unary_precedence.rs:21:13 |
| 92 | + | |
| 93 | +LL | let _ = -1.0_f64.sin().cos(); |
| 94 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 95 | + | |
| 96 | +help: use parentheses to clarify your intent |
| 97 | + | |
| 98 | +LL | let _ = -(1.0_f64.sin().cos()); |
| 99 | + | + + |
| 100 | + |
| 101 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 102 | + --> $DIR/unary_precedence.rs:23:13 |
| 103 | + | |
| 104 | +LL | let _ = -1f64.sin().sin(); |
| 105 | + | ^^^^^^^^^^^^^^^^^ |
| 106 | + | |
| 107 | +help: use parentheses to clarify your intent |
| 108 | + | |
| 109 | +LL | let _ = -(1f64.sin().sin()); |
| 110 | + | + + |
| 111 | + |
| 112 | +error: unary operator `-` has lower precedence than method calls which might be unexpected |
| 113 | + --> $DIR/unary_precedence.rs:26:11 |
| 114 | + | |
| 115 | +LL | dbg!( -1.0_f32.cos() ); |
| 116 | + | ^^^^^^^^^^^^^^ |
| 117 | + | |
| 118 | +help: use parentheses to clarify your intent |
| 119 | + | |
| 120 | +LL | dbg!( -(1.0_f32.cos()) ); |
| 121 | + | + + |
| 122 | + |
| 123 | +error: aborting due to 11 previous errors |
| 124 | + |
0 commit comments