|
| 1 | +error: unused assignement to temporary |
| 2 | + --> $DIR/unused-field-assign.rs:11:20 |
| 3 | + | |
| 4 | +LL | Foo { x: 2 }.x = 3; |
| 5 | + | ------------ ^ |
| 6 | + | | |
| 7 | + | this is not bound to any variable |
| 8 | + | |
| 9 | +note: the lint level is defined here |
| 10 | + --> $DIR/unused-field-assign.rs:1:9 |
| 11 | + | |
| 12 | +LL | #![deny(unused_assignments)] |
| 13 | + | ^^^^^^^^^^^^^^^^^^ |
| 14 | + |
| 15 | +error: unused assignement to temporary |
| 16 | + --> $DIR/unused-field-assign.rs:13:20 |
| 17 | + | |
| 18 | +LL | Foo { x: 2 }.x += 1; |
| 19 | + | ------------ ^^ |
| 20 | + | | |
| 21 | + | this is not bound to any variable |
| 22 | + |
| 23 | +error: unused assignement to temporary |
| 24 | + --> $DIR/unused-field-assign.rs:16:15 |
| 25 | + | |
| 26 | +LL | (2, 12).0 += 10; |
| 27 | + | ------- ^^ |
| 28 | + | | |
| 29 | + | this is not bound to any variable |
| 30 | + |
| 31 | +error: unused assignement to temporary |
| 32 | + --> $DIR/unused-field-assign.rs:18:19 |
| 33 | + | |
| 34 | +LL | (10, false).1 = true; |
| 35 | + | ----------- ^ |
| 36 | + | | |
| 37 | + | this is not bound to any variable |
| 38 | + |
| 39 | +error: unused assignement to temporary |
| 40 | + --> $DIR/unused-field-assign.rs:21:11 |
| 41 | + | |
| 42 | +LL | FOO.x = 2; |
| 43 | + | --- ^ |
| 44 | + | | |
| 45 | + | this is not bound to any variable |
| 46 | + | help: consider introducing a local variable: `let mut foo = FOO;` |
| 47 | + | |
| 48 | + = note: in Rust, constants are not associated with a specific memory location, and are inlined wherever they are used |
| 49 | + |
| 50 | +error: unused assignement to temporary |
| 51 | + --> $DIR/unused-field-assign.rs:24:11 |
| 52 | + | |
| 53 | +LL | FOO.x -= 6; |
| 54 | + | --- ^^ |
| 55 | + | | |
| 56 | + | this is not bound to any variable |
| 57 | + | help: consider introducing a local variable: `let mut foo = FOO;` |
| 58 | + | |
| 59 | + = note: in Rust, constants are not associated with a specific memory location, and are inlined wherever they are used |
| 60 | + |
| 61 | +error: unused assignement to temporary |
| 62 | + --> $DIR/unused-field-assign.rs:28:11 |
| 63 | + | |
| 64 | +LL | BAR.1 = true; |
| 65 | + | --- ^ |
| 66 | + | | |
| 67 | + | this is not bound to any variable |
| 68 | + | help: consider introducing a local variable: `let mut bar = BAR;` |
| 69 | + | |
| 70 | + = note: in Rust, constants are not associated with a specific memory location, and are inlined wherever they are used |
| 71 | + |
| 72 | +error: unused assignement to temporary |
| 73 | + --> $DIR/unused-field-assign.rs:31:11 |
| 74 | + | |
| 75 | +LL | BAR.0 *= 2; |
| 76 | + | --- ^^ |
| 77 | + | | |
| 78 | + | this is not bound to any variable |
| 79 | + | help: consider introducing a local variable: `let mut bar = BAR;` |
| 80 | + | |
| 81 | + = note: in Rust, constants are not associated with a specific memory location, and are inlined wherever they are used |
| 82 | + |
| 83 | +error: aborting due to 8 previous errors |
| 84 | + |
0 commit comments