Skip to content

Commit c73b35e

Browse files
authored
Rollup merge of #90936 - JohnTitor:issue-80772, r=Mark-Simulacrum
Add a regression test for #80772 Closes #80772
2 parents 3c1d577 + 894c0e4 commit c73b35e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/test/ui/borrowck/issue-80772.rs

+21
Original file line numberDiff line numberDiff line change
@@ -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+
Exhibit {
16+
constant: "Hello world".len(),
17+
factory: |_| unimplemented!(),
18+
},
19+
];
20+
21+
fn main() {}

0 commit comments

Comments
 (0)