a-mir-formality
a-mir-formality copied to clipboard
issue-25860 spike
The goal of this spike is to get this program checking completely within a-mir-formality:
static UNIT: &'static &'static () = &&();
fn foo<'a, 'b, T>(_: &'a &'b (), v: &'b T) -> &'a T {
v
}
fn bad<'a, T>(x: &'a T) -> &'static T {
let f: fn(_, &'a T) -> &'static T = foo;
f(UNIT, x)
}
fn main() {
let value = {
let data = 22;
bad(&data)
};
let _ = *value;
}
Subgoals:
- [ ] #25
- [ ] #23
- [ ] #54
- [x] #24
- [ ] #55
- [ ] #26
- [ ] #28
- [ ] #30
- [ ] #29