mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
implement basic inferring of lifetimes
This commit is contained in:
parent
4cd8dcf287
commit
8a4261aca8
14 changed files with 109 additions and 85 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue