@@ -6,9 +6,8 @@ LL | let x = 2.0.neg();
6
6
|
7
7
help: you must specify a concrete type for this numeric value, like `f32`
8
8
|
9
- LL - let x = 2.0.neg();
10
- LL + let x = 2.0_f32.neg();
11
- |
9
+ LL | let x = 2.0_f32.neg();
10
+ | ++++
12
11
13
12
error[E0689]: can't call method `neg` on ambiguous numeric type `{float}`
14
13
--> $DIR/method-on-ambiguous-numeric-type.rs:17:15
@@ -18,19 +17,30 @@ LL | let x = y.neg();
18
17
|
19
18
help: you must specify a type for this binding, like `f32`
20
19
|
20
+ LL | let y: f32 = 2.;
21
+ | +++++
22
+
23
+ error[E0689]: can't call method `neg` on ambiguous numeric type `{float}`
24
+ --> $DIR/method-on-ambiguous-numeric-type.rs:22:15
25
+ |
26
+ LL | let x = y.neg();
27
+ | ^^^
28
+ |
29
+ help: you must specify a type for this binding, like `f32`
30
+ |
21
31
LL | let y: f32 = 2.0;
22
32
| +++++
23
33
24
34
error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
25
- --> $DIR/method-on-ambiguous-numeric-type.rs:22 :26
35
+ --> $DIR/method-on-ambiguous-numeric-type.rs:27 :26
26
36
|
27
37
LL | for i in 0..100 {
28
38
| - you must specify a type for this binding, like `i32`
29
39
LL | println!("{}", i.pow(2));
30
40
| ^^^
31
41
32
42
error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
33
- --> $DIR/method-on-ambiguous-numeric-type.rs:27 :15
43
+ --> $DIR/method-on-ambiguous-numeric-type.rs:32 :15
34
44
|
35
45
LL | local_bar.pow(2);
36
46
| ^^^
@@ -41,7 +51,7 @@ LL | ($ident:ident) => { let $ident: i32 = 42; }
41
51
| +++++
42
52
43
53
error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
44
- --> $DIR/method-on-ambiguous-numeric-type.rs:31 :18
54
+ --> $DIR/method-on-ambiguous-numeric-type.rs:36 :18
45
55
|
46
56
LL | local_bar_tt.pow(2);
47
57
| ^^^
@@ -52,7 +62,7 @@ LL | local_mac_tt!(local_bar_tt: i32);
52
62
| +++++
53
63
54
64
error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
55
- --> $DIR/method-on-ambiguous-numeric-type.rs:37 :9
65
+ --> $DIR/method-on-ambiguous-numeric-type.rs:42 :9
56
66
|
57
67
LL | bar.pow(2);
58
68
| ^^^
@@ -63,6 +73,6 @@ help: you must specify a type for this binding, like `i32`
63
73
LL | ($ident:ident) => { let $ident: i32 = 42; }
64
74
| +++++
65
75
66
- error: aborting due to 6 previous errors
76
+ error: aborting due to 7 previous errors
67
77
68
78
For more information about this error, try `rustc --explain E0689`.
0 commit comments