summaryrefslogtreecommitdiffstats
path: root/tests/ui/type/type-ascription-precedence.stderr
blob: d6d1e1d7d02938ea824f8bb9b392186eddce8ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
error[E0308]: mismatched types
  --> $DIR/type-ascription-precedence.rs:31:7
   |
LL |     &(S: &S);
   |       ^ expected `&S`, found `S`

error[E0308]: mismatched types
  --> $DIR/type-ascription-precedence.rs:35:7
   |
LL |     *(S: Z);
   |       ^ expected `Z`, found `S`

error[E0614]: type `Z` cannot be dereferenced
  --> $DIR/type-ascription-precedence.rs:35:5
   |
LL |     *(S: Z);
   |     ^^^^^^^

error[E0308]: mismatched types
  --> $DIR/type-ascription-precedence.rs:40:7
   |
LL |     -(S: Z);
   |       ^ expected `Z`, found `S`

error[E0600]: cannot apply unary operator `-` to type `Z`
  --> $DIR/type-ascription-precedence.rs:40:5
   |
LL |     -(S: Z);
   |     ^^^^^^^ cannot apply unary operator `-`
   |
note: an implementation of `std::ops::Neg` might be missing for `Z`
  --> $DIR/type-ascription-precedence.rs:9:1
   |
LL | struct Z;
   | ^^^^^^^^ must implement `std::ops::Neg`
note: the trait `std::ops::Neg` must be implemented
  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL

error[E0308]: mismatched types
  --> $DIR/type-ascription-precedence.rs:45:5
   |
LL |     (S + Z): Z;
   |     ^^^^^^^ expected `Z`, found `S`

error[E0308]: mismatched types
  --> $DIR/type-ascription-precedence.rs:49:5
   |
LL |     (S * Z): Z;
   |     ^^^^^^^ expected `Z`, found `S`

error[E0308]: mismatched types
  --> $DIR/type-ascription-precedence.rs:53:5
   |
LL |     (S .. S): S;
   |     ^^^^^^^^ expected `S`, found `Range<S>`
   |
   = note: expected struct `S`
              found struct `std::ops::Range<S>`

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0308, E0600, E0614.
For more information about an error, try `rustc --explain E0308`.