]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/type-ascription-precedence.rs:31:7 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | &(S: &S); |
60c5eb7d | 5 | | ^ expected `&S`, found struct `S` |
b7449926 XL |
6 | |
7 | error[E0308]: mismatched types | |
0731742a | 8 | --> $DIR/type-ascription-precedence.rs:35:7 |
b7449926 | 9 | | |
532ac7d7 | 10 | LL | *(S: Z); |
b7449926 | 11 | | ^ expected struct `Z`, found struct `S` |
b7449926 XL |
12 | |
13 | error[E0614]: type `Z` cannot be dereferenced | |
0731742a | 14 | --> $DIR/type-ascription-precedence.rs:35:5 |
b7449926 | 15 | | |
532ac7d7 | 16 | LL | *(S: Z); |
b7449926 XL |
17 | | ^^^^^^^ |
18 | ||
19 | error[E0308]: mismatched types | |
0731742a | 20 | --> $DIR/type-ascription-precedence.rs:40:7 |
b7449926 | 21 | | |
532ac7d7 | 22 | LL | -(S: Z); |
b7449926 | 23 | | ^ expected struct `Z`, found struct `S` |
b7449926 XL |
24 | |
25 | error[E0600]: cannot apply unary operator `-` to type `Z` | |
0731742a | 26 | --> $DIR/type-ascription-precedence.rs:40:5 |
b7449926 | 27 | | |
532ac7d7 | 28 | LL | -(S: Z); |
b7449926 XL |
29 | | ^^^^^^^ cannot apply unary operator `-` |
30 | | | |
c295e0f8 XL |
31 | note: an implementation of `std::ops::Neg` might be missing for `Z` |
32 | --> $DIR/type-ascription-precedence.rs:9:1 | |
33 | | | |
34 | LL | struct Z; | |
064997fb | 35 | | ^^^^^^^^ must implement `std::ops::Neg` |
c295e0f8 XL |
36 | note: the following trait must be implemented |
37 | --> $SRC_DIR/core/src/ops/arith.rs:LL:COL | |
38 | | | |
064997fb FG |
39 | LL | pub trait Neg { |
40 | | ^^^^^^^^^^^^^ | |
b7449926 XL |
41 | |
42 | error[E0308]: mismatched types | |
0731742a | 43 | --> $DIR/type-ascription-precedence.rs:45:5 |
b7449926 | 44 | | |
532ac7d7 | 45 | LL | (S + Z): Z; |
b7449926 | 46 | | ^^^^^^^ expected struct `Z`, found struct `S` |
b7449926 XL |
47 | |
48 | error[E0308]: mismatched types | |
0731742a | 49 | --> $DIR/type-ascription-precedence.rs:49:5 |
b7449926 | 50 | | |
532ac7d7 | 51 | LL | (S * Z): Z; |
b7449926 | 52 | | ^^^^^^^ expected struct `Z`, found struct `S` |
b7449926 XL |
53 | |
54 | error[E0308]: mismatched types | |
0731742a | 55 | --> $DIR/type-ascription-precedence.rs:53:5 |
b7449926 | 56 | | |
532ac7d7 | 57 | LL | (S .. S): S; |
b7449926 XL |
58 | | ^^^^^^^^ expected struct `S`, found struct `std::ops::Range` |
59 | | | |
60c5eb7d XL |
60 | = note: expected struct `S` |
61 | found struct `std::ops::Range<S>` | |
b7449926 XL |
62 | |
63 | error: aborting due to 8 previous errors | |
64 | ||
48663c56 | 65 | Some errors have detailed explanations: E0308, E0600, E0614. |
b7449926 | 66 | For more information about an error, try `rustc --explain E0308`. |