2022-12-06 00:13:32 +00:00
|
|
|
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
|
2024-01-10 06:39:02 +00:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2022-12-06 00:13:32 +00:00
|
|
|
|
|
|
|
error[E0658]: associated const equality is incomplete
|
2024-02-09 12:17:55 +00:00
|
|
|
--> $DIR/issue-105330.rs:18:29
|
2022-12-06 00:13:32 +00:00
|
|
|
|
|
|
|
|
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
|
2024-01-10 06:39:02 +00:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2022-12-06 00:13:32 +00:00
|
|
|
|
2024-01-07 17:11:48 +00:00
|
|
|
error[E0562]: `impl Trait` is not allowed in impl headers
|
2022-12-06 00:13:32 +00:00
|
|
|
--> $DIR/issue-105330.rs:6:27
|
|
|
|
|
|
|
|
|
LL | impl TraitWAssocConst for impl Demo {
|
|
|
|
| ^^^^^^^^^
|
2024-01-07 17:11:48 +00:00
|
|
|
|
|
|
|
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
|
2022-12-06 00:13:32 +00:00
|
|
|
|
2024-02-02 08:36:46 +00:00
|
|
|
error[E0131]: `main` function is not allowed to have generic parameters
|
2024-02-09 12:17:55 +00:00
|
|
|
--> $DIR/issue-105330.rs:18:8
|
2024-02-02 08:36:46 +00:00
|
|
|
|
|
|
|
|
LL | fn main<A: TraitWAssocConst<A=32>>() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters
|
|
|
|
|
2024-02-09 12:17:55 +00:00
|
|
|
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`
|
|
|
|
|
|
|
|
|
= help: the trait `TraitWAssocConst` is implemented for `{type error}`
|
|
|
|
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:21:11
|
|
|
|
|
|
|
|
|
LL | foo::<Demo>();
|
|
|
|
| ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
|
|
|
|
|
|
|
|
|
= help: the trait `TraitWAssocConst` is implemented for `{type error}`
|
|
|
|
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:21: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: aborting due to 11 previous errors
|
2022-12-06 00:13:32 +00:00
|
|
|
|
2024-02-09 12:17:55 +00:00
|
|
|
Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658.
|
2024-02-02 08:36:46 +00:00
|
|
|
For more information about an error, try `rustc --explain E0131`.
|