add regression test
This commit is contained in:
parent
65cbcb0d05
commit
d8f7b831e7
@ -1 +1 @@
|
|||||||
404c8471aba60c2d837fa728e7c729a0f52d5830
|
c5ecc157043ba413568b09292001a4a74b541a4e
|
||||||
|
20
tests/run-pass/issue-91636.rs
Normal file
20
tests/run-pass/issue-91636.rs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
type BuiltIn = for<'a> fn(&str);
|
||||||
|
|
||||||
|
struct Function {
|
||||||
|
inner: BuiltIn,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Function {
|
||||||
|
fn new(subr: BuiltIn) -> Self {
|
||||||
|
Self { inner: subr }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn dummy(_: &str) {}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let func1 = Function::new(dummy);
|
||||||
|
let func2 = Function::new(dummy);
|
||||||
|
let inner: fn(&'static _) -> _ = func1.inner;
|
||||||
|
assert!(inner == func2.inner);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user