Skip to content

Commit 3fe3e99

Browse files
committed
---
yaml --- r: 94091 b: refs/heads/try c: 7304326 h: refs/heads/master i: 94089: e0da402 94087: 5f64e10 v: v3
1 parent 7b607bf commit 3fe3e99

File tree

888 files changed

+16903
-20891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

888 files changed

+16903
-20891
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: ad6f6cb589f1b796598fcb0f1b95d71956d5e6a5
5+
refs/heads/try: 7304326ff91b6ad2d43e9a6fc4cc4a2c5ecf94c0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/Makefile.in

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,6 @@ ifndef DEBUG_BORROWS
130130
RUSTFLAGS_STAGE2 += -Z no-debug-borrows
131131
endif
132132

133-
# The executables crated during this compilation process have no need to include
134-
# static copies of libstd and libextra. We also generate dynamic versions of all
135-
# libraries, so in the interest of space, prefer dynamic linking throughout the
136-
# compilation process.
137-
RUSTFLAGS_STAGE0 += -Z prefer-dynamic
138-
RUSTFLAGS_STAGE1 += -Z prefer-dynamic
139-
RUSTFLAGS_STAGE2 += -Z prefer-dynamic
140-
RUSTFLAGS_STAGE3 += -Z prefer-dynamic
141-
142133
# platform-specific auto-configuration
143134
include $(CFG_SRC_DIR)mk/platform.mk
144135

@@ -223,7 +214,7 @@ GENERATED :=
223214

224215
define DEF_LIBS
225216

226-
CFG_RUNTIME_$(1) :=$(call CFG_STATIC_LIB_NAME_$(1),rustrt)
217+
CFG_RUNTIME_$(1) :=$(call CFG_LIB_NAME_$(1),rustrt)
227218
CFG_RUSTLLVM_$(1) :=$(call CFG_LIB_NAME_$(1),rustllvm)
228219
CFG_STDLIB_$(1) :=$(call CFG_LIB_NAME_$(1),std)
229220
CFG_EXTRALIB_$(1) :=$(call CFG_LIB_NAME_$(1),extra)
@@ -248,10 +239,6 @@ LIBRUSTPKG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustpkg)
248239
LIBRUSTDOC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc)
249240
LIBRUSTUV_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustuv)
250241

251-
EXTRALIB_RGLOB_$(1) :=$(call CFG_RLIB_GLOB,extra)
252-
STDLIB_RGLOB_$(1) :=$(call CFG_RLIB_GLOB,std)
253-
LIBRUSTUV_RGLOB_$(1) :=$(call CFG_RLIB_GLOB,rustuv)
254-
255242
endef
256243

257244
# $(1) is the path for directory to match against
@@ -405,25 +392,42 @@ TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
405392
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/$$(CFG_LIBDIR)
406393

407394
# The name of the standard and extra libraries used by rustc
408-
HSTDLIB_DEFAULT$(1)_H_$(3) = \
409-
$$(HLIB$(1)_H_$(3))/$(CFG_STDLIB_$(3))
410-
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
411-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
412-
413-
HEXTRALIB_DEFAULT$(1)_H_$(3) = \
414-
$$(HLIB$(1)_H_$(3))/$(CFG_EXTRALIB_$(3))
415-
TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
416-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))
417-
418-
HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
419-
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC_$(3))
420-
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
421-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2))
422-
423-
HLIBRUSTUV_DEFAULT$(1)_H_$(3) = \
424-
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(3))
425-
TLIBRUSTUV_DEFAULT$(1)_T_$(2)_H_$(3) = \
426-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTUV_$(2))
395+
ifdef CFG_DISABLE_SHAREDSTD
396+
HSTDLIB_DEFAULT$(1)_H_$(3) = \
397+
$$(HLIB$(1)_H_$(3))/libstd.rlib
398+
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
399+
$$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib
400+
401+
HEXTRALIB_DEFAULT$(1)_H_$(3) = \
402+
$$(HLIB$(1)_H_$(3))/libextra.rlib
403+
TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
404+
$$(TLIB$(1)_T_$(2)_H_$(3))/libextra.rlib
405+
406+
HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
407+
$$(HLIB$(1)_H_$(3))/librustc.rlib
408+
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
409+
$$(TLIB$(1)_T_$(2)_H_$(3))/librustc.rlib
410+
else
411+
HSTDLIB_DEFAULT$(1)_H_$(3) = \
412+
$$(HLIB$(1)_H_$(3))/$(CFG_STDLIB_$(3))
413+
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
414+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
415+
416+
HEXTRALIB_DEFAULT$(1)_H_$(3) = \
417+
$$(HLIB$(1)_H_$(3))/$(CFG_EXTRALIB_$(3))
418+
TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
419+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))
420+
421+
HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
422+
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC_$(3))
423+
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
424+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2))
425+
426+
HLIBRUSTUV_DEFAULT$(1)_H_$(3) = \
427+
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(3))
428+
TLIBRUSTUV_DEFAULT$(1)_T_$(2)_H_$(3) = \
429+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTUV_$(2))
430+
endif
427431

