summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-consts/issue-105330.stderr
blob: 30c380152a5e6b88cf871a26dd82e1cf55f3403c (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
error: expected one of `!` or `::`, found `A`
  --> $DIR/issue-105330.rs:8:14
   |
LL | impl TraitWAssocConst for impl Demo {
   |                                     - while parsing this item list starting here
LL |
LL |     pubconst A: str = 32;
   |              ^ expected one of `!` or `::`
LL | }
   | - the item list ends here

error[E0404]: expected trait, found struct `Demo`
  --> $DIR/issue-105330.rs:6:32
   |
LL | impl TraitWAssocConst for impl Demo {
   |                                ^^^^ not a trait

error[E0658]: associated const equality is incomplete
  --> $DIR/issue-105330.rs:11:28
   |
LL | fn foo<A: TraitWAssocConst<A=32>>() {
   |                            ^^^^
   |
   = note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
   = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable

error[E0658]: associated const equality is incomplete
  --> $DIR/issue-105330.rs:17:29
   |
LL | fn main<A: TraitWAssocConst<A=32>>() {
   |                             ^^^^
   |
   = note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
   = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable

error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
  --> $DIR/issue-105330.rs:6:27
   |
LL | impl TraitWAssocConst for impl Demo {
   |                           ^^^^^^^^^

error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
  --> $DIR/issue-105330.rs:12:11
   |
LL |     foo::<Demo>()();
   |           ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
   |
note: required by a bound in `foo`
  --> $DIR/issue-105330.rs:11:11
   |
LL | fn foo<A: TraitWAssocConst<A=32>>() {
   |           ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`

error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
  --> $DIR/issue-105330.rs:12:11
   |
LL |     foo::<Demo>()();
   |           ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
   |
   = note: expected constant `32`
              found constant `<Demo as TraitWAssocConst>::A`
note: required by a bound in `foo`
  --> $DIR/issue-105330.rs:11:28
   |
LL | fn foo<A: TraitWAssocConst<A=32>>() {
   |                            ^^^^ required by this bound in `foo`

error[E0618]: expected function, found `()`
  --> $DIR/issue-105330.rs:12:5
   |
LL | fn foo<A: TraitWAssocConst<A=32>>() {
   | ----------------------------------- `foo::<Demo>` defined here returns `()`
LL |     foo::<Demo>()();
   |     ^^^^^^^^^^^^^--
   |     |
   |     call expression requires function

error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
  --> $DIR/issue-105330.rs:19:11
   |
LL |     foo::<Demo>();
   |           ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
   |
note: required by a bound in `foo`
  --> $DIR/issue-105330.rs:11:11
   |
LL | fn foo<A: TraitWAssocConst<A=32>>() {
   |           ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`

error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
  --> $DIR/issue-105330.rs:19:11
   |
LL |     foo::<Demo>();
   |           ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
   |
   = note: expected constant `32`
              found constant `<Demo as TraitWAssocConst>::A`
note: required by a bound in `foo`
  --> $DIR/issue-105330.rs:11:28
   |
LL | fn foo<A: TraitWAssocConst<A=32>>() {
   |                            ^^^^ required by this bound in `foo`

error[E0131]: `main` function is not allowed to have generic parameters
  --> $DIR/issue-105330.rs:17:8
   |
LL | fn main<A: TraitWAssocConst<A=32>>() {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters

error: aborting due to 11 previous errors

Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658.
For more information about an error, try `rustc --explain E0131`.