Skip to content

Commit f825d6c

Browse files
committed
add test
1 parent b5f680e commit f825d6c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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() {}

0 commit comments

Comments
 (0)