We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5f680e commit f825d6cCopy full SHA for f825d6c
src/test/ui/const-generics/const_trait_fn-issue-88433.rs
@@ -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