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
Subtyping on lifetimes is in terms of that relationship: if `'a: 'b` ("a contains
20
21
b" or "a outlives b"), then `'a` is a subtype of `'b`. This is a large source of
21
22
confusion, because it seems intuitively backwards to many: the bigger scope is a
22
23
*subtype* of the smaller scope.
24
+
-->
25
+
26
+
ライフタイムにおける派生型を、ライフタイムの関係から見ます。もし `'a: 'b` (「 a は b を含む」あるいは「 a は b より長生きする」)ならば、 `'a` は `'b` の派生型です。これは混乱の大きな原因です。というのも、多くの人にとっては、この関係は直感的に逆のように感じるからです: より大きいスコープは小さい方のスコープの*派生型*となる。
23
27
24
28
This does in fact make sense, though. The intuitive reason for this is that if
25
29
you expect an `&'a u8`, then it's totally fine for me to hand you an `&'static
0 commit comments