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 891ca5f commit 894c0e4Copy full SHA for 894c0e4
src/test/ui/borrowck/issue-80772.rs
@@ -0,0 +1,21 @@
1
+// check-pass
2
+
3
+trait SomeTrait {}
4
5
+pub struct Exhibit {
6
+ constant: usize,
7
+ factory: fn(&usize) -> Box<dyn SomeTrait>,
8
+}
9
10
+pub const A_CONSTANT: &[Exhibit] = &[
11
+ Exhibit {
12
+ constant: 1,
13
+ factory: |_| unimplemented!(),
14
+ },
15
16
+ constant: "Hello world".len(),
17
18
19
+];
20
21
+fn main() {}
0 commit comments