428432
# Preqrequisites for using the stageN compiler
429433
HSREQ$(1)_H_$(3) = \

branches/try/configure

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ fi
364364
BOOL_OPTIONS=""
365365
VAL_OPTIONS=""
366366

367+
opt sharedstd 1 "build libstd as a shared library"
367368
opt valgrind 0 "run tests with valgrind (memcheck by default)"
368369
opt helgrind 0 "run tests with helgrind instead of memcheck"
369370
opt docs 1 "build documentation"
@@ -397,7 +398,7 @@ valopt sysconfdir "/etc" "install system configuration files"
397398
valopt datadir "${CFG_PREFIX}/share" "install data"
398399
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
399400
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
400-
valopt libdir "${CFG_PREFIX}/lib" "install libraries"
401+
valopt libdir "${CFG_PREFIX}/lib" "install libraries"
401402

402403
# Validate Options
403404
step_msg "validating $CFG_SELF args"
@@ -519,20 +520,14 @@ then
519520
fi
520521
fi
521522

522-
BIN_SUF=
523-
if [ $CFG_OSTYPE = "pc-mingw32" ]
524-
then
525-
BIN_SUF=.exe
526-
fi
527-
528523
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
529524
then
530-
if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
525+
if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc ]
531526
then
532527
err "no local rust to use"
533528
else
534-
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} --version`
535-
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
529+
LRV=`${CFG_LOCAL_RUST_ROOT}/bin/rustc --version`
530+
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: " $LRV
536531
fi
537532
fi
538533

@@ -607,7 +602,7 @@ CFG_PREFIX=${CFG_PREFIX%/}
607602
CFG_MANDIR=${CFG_MANDIR%/}
608603
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
609604
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
610-
CFG_SUPPORTED_TARGET="$(grep ^CC_*=* ${CFG_SRC_DIR}mk/platform.mk | sed -e 's/^CC_//' -e 's/\([^=]*\).*/\1/' | xargs)"
605+
CFG_SUPPORTED_TARGET="$(grep ^CC_*=* $CFG_SRC_DIR/mk/platform.mk | sed -e 's/^CC_//' -e 's/\([^=]*\).*/\1/' | xargs)"
611606

612607
# copy host-triples to target-triples so that hosts are a subset of targets
613608
V_TEMP=""
@@ -877,13 +872,6 @@ do
877872
# Try to have LLVM pull in as few dependencies as possible (#9397)
878873
LLVM_OPTS="$LLVM_OPTS --disable-zlib --disable-libffi"
879874

880-
# pthreads works badly on mingw-w64 systems: #8996
881-
case "$CFG_BUILD" in
882-
(*w64-mingw32)
883-
LLVM_OPTS="$LLVM_OPTS --disable-pthreads"
884-
;;
885-
esac
886-
887875
case "$CFG_C_COMPILER" in
888876
("ccache clang")
889877
LLVM_CXX_32="ccache clang++ -m32 -Qunused-arguments"
@@ -893,11 +881,11 @@ do
893881
LLVM_CC_64="ccache clang -Qunused-arguments"
894882
;;
895883
("clang")
896-
LLVM_CXX_32="clang++ -m32 -Qunused-arguments"
897-
LLVM_CC_32="clang -m32 -Qunused-arguments"
884+
LLVM_CXX_32="clang++ -m32"
885+
LLVM_CC_32="clang -m32"
898886

899-
LLVM_CXX_64="clang++ -Qunused-arguments"
900-
LLVM_CC_64="clang -Qunused-arguments"
887+
LLVM_CXX_64="clang++"
888+
LLVM_CC_64="clang"
901889
;;
902890
("ccache gcc")
903891
LLVM_CXX_32="ccache g++ -m32"

branches/try/doc/po/ja/rust.md.po

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,10 +1817,10 @@ msgstr ""
18171817
#, no-wrap
18181818
msgid ""
18191819
"~~~~ {.xfail-test}\n"
1820-
"fn iter<T>(seq: &[T], f: |T|) {\n"
1820+
"fn iter<T>(seq: &[T], f: &fn(T)) {\n"
18211821
" for elt in seq.iter() { f(elt); }\n"
18221822
"}\n"
1823-
"fn map<T, U>(seq: &[T], f: |T| -> U) -> ~[U] {\n"
1823+
"fn map<T, U>(seq: &[T], f: &fn(T) -> U) -> ~[U] {\n"
18241824
" let mut acc = ~[];\n"
18251825
" for elt in seq.iter() { acc.push(f(elt)); }\n"
18261826
" acc\n"
@@ -2404,7 +2404,7 @@ msgid ""
24042404
"trait Seq<T> {\n"
24052405
" fn len(&self) -> uint;\n"
24062406
" fn elt_at(&self, n: uint) -> T;\n"
2407-
" fn iter(&self, |T|);\n"
2407+
" fn iter(&self, &fn(T));\n"
24082408
"}\n"
24092409
"~~~~\n"
24102410
msgstr ""
@@ -4243,7 +4243,7 @@ msgid ""
42434243
"[function definitions](#functions) do not. The exact type of capture "
42444244
"depends on the [function type](#function-types) inferred for the lambda "
42454245
"expression. In the simplest and least-expensive form (analogous to a "
4246-
"```|| { }``` expression), the lambda expression captures its environment "
4246+
"```&fn() { }``` expression), the lambda expression captures its environment "
42474247
"by reference, effectively borrowing pointers to all outer variables "
42484248
"mentioned inside the function. Alternately, the compiler may infer that a "
42494249
"lambda expression should copy or move values (depending on their type.) "
@@ -4262,7 +4262,7 @@ msgstr ""
42624262
#, no-wrap
42634263
msgid ""
42644264
"~~~~\n"
4265-
"fn ten_times(f: |int|) {\n"
4265+
"fn ten_times(f: &fn(int)) {\n"
42664266
" let mut i = 0;\n"
42674267
" while i < 10 {\n"
42684268
" f(i);\n"
@@ -4455,7 +4455,7 @@ msgstr ""
44554455

44564456
#. type: Plain text
44574457
#: doc/rust.md:2339
4458-
msgid "~~~~ # fn f(f: |int|) { } # fn g(i: int) { }"
4458+
msgid "~~~~ # fn f(f: &fn(int)) { } # fn g(i: int) { }"
44594459
msgstr ""
44604460

44614461
#. type: Plain text
@@ -4481,7 +4481,7 @@ msgstr ""
44814481

44824482
#. type: Plain text
44834483
#: doc/rust.md:2352
4484-
msgid "~~~~ # fn k(x:int, f: |int|) { } # fn l(i: int) { }"
4484+
msgid "~~~~ # fn k(x:int, f: &fn(int)) { } # fn l(i: int) { }"
44854485
msgstr ""
44864486

44874487
#. type: Plain text
@@ -5383,7 +5383,7 @@ msgstr ""
53835383
#. type: Plain text
53845384
#: doc/rust.md:2849
53855385
msgid ""
5386-
"type Binop<'self> = 'self |int,int| -> int; let bo: Binop = add; x = "
5386+
"type Binop<'self> = &'self fn(int,int) -> int; let bo: Binop = add; x = "
53875387
"bo(5,7); ~~~~~~~~"
53885388
msgstr ""
53895389

@@ -5483,7 +5483,7 @@ msgstr ""
54835483
#, no-wrap
54845484
msgid ""
54855485
"~~~~~~~\n"
5486-
"fn map<A: Clone, B: Clone>(f: |A| -> B, xs: &[A]) -> ~[B] {\n"
5486+
"fn map<A: Clone, B: Clone>(f: &fn(A) -> B, xs: &[A]) -> ~[B] {\n"
54875487
" if xs.len() == 0 {\n"
54885488
" return ~[];\n"
54895489
" }\n"

branches/try/doc/po/ja/tutorial-tasks.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ msgstr ""
213213
#. type: Plain text
214214
#: doc/tutorial-tasks.md:102
215215
msgid ""
216-
"The `spawn` function has a very simple type signature: `fn spawn(f: proc())`. "
216+
"The `spawn` function has a very simple type signature: `fn spawn(f: ~fn())`. "
217217
"Because it accepts only owned closures, and owned closures contain only "
218218
"owned data, `spawn` can safely move the entire closure and all its "
219219
"associated state into an entirely different task for execution. Like any "

branches/try/doc/po/ja/tutorial.md.po

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3340,10 +3340,10 @@ msgstr ""
33403340

33413341
#. type: Plain text
33423342
#: doc/tutorial.md:1434
3343-
msgid "~~~~ fn call_closure_with_ten(b: |int|) { b(10); }"
3343+
msgid "~~~~ fn call_closure_with_ten(b: &fn(int)) { b(10); }"
33443344
msgstr ""
33453345
"~~~~\n"
3346-
"fn call_closure_with_ten(b: |int|) { b(10); }"
3346+
"fn call_closure_with_ten(b: &fn(int)) { b(10); }"
33473347

33483348
#. type: Plain text
33493349
#: doc/tutorial.md:1437
@@ -3400,11 +3400,11 @@ msgstr ""
34003400
#: doc/tutorial.md:1459
34013401
msgid ""
34023402
"There are several forms of closure, each with its own role. The most common, "
3403-
"called a _stack closure_, has type `||` and can directly access local "
3403+
"called a _stack closure_, has type `&fn` and can directly access local "
34043404
"variables in the enclosing scope."
34053405
msgstr ""
34063406
"クロージャにはいくつかの形態があり、それぞれに独自の役割があります。最も一般"
3407-
"的なのはスタッククロージャと呼ばれるもので、 `||` という型を持ち、外側のロー"
3407+
"的なのはスタッククロージャと呼ばれるもので、 `&fn` という型を持ち、外側のロー"
34083408
"カル変数に直接アクセスすることができます。"
34093409

34103410
#. type: Plain text
@@ -3509,13 +3509,13 @@ msgstr "## 所有クロージャ"
35093509
#. type: Plain text
35103510
#: doc/tutorial.md:1510
35113511
msgid ""
3512-
"Owned closures, written `proc`, hold on to "
3512+
"Owned closures, written `~fn` in analogy to the `~` pointer type, hold on to "
35133513
"things that can safely be sent between processes. They copy the values they "
35143514
"close over, much like managed closures, but they also own them: that is, no "
35153515
"other code can access them. Owned closures are used in concurrent code, "
35163516
"particularly for spawning [tasks][tasks]."
35173517
msgstr ""
3518-
"`~` `proc` で書き表される所有クロージャは安全にプロセス"
3518+
"`~` ポインタ型と同様に `~fn` 型 で書き表される所有クロージャは安全にプロセス"
35193519
"間で送信することができます。所有クローじゃはマネージドクロージャと全く同じよ"
35203520
"うに閉じ込める値をコピーしますが、値を所有します。つまり、他のコードは閉じ込"
35213521
"められた値にアクセスできなくなります。所有クロージャは並列プログラム、特に "
@@ -3531,27 +3531,27 @@ msgstr "## クロージャの互換性"
35313531
msgid ""
35323532
"Rust closures have a convenient subtyping property: you can pass any kind of "
35333533
"closure (as long as the arguments and return types match) to functions that "
3534-
"expect a `||`. Thus, when writing a higher-order function that only calls "
3534+
"expect a `&fn()`. Thus, when writing a higher-order function that only calls "
35353535
"its function argument, and does nothing else with it, you should almost "
3536-
"always declare the type of that argument as `||`. That way, callers may "
3536+
"always declare the type of that argument as `&fn()`. That way, callers may "
35373537
"pass any kind of closure."
35383538
msgstr ""
35393539
"Rust のクロージャは型の派生 (subtyping) という便利な性質を持っています。この"
3540-
"性質により、`||` 型を期待する関数には (引数と戻り値の型が一致する限り) 任"
3540+
"性質により、`&fn()` 型を期待する関数には (引数と戻り値の型が一致する限り) 任"
35413541
"意の種類のクロージャを渡すことができます。したがって、引数で渡された関数につ"
35423542
"いては呼び出すだけで他に何もしない高階関数を書くときには、ほぼすべてのケース"
3543-
"で引数の型を `||` と宣言するべきです。そうすることで、呼び出し元は任意の種類"
3543+
"で引数の型を `&fn` と宣言するべきです。そうすることで、呼び出し元は任意の種類"
35443544
"のクロージャを渡すことができるよになります。"
35453545

35463546
#. type: Plain text
35473547
#: doc/tutorial.md:1527
35483548
msgid ""
3549-
"~~~~ fn call_twice(f: ||) { f(); f(); } let closure = || { \"I'm a "
3549+
"~~~~ fn call_twice(f: &fn()) { f(); f(); } let closure = || { \"I'm a "
35503550
"closure, and it doesn't matter what type I am\"; }; fn function() { \"I'm a "
35513551
"normal function\"; } call_twice(closure); call_twice(function); ~~~~"
35523552
msgstr ""
35533553
"~~~~\n"
3554-
"fn call_twice(f: ||) { f(); f(); }\n"
3554+
"fn call_twice(f: &fn()) { f(); f(); }\n"
35553555
"let closure = || { \"I'm a closure, and it doesn't matter what type I am"
35563556
"\"; };\n"
35573557
"fn function() { \"I'm a normal function\"; }\n"
@@ -3598,7 +3598,7 @@ msgstr ""
35983598
#, no-wrap
35993599
msgid ""
36003600
"~~~~\n"
3601-
"fn each(v: &[int], op: |v: &int|) {\n"
3601+
"fn each(v: &[int], op: &fn(v: &int)) {\n"
36023602
" let mut n = 0;\n"
36033603
" while n < v.len() {\n"
36043604
" op(&v[n]);\n"
@@ -3622,7 +3622,7 @@ msgstr ""
36223622
#, no-wrap
36233623
msgid ""
36243624
"~~~~\n"
3625-
"# fn each(v: &[int], op: |v: &int|) { }\n"
3625+
"# fn each(v: &[int], op: &fn(v: &int)) { }\n"
36263626
"# fn do_some_work(i: &int) { }\n"
36273627
"each([1, 2, 3], |n| {\n"
36283628
" do_some_work(n);\n"
@@ -3644,7 +3644,7 @@ msgstr ""
36443644
#, no-wrap
36453645
msgid ""
36463646
"~~~~\n"
3647-
"# fn each(v: &[int], op: |v: &int|) { }\n"
3647+
"# fn each(v: &[int], op: &fn(v: &int)) { }\n"
36483648
"# fn do_some_work(i: &int) { }\n"
36493649
"do each([1, 2, 3]) |n| {\n"
36503650
" do_some_work(n);\n"
@@ -3666,11 +3666,11 @@ msgstr ""
36663666
#: doc/tutorial.md:1582
36673667
msgid ""
36683668
"`do` is a convenient way to create tasks with the `task::spawn` function. "
3669-
"`spawn` has the signature `spawn(fn: proc())`. In other words, it is a "
3669+
"`spawn` has the signature `spawn(fn: ~fn())`. In other words, it is a "
36703670
"function that takes an owned closure that takes no arguments."
36713671
msgstr ""
36723672
"`task::spawn` 関数を用いてタスクを生成する場合、 `do` を用いると便利です。"
3673-
"`spawn` は、 `spawn(fn: proc())` という方を持っています。言い換えると、"
3673+
"`spawn` は、 `spawn(fn: ~fn())` という方を持っています。言い換えると、"
36743674
"`spawn` は「引数をとらない所有クロージャ」を引数としてとる関数ということで"
36753675
"す。"
36763676

@@ -4011,7 +4011,7 @@ msgstr ""
40114011
#, no-wrap
40124012
msgid ""
40134013
"~~~~\n"
4014-
"fn map<T, U>(vector: &[T], function: |v: &T| -> U) -> ~[U] {\n"
4014+
"fn map<T, U>(vector: &[T], function: &fn(v: &T) -> U) -> ~[U] {\n"
40154015
" let mut accumulator = ~[];\n"
40164016
" for element in vector.iter() {\n"
40174017
" accumulator.push(function(element));\n"

0 commit comments

Comments
 (0)