implement basic inferring of lifetimes

This commit is contained in:
dfireBird 2024-06-29 10:36:39 +05:30
parent 4cd8dcf287
commit 8a4261aca8
No known key found for this signature in database
GPG key ID: 26D522CA5FC2B93D
14 changed files with 109 additions and 85 deletions

View file

@ -542,7 +542,8 @@ impl ReceiverAdjustments {
}
}
if let Some(m) = self.autoref {
let a = Adjustment::borrow(m, ty);
let lt = table.new_lifetime_var();
let a = Adjustment::borrow(m, ty, lt);
ty = a.target.clone();
adjust.push(a);
}