Closed
Description
When you have a borrow like this:
let x = &*y
where y: &T
, then there is really no reason for the borrow checker to "record" the borrow or figure out its scope. The reason is that there is no action that one can do with y
that would invalidate x
. (Of course we still want to record the outlives relationship that forces y
's lifetime to outlive x
's lifetime.)
The old AST borrow checker did this same optimization. It ought to have a huge effect on html5ever: my profile measurements suggest that basically all of its time is spent with these very large borrow sets.