]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type/type-ascription-precedence.stderr
Auto merge of #99443 - jam1garner:mips-virt-feature, r=nagisa
[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 following trait must be implemented
37   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
38    |
39 LL | pub trait Neg {
40    | ^^^^^^^^^^^^^
41
42 error[E0308]: mismatched types
43   --> $DIR/type-ascription-precedence.rs:45:5
44    |
45 LL |     (S + Z): Z;
46    |     ^^^^^^^ expected struct `Z`, found struct `S`
47
48 error[E0308]: mismatched types
49   --> $DIR/type-ascription-precedence.rs:49:5
50    |
51 LL |     (S * Z): Z;
52    |     ^^^^^^^ expected struct `Z`, found struct `S`
53
54 error[E0308]: mismatched types
55   --> $DIR/type-ascription-precedence.rs:53:5
56    |
57 LL |     (S .. S): S;
58    |     ^^^^^^^^ expected struct `S`, found struct `std::ops::Range`
59    |
60    = note: expected struct `S`
61               found struct `std::ops::Range<S>`
62
63 error: aborting due to 8 previous errors
64
65 Some errors have detailed explanations: E0308, E0600, E0614.
66 For more information about an error, try `rustc --explain E0308`.