File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,17 @@ where shorter-lived things are needed.
159159これは、短く生きるものが必要なときに、より長く生きるものを渡せるようにするために、
160160望ましいものなのです。
161161
162+ <!--
162163Similar reasoning applies to why it should be variant over T. It is reasonable
163164to be able to pass `&&'static str` where an `&&'a str` is expected. The
164165additional level of indirection does not change the desire to be able to pass
165166longer lived things where shorted lived things are expected.
167+ -->
168+
169+ 似た理由が、なぜ ` &'a T ` が ` T ` において変性であるべきかについて適用できます。
170+ ` &&'a str ` が求められている場所で ` &&'static str ` を渡せるようにすることが
171+ 合理的であるからです。間接参照の段階が増えても、短く生きるものが求められている
172+ 場合により長く生きるものを渡せるようにするという願いは変わりません。
166173
167174However this logic doesn't apply to ` &mut ` . To see why ` &mut ` should
168175be invariant over T, consider the following code:
You can’t perform that action at this time.
0 commit comments