fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.8 KiB67 linesraw
1warning: unused return value of `add` that must be used
2  --> $DIR/issue-103320-must-use-ops.rs:16:5
3   |
4LL |     x.add(4);
5   |     ^^^^^^^^
6   |
7   = note: this returns the result of the operation, without modifying the original
8note: the lint level is defined here
9  --> $DIR/issue-103320-must-use-ops.rs:3:9
10   |
11LL | #![warn(unused_must_use)]
12   |         ^^^^^^^^^^^^^^^
13help: use `let _ = ...` to ignore the resulting value
14   |
15LL |     let _ = x.add(4);
16   |     +++++++
17
18warning: unused return value of `sub` that must be used
19  --> $DIR/issue-103320-must-use-ops.rs:18:5
20   |
21LL |     x.sub(4);
22   |     ^^^^^^^^
23   |
24   = note: this returns the result of the operation, without modifying the original
25help: use `let _ = ...` to ignore the resulting value
26   |
27LL |     let _ = x.sub(4);
28   |     +++++++
29
30warning: unused return value of `mul` that must be used
31  --> $DIR/issue-103320-must-use-ops.rs:20:5
32   |
33LL |     x.mul(4);
34   |     ^^^^^^^^
35   |
36   = note: this returns the result of the operation, without modifying the original
37help: use `let _ = ...` to ignore the resulting value
38   |
39LL |     let _ = x.mul(4);
40   |     +++++++
41
42warning: unused return value of `div` that must be used
43  --> $DIR/issue-103320-must-use-ops.rs:22:5
44   |
45LL |     x.div(4);
46   |     ^^^^^^^^
47   |
48   = note: this returns the result of the operation, without modifying the original
49help: use `let _ = ...` to ignore the resulting value
50   |
51LL |     let _ = x.div(4);
52   |     +++++++
53
54warning: unused return value of `rem` that must be used
55  --> $DIR/issue-103320-must-use-ops.rs:24:5
56   |
57LL |     x.rem(4);
58   |     ^^^^^^^^
59   |
60   = note: this returns the result of the operation, without modifying the original
61help: use `let _ = ...` to ignore the resulting value
62   |
63LL |     let _ = x.rem(4);
64   |     +++++++
65
66warning: 5 warnings emitted
67