Skip to content

Commit 81bace7

Browse files
authored
Merge pull request #93 from TAKOYAKING8/fix_scope_lifetime_fn
fix typo of "scope/lifetime/fn"
2 parents a3f286d + 4575c35 commit 81bace7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scope/lifetime/fn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn pass_x<'a, 'b>(x: &'a i32, _: &'b i32) -> &'a i32 { x }
6060
// reference. Then the data is dropped upon exiting the scope, leaving
6161
// a reference to invalid data to be returned.
6262
// `'a`は関数より長くなくてはならないため上の関数は正しくない。
63-
// ここでは、`&7`は`i32`のデータとそれへの参照を作り出す。
63+
// ここでは、`&String::from("foo")`は`String`のデータとそれへの参照を作り出す。
6464
// その後データはスコープを抜けるとともに破棄される。そのため、
6565
// 不適切なデータに対する参照を返すことになってしまう。
6666

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy