]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const_trait_fn-issue-88433.rs
Move generic error message to separate branches
[rust.git] / src / test / ui / const-generics / const_trait_fn-issue-88433.rs
1 // build-pass
2
3 #![feature(const_trait_impl)]
4
5 trait Func<T> {
6     type Output;
7
8     fn call_once(self, arg: T) -> Self::Output;
9 }
10
11
12 struct Closure;
13
14 impl const Func<&usize> for Closure {
15     type Output = usize;
16
17     fn call_once(self, arg: &usize) -> Self::Output {
18         *arg
19     }
20 }
21
22 enum Bug<T = [(); Closure.call_once(&0) ]> {
23     V(T),
24 }
25
26 fn main() {}