2024-06-01 13:59:13 -05:00
|
|
|
//@ check-fail
|
|
|
|
// Fixes #119830
|
|
|
|
|
2024-06-21 07:22:29 -05:00
|
|
|
#![feature(effects)] //~ WARN the feature `effects` is incomplete
|
2024-06-01 13:59:13 -05:00
|
|
|
#![feature(min_specialization)]
|
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
|
|
|
trait Specialize {}
|
|
|
|
|
|
|
|
trait Foo {}
|
|
|
|
|
|
|
|
impl<T> const Foo for T {}
|
|
|
|
//~^ error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
|
|
|
|
|
|
|
|
impl<T> const Foo for T where T: const Specialize {}
|
|
|
|
//~^ error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
|
|
|
|
//~| error: `const` can only be applied to `#[const_trait]` traits
|
2024-06-25 04:50:01 -05:00
|
|
|
//~| error: specialization impl does not specialize any associated items
|
|
|
|
//~| error: cannot specialize on trait `Specialize`
|
2024-06-01 13:59:13 -05:00
|
|
|
|
2024-06-04 03:10:08 -05:00
|
|
|
fn main() {}
|