]> git.proxmox.com Git - rustc.git/blob - tests/ui/associated-consts/issue-105330.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / associated-consts / issue-105330.stderr
1 error: expected one of `!` or `::`, found `A`
2 --> $DIR/issue-105330.rs:8:14
3 |
4 LL | impl TraitWAssocConst for impl Demo {
5 | - while parsing this item list starting here
6 LL |
7 LL | pubconst A: str = 32;
8 | ^ expected one of `!` or `::`
9 LL | }
10 | - the item list ends here
11
12 error[E0404]: expected trait, found struct `Demo`
13 --> $DIR/issue-105330.rs:6:32
14 |
15 LL | impl TraitWAssocConst for impl Demo {
16 | ^^^^ not a trait
17
18 error[E0658]: associated const equality is incomplete
19 --> $DIR/issue-105330.rs:11:28
20 |
21 LL | fn foo<A: TraitWAssocConst<A=32>>() {
22 | ^^^^
23 |
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
26
27 error[E0658]: associated const equality is incomplete
28 --> $DIR/issue-105330.rs:17:29
29 |
30 LL | fn main<A: TraitWAssocConst<A=32>>() {
31 | ^^^^
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
35
36 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
37 --> $DIR/issue-105330.rs:6:27
38 |
39 LL | impl TraitWAssocConst for impl Demo {
40 | ^^^^^^^^^
41
42 error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
43 --> $DIR/issue-105330.rs:12:11
44 |
45 LL | foo::<Demo>()();
46 | ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
47 |
48 note: required by a bound in `foo`
49 --> $DIR/issue-105330.rs:11:11
50 |
51 LL | fn foo<A: TraitWAssocConst<A=32>>() {
52 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
53
54 error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
55 --> $DIR/issue-105330.rs:12:11
56 |
57 LL | foo::<Demo>()();
58 | ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
59 |
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
64 |
65 LL | fn foo<A: TraitWAssocConst<A=32>>() {
66 | ^^^^ required by this bound in `foo`
67
68 error[E0618]: expected function, found `()`
69 --> $DIR/issue-105330.rs:12:5
70 |
71 LL | fn foo<A: TraitWAssocConst<A=32>>() {
72 | ----------------------------------- `foo::<Demo>` defined here returns `()`
73 LL | foo::<Demo>()();
74 | ^^^^^^^^^^^^^--
75 | |
76 | call expression requires function
77
78 error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
79 --> $DIR/issue-105330.rs:19:11
80 |
81 LL | foo::<Demo>();
82 | ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
83 |
84 note: required by a bound in `foo`
85 --> $DIR/issue-105330.rs:11:11
86 |
87 LL | fn foo<A: TraitWAssocConst<A=32>>() {
88 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
89
90 error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
91 --> $DIR/issue-105330.rs:19:11
92 |
93 LL | foo::<Demo>();
94 | ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
95 |
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
100 |
101 LL | fn foo<A: TraitWAssocConst<A=32>>() {
102 | ^^^^ required by this bound in `foo`
103
104 error[E0131]: `main` function is not allowed to have generic parameters
105 --> $DIR/issue-105330.rs:17:8
106 |
107 LL | fn main<A: TraitWAssocConst<A=32>>() {
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters
109
110 error: aborting due to 11 previous errors
111
112 Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658.
113 For more information about an error, try `rustc --explain E0131`.