fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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