1 error: expected one of `!` or `::`, found `A`
2 --> $DIR/issue-105330.rs:8:14
4 LL | impl TraitWAssocConst for impl Demo {
5 | - while parsing this item list starting here
7 LL | pubconst A: str = 32;
8 | ^ expected one of `!` or `::`
10 | - the item list ends here
12 error[E0404]: expected trait, found struct `Demo`
13 --> $DIR/issue-105330.rs:6:32
15 LL | impl TraitWAssocConst for impl Demo {
18 error[E0658]: associated const equality is incomplete
19 --> $DIR/issue-105330.rs:11:28
21 LL | fn foo<A: TraitWAssocConst<A=32>>() {
24 = note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
25 = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
27 error[E0658]: associated const equality is incomplete
28 --> $DIR/issue-105330.rs:17:29
30 LL | fn main<A: TraitWAssocConst<A=32>>() {
33 = note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
34 = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
36 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
37 --> $DIR/issue-105330.rs:6:27
39 LL | impl TraitWAssocConst for impl Demo {
42 error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
43 --> $DIR/issue-105330.rs:12:11
46 | ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
48 note: required by a bound in `foo`
49 --> $DIR/issue-105330.rs:11:11
51 LL | fn foo<A: TraitWAssocConst<A=32>>() {
52 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
54 error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
55 --> $DIR/issue-105330.rs:12:11
58 | ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
60 = note: expected constant `32`
61 found constant `<Demo as TraitWAssocConst>::A`
62 note: required by a bound in `foo`
63 --> $DIR/issue-105330.rs:11:28
65 LL | fn foo<A: TraitWAssocConst<A=32>>() {
66 | ^^^^ required by this bound in `foo`
68 error[E0618]: expected function, found `()`
69 --> $DIR/issue-105330.rs:12:5
71 LL | fn foo<A: TraitWAssocConst<A=32>>() {
72 | ----------------------------------- `foo::<Demo>` defined here returns `()`
76 | call expression requires function
78 error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
79 --> $DIR/issue-105330.rs:19:11
82 | ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
84 note: required by a bound in `foo`
85 --> $DIR/issue-105330.rs:11:11
87 LL | fn foo<A: TraitWAssocConst<A=32>>() {
88 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
90 error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
91 --> $DIR/issue-105330.rs:19:11
94 | ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
96 = note: expected constant `32`
97 found constant `<Demo as TraitWAssocConst>::A`
98 note: required by a bound in `foo`
99 --> $DIR/issue-105330.rs:11:28
101 LL | fn foo<A: TraitWAssocConst<A=32>>() {
102 | ^^^^ required by this bound in `foo`
104 error[E0131]: `main` function is not allowed to have generic parameters
105 --> $DIR/issue-105330.rs:17:8
107 LL | fn main<A: TraitWAssocConst<A=32>>() {
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters
110 error: aborting due to 11 previous errors
112 Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658.
113 For more information about an error, try `rustc --explain E0131`.