We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 028afb3 commit ee02174Copy full SHA for ee02174
src/subtyping.md
@@ -360,14 +360,23 @@ function signature:
360
fn foo(usize) -> &'a str;
361
```
362
363
+<!--
364
This signature claims that it will return something that outlives `'a`. It is
365
therefore completely reasonable to provide
366
+-->
367
+
368
+このシグネチャは、関数が `'a` より長生きする何かを返すと主張しています。
369
+それゆえに、この場所に
370
371
```rust,ignore
372
fn foo(usize) -> &'static str;
373
374
375
376
in its place. Therefore functions are variant over their return type.
377
378
379
+が置かれても全く問題ありません。ゆえに、関数は、そのリターン型において変性なのです。
380
381
`*const` has the exact same semantics as `&`, so variance follows. `*mut` on the
382
other hand can dereference to an `&mut` whether shared or not, so it is marked
0 commit comments