]> git.proxmox.com Git - rustc.git/blob - tests/ui/associated-consts/issue-105330.stderr
New upstream version 1.74.1+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 impl headers
37 --> $DIR/issue-105330.rs:6:27
38 |
39 LL | impl TraitWAssocConst for impl Demo {
40 | ^^^^^^^^^
41
42 error[E0131]: `main` function is not allowed to have generic parameters
43 --> $DIR/issue-105330.rs:17:8
44 |
45 LL | fn main<A: TraitWAssocConst<A=32>>() {
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters
47
48 error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
49 --> $DIR/issue-105330.rs:12:11
50 |
51 LL | foo::<Demo>()();
52 | ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
53 |
54 help: this trait has no implementations, consider adding one
55 --> $DIR/issue-105330.rs:1:1
56 |
57 LL | pub trait TraitWAssocConst {
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
59 note: required by a bound in `foo`
60 --> $DIR/issue-105330.rs:11:11
61 |
62 LL | fn foo<A: TraitWAssocConst<A=32>>() {
63 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
64
65 error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
66 --> $DIR/issue-105330.rs:12:11
67 |
68 LL | foo::<Demo>()();
69 | ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
70 |
71 = note: expected constant `32`
72 found constant `<Demo as TraitWAssocConst>::A`
73 note: required by a bound in `foo`
74 --> $DIR/issue-105330.rs:11:28
75 |
76 LL | fn foo<A: TraitWAssocConst<A=32>>() {
77 | ^^^^ required by this bound in `foo`
78
79 error[E0618]: expected function, found `()`
80 --> $DIR/issue-105330.rs:12:5
81 |
82 LL | fn foo<A: TraitWAssocConst<A=32>>() {
83 | ----------------------------------- `foo::<Demo>` defined here returns `()`
84 LL | foo::<Demo>()();
85 | ^^^^^^^^^^^^^--
86 | |
87 | call expression requires function
88
89 error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
90 --> $DIR/issue-105330.rs:19:11
91 |
92 LL | foo::<Demo>();
93 | ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
94 |
95 help: this trait has no implementations, consider adding one
96 --> $DIR/issue-105330.rs:1:1
97 |
98 LL | pub trait TraitWAssocConst {
99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
100 note: required by a bound in `foo`
101 --> $DIR/issue-105330.rs:11:11
102 |
103 LL | fn foo<A: TraitWAssocConst<A=32>>() {
104 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
105
106 error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
107 --> $DIR/issue-105330.rs:19:11
108 |
109 LL | foo::<Demo>();
110 | ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
111 |
112 = note: expected constant `32`
113 found constant `<Demo as TraitWAssocConst>::A`
114 note: required by a bound in `foo`
115 --> $DIR/issue-105330.rs:11:28
116 |
117 LL | fn foo<A: TraitWAssocConst<A=32>>() {
118 | ^^^^ required by this bound in `foo`
119
120 error: aborting due to 11 previous errors
121
122 Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658.
123 For more information about an error, try `rustc --explain E0131`.