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.
2 parents 65cbcb0 + ef073bd commit 7f0e652Copy full SHA for 7f0e652
rust-version
@@ -1 +1 @@
1
-404c8471aba60c2d837fa728e7c729a0f52d5830
+c5ecc157043ba413568b09292001a4a74b541a4e
tests/run-pass/issue-91636.rs
@@ -0,0 +1,20 @@
+type BuiltIn = for<'a> fn(&str);
2
+
3
+struct Function {
4
+ inner: BuiltIn,
5
+}
6
7
+impl Function {
8
+ fn new(subr: BuiltIn) -> Self {
9
+ Self { inner: subr }
10
+ }
11
12
13
+fn dummy(_: &str) {}
14
15
+fn main() {
16
+ let func1 = Function::new(dummy);
17
+ let func2 = Function::new(dummy);
18
+ let inner: fn(&'static _) -> _ = func1.inner;
19
+ assert!(inner == func2.inner);
20
0 commit comments