|
| 1 | +error: const `impl` for trait `Foo` which is not marked with `#[const_trait]` |
| 2 | + --> $DIR/spec-effectvar-ice.rs:12:15 |
| 3 | + | |
| 4 | +LL | trait Foo {} |
| 5 | + | - help: mark `Foo` as const: `#[const_trait]` |
| 6 | +LL | |
| 7 | +LL | impl<T> const Foo for T {} |
| 8 | + | ^^^ |
| 9 | + | |
| 10 | + = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` |
| 11 | + = note: adding a non-const method body in the future would be a breaking change |
| 12 | + |
| 13 | +error: const `impl` for trait `Foo` which is not marked with `#[const_trait]` |
| 14 | + --> $DIR/spec-effectvar-ice.rs:16:15 |
| 15 | + | |
| 16 | +LL | trait Foo {} |
| 17 | + | - help: mark `Foo` as const: `#[const_trait]` |
| 18 | +... |
| 19 | +LL | impl<T> const Foo for T where T: const Specialize {} |
| 20 | + | ^^^ |
| 21 | + | |
| 22 | + = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` |
| 23 | + = note: adding a non-const method body in the future would be a breaking change |
| 24 | + |
| 25 | +error: `const` can only be applied to `#[const_trait]` traits |
| 26 | + --> $DIR/spec-effectvar-ice.rs:16:40 |
| 27 | + | |
| 28 | +LL | impl<T> const Foo for T where T: const Specialize {} |
| 29 | + | ^^^^^^^^^^ |
| 30 | + |
| 31 | +error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates |
| 32 | + --> $DIR/spec-effectvar-ice.rs:12:9 |
| 33 | + | |
| 34 | +LL | impl<T> const Foo for T {} |
| 35 | + | ^^^^^ unconstrained const parameter |
| 36 | + | |
| 37 | + = note: expressions using a const parameter must map each value to a distinct output value |
| 38 | + = note: proving the result of expressions other than the parameter are unique is not supported |
| 39 | + |
| 40 | +error[E0207]: the const parameter `host` is not constrained by the impl trait, self type, or predicates |
| 41 | + --> $DIR/spec-effectvar-ice.rs:16:9 |
| 42 | + | |
| 43 | +LL | impl<T> const Foo for T where T: const Specialize {} |
| 44 | + | ^^^^^ unconstrained const parameter |
| 45 | + | |
| 46 | + = note: expressions using a const parameter must map each value to a distinct output value |
| 47 | + = note: proving the result of expressions other than the parameter are unique is not supported |
| 48 | + |
| 49 | +error: specialization impl does not specialize any associated items |
| 50 | + --> $DIR/spec-effectvar-ice.rs:16:1 |
| 51 | + | |
| 52 | +LL | impl<T> const Foo for T where T: const Specialize {} |
| 53 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 54 | + | |
| 55 | +note: impl is a specialization of this impl |
| 56 | + --> $DIR/spec-effectvar-ice.rs:12:1 |
| 57 | + | |
| 58 | +LL | impl<T> const Foo for T {} |
| 59 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 60 | + |
| 61 | +error: could not resolve generic parameters on overridden impl |
| 62 | + --> $DIR/spec-effectvar-ice.rs:16:1 |
| 63 | + | |
| 64 | +LL | impl<T> const Foo for T where T: const Specialize {} |
| 65 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 66 | + |
| 67 | +error: aborting due to 7 previous errors |
| 68 | + |
| 69 | +For more information about this error, try `rustc --explain E0207`. |
0 commit comments