about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/spec-effectvar-ice.rs
blob: 46f71b114a37285ece2405d05bc0ee9235b87b83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Fixes #119830

#![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 `const`

impl<T> const Foo for T where T: const Specialize {}
//~^ error: const `impl` for trait `Foo` which is not `const`
//~| error: `const` can only be applied to `const` traits
//~| error: specialization impl does not specialize any associated items
//~| error: cannot specialize on trait `Specialize`

fn main() {}