2023-12-18 17:55:55 +01:00
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
|
|
|
|
const fn maybe_const_maybe<T: ~const ?Sized>() {}
|
2024-07-10 18:06:44 -04:00
|
|
|
//~^ ERROR `~const` trait not allowed with `?` trait polarity modifier
|
2023-12-18 17:55:55 +01:00
|
|
|
|
|
|
|
fn const_maybe<T: const ?Sized>() {}
|
2024-07-10 18:06:44 -04:00
|
|
|
//~^ ERROR `const` trait not allowed with `?` trait polarity modifier
|
2023-12-18 17:55:55 +01:00
|
|
|
|
|
|
|
const fn maybe_const_negative<T: ~const !Trait>() {}
|
2024-07-10 18:06:44 -04:00
|
|
|
//~^ ERROR `~const` trait not allowed with `!` trait polarity modifier
|
2023-12-18 17:55:55 +01:00
|
|
|
//~| ERROR negative bounds are not supported
|
|
|
|
|
|
|
|
fn const_negative<T: const !Trait>() {}
|
2024-07-10 18:06:44 -04:00
|
|
|
//~^ ERROR `const` trait not allowed with `!` trait polarity modifier
|
2023-12-18 17:55:55 +01:00
|
|
|
//~| ERROR negative bounds are not supported
|
|
|
|
|
|
|
|
#[const_trait]
|
|
|
|
trait Trait {}
|
|
|
|
|
|
|
|
fn main() {}
|