|
| 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 | + | ^^^^ types differ |
| 59 | + | |
| 60 | +note: required by a bound in `foo` |
| 61 | + --> $DIR/issue-105330.rs:11:28 |
| 62 | + | |
| 63 | +LL | fn foo<A: TraitWAssocConst<A=32>>() { |
| 64 | + | ^^^^ required by this bound in `foo` |
| 65 | + |
| 66 | +error[E0618]: expected function, found `()` |
| 67 | + --> $DIR/issue-105330.rs:12:5 |
| 68 | + | |
| 69 | +LL | fn foo<A: TraitWAssocConst<A=32>>() { |
| 70 | + | ----------------------------------- `foo::<Demo>` defined here returns `()` |
| 71 | +LL | foo::<Demo>()(); |
| 72 | + | ^^^^^^^^^^^^^-- |
| 73 | + | | |
| 74 | + | call expression requires function |
| 75 | + |
| 76 | +error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied |
| 77 | + --> $DIR/issue-105330.rs:19:11 |
| 78 | + | |
| 79 | +LL | foo::<Demo>(); |
| 80 | + | ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo` |
| 81 | + | |
| 82 | +note: required by a bound in `foo` |
| 83 | + --> $DIR/issue-105330.rs:11:11 |
| 84 | + | |
| 85 | +LL | fn foo<A: TraitWAssocConst<A=32>>() { |
| 86 | + | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo` |
| 87 | + |
| 88 | +error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32` |
| 89 | + --> $DIR/issue-105330.rs:19:11 |
| 90 | + | |
| 91 | +LL | foo::<Demo>(); |
| 92 | + | ^^^^ types differ |
| 93 | + | |
| 94 | +note: required by a bound in `foo` |
| 95 | + --> $DIR/issue-105330.rs:11:28 |
| 96 | + | |
| 97 | +LL | fn foo<A: TraitWAssocConst<A=32>>() { |
| 98 | + | ^^^^ required by this bound in `foo` |
| 99 | + |
| 100 | +error[E0131]: `main` function is not allowed to have generic parameters |
| 101 | + --> $DIR/issue-105330.rs:17:8 |
| 102 | + | |
| 103 | +LL | fn main<A: TraitWAssocConst<A=32>>() { |
| 104 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters |
| 105 | + |
| 106 | +error: aborting due to 11 previous errors |
| 107 | + |
| 108 | +Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658. |
| 109 | +For more information about an error, try `rustc --explain E0131`. |
0 commit comments