File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -393,16 +393,6 @@ let x: &'static i32 = &FOO;
393
393
<!-- ## Lifetime Elision -->
394
394
## ライフタイムの省略
395
395
396
- <!-- Rust supports powerful local type inference in function bodies, but it’s -->
397
- <!-- forbidden in item signatures to allow reasoning about the types based on -->
398
- <!-- the item signature alone. However, for ergonomic reasons a very restricted -->
399
- <!-- secondary inference algorithm called “lifetime elision” applies in function -->
400
- <!-- signatures. It infers only based on the signature components themselves and not -->
401
- <!-- based on the body of the function, only infers lifetime parameters, and does -->
402
- <!-- this with only three easily memorizable and unambiguous rules. This makes -->
403
- <!-- lifetime elision a shorthand for writing an item signature, while not hiding -->
404
- <!-- away the actual types involved as full local inference would if applied to it. -->
405
-
406
396
<!-- Rust supports powerful local type inference in the bodies of functions but not in their item signatures. -->
407
397
<!-- It's forbidden to allow reasoning about types based on the item signature alone. -->
408
398
<!-- However, for ergonomic reasons, a very restricted secondary inference algorithm called -->
You can’t perform that action at this time.
0 commit comments