about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs
blob: f1fc98d72a54759a4d4bb1020d88e2f3aa4c98c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ check-pass

#![feature(const_trait_impl)]

#[const_trait]
trait Foo {}

impl<T> const Foo for (T,) where T: [const] Foo {}

const fn needs_const_foo(_: impl [const] Foo + Copy) {}

const fn test<T: [const] Foo + Copy>(t: T) {
    needs_const_foo((t,));
}

fn main() {}