rust/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/spec-effectvar-ice.stderr

65 lines
2.3 KiB
Plaintext

warning: the feature `effects` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/spec-effectvar-ice.rs:4:12
|
LL | #![feature(effects)]
| ^^^^^^^
|
= note: see issue #102090 <https://github.com/rust-lang/rust/issues/102090> for more information
= note: `#[warn(incomplete_features)]` on by default
error: using `#![feature(effects)]` without enabling next trait solver globally
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
= help: use `-Znext-solver` to enable
error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
--> $DIR/spec-effectvar-ice.rs:12:15
|
LL | trait Foo {}
| - help: mark `Foo` as const: `#[const_trait]`
LL |
LL | impl<T> const Foo for T {}
| ^^^
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change
error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
--> $DIR/spec-effectvar-ice.rs:15:15
|
LL | trait Foo {}
| - help: mark `Foo` as const: `#[const_trait]`
...
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
= note: adding a non-const method body in the future would be a breaking change
error: `const` can only be applied to `#[const_trait]` traits
--> $DIR/spec-effectvar-ice.rs:15:40
|
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^^^^^^^^
error: specialization impl does not specialize any associated items
--> $DIR/spec-effectvar-ice.rs:15:1
|
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: impl is a specialization of this impl
--> $DIR/spec-effectvar-ice.rs:12:1
|
LL | impl<T> const Foo for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error: cannot specialize on trait `Specialize`
--> $DIR/spec-effectvar-ice.rs:15:34
|
LL | impl<T> const Foo for T where T: const Specialize {}
| ^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors; 1 warning emitted