This commit is contained in:
b-naber 2021-09-02 16:29:04 +02:00
parent b5f680e748
commit f825d6c6cc

View File

@ -0,0 +1,26 @@
// build-pass
#![feature(const_trait_impl)]
trait Func<T> {
type Output;
fn call_once(self, arg: T) -> Self::Output;
}
struct Closure;
impl const Func<&usize> for Closure {
type Output = usize;
fn call_once(self, arg: &usize) -> Self::Output {
*arg
}
}
enum Bug<T = [(); Closure.call_once(&0) ]> {
V(T),
}
fn main() {}