You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/NNNN-lifetime-dependency.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -446,6 +446,7 @@ We expect that the lifetime notation would be mandatory for any property that pr
446
446
This proposal has deliberately limited the application of lifetime dependencies to return types that are `~Escapable`.
447
447
This simplifies the model by identifying `~Escapable` types as exactly those types that can carry such dependencies.
448
448
It also helps simplify the enforcement of lifetime constraints by guaranteeing that constrained values cannot escape before being returned.
449
+
Most importantly, this restriction helps ensure that the new semantics (especially lifetime dependency inference) cannot accidentally break existing code.
449
450
We expect that in the future, additional investigation can reveal a way to relax this restriction.
450
451
451
452
#### Downgraded Dependencies
@@ -468,3 +469,25 @@ it needs to guarantee that the reference is destroyed before the container:
0 commit comments