]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-ascription-precedence.stderr
Rollup merge of #105419 - YC:issue-41731, r=petrochenkov
[rust.git] / src / test / ui / type / type-ascription-precedence.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-ascription-precedence.rs:31:7
3    |
4 LL |     &(S: &S);
5    |       ^ expected `&S`, found struct `S`
6
7 error[E0308]: mismatched types
8   --> $DIR/type-ascription-precedence.rs:35:7
9    |
10 LL |     *(S: Z);
11    |       ^ expected struct `Z`, found struct `S`
12
13 error[E0614]: type `Z` cannot be dereferenced
14   --> $DIR/type-ascription-precedence.rs:35:5
15    |
16 LL |     *(S: Z);
17    |     ^^^^^^^
18
19 error[E0308]: mismatched types
20   --> $DIR/type-ascription-precedence.rs:40:7
21    |
22 LL |     -(S: Z);
23    |       ^ expected struct `Z`, found struct `S`
24
25 error[E0600]: cannot apply unary operator `-` to type `Z`
26   --> $DIR/type-ascription-precedence.rs:40:5
27    |
28 LL |     -(S: Z);
29    |     ^^^^^^^ cannot apply unary operator `-`
30    |
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;
35    | ^^^^^^^^ must implement `std::ops::Neg`
36 note: the trait `std::ops::Neg` must be implemented
37   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
38
39 error[E0308]: mismatched types
40   --> $DIR/type-ascription-precedence.rs:45:5
41    |
42 LL |     (S + Z): Z;
43    |     ^^^^^^^ expected struct `Z`, found struct `S`
44
45 error[E0308]: mismatched types
46   --> $DIR/type-ascription-precedence.rs:49:5
47    |
48 LL |     (S * Z): Z;
49    |     ^^^^^^^ expected struct `Z`, found struct `S`
50
51 error[E0308]: mismatched types
52   --> $DIR/type-ascription-precedence.rs:53:5
53    |
54 LL |     (S .. S): S;
55    |     ^^^^^^^^ expected struct `S`, found struct `Range`
56    |
57    = note: expected struct `S`
58               found struct `std::ops::Range<S>`
59
60 error: aborting due to 8 previous errors
61
62 Some errors have detailed explanations: E0308, E0600, E0614.
63 For more information about an error, try `rustc --explain E0308`.