Skip to content

Commit b622061

Browse files
committed
---
yaml --- r: 47678 b: refs/heads/incoming c: 9727008 h: refs/heads/master v: v3
1 parent 5407eaf commit b622061

36 files changed

+284
-230
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: 3201c6fe3f39fa4123ae373b1d7d09b68eca772b
9+
refs/heads/incoming: 9727008ed0772fc325e0822e74b429e4e7c09af0
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/rust.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -686,15 +686,15 @@ mod math {
686686
type complex = (f64, f64);
687687
fn sin(f: f64) -> f64 {
688688
...
689-
# die!();
689+
# fail!();
690690
}
691691
fn cos(f: f64) -> f64 {
692692
...
693-
# die!();
693+
# fail!();
694694
}
695695
fn tan(f: f64) -> f64 {
696696
...
697-
# die!();
697+
# fail!();
698698
}
699699
}
700700
~~~~~~~~
@@ -986,7 +986,7 @@ output slot type would normally be. For example:
986986
~~~~
987987
fn my_err(s: &str) -> ! {
988988
log(info, s);
989-
die!();
989+
fail!();
990990
}
991991
~~~~
992992

@@ -1004,7 +1004,7 @@ were declared without the `!` annotation, the following code would not
10041004
typecheck:
10051005

10061006
~~~~
1007-
# fn my_err(s: &str) -> ! { die!() }
1007+
# fn my_err(s: &str) -> ! { fail!() }
10081008
10091009
fn f(i: int) -> int {
10101010
if i == 42 {
@@ -2284,9 +2284,9 @@ enum List<X> { Nil, Cons(X, @List<X>) }
22842284
let x: List<int> = Cons(10, @Cons(11, @Nil));
22852285
22862286
match x {
2287-
Cons(_, @Nil) => die!(~"singleton list"),
2287+
Cons(_, @Nil) => fail!(~"singleton list"),
22882288
Cons(*) => return,
2289-
Nil => die!(~"empty list")
2289+
Nil => fail!(~"empty list")
22902290
}
22912291
~~~~
22922292

@@ -2323,7 +2323,7 @@ match x {
23232323
return;
23242324
}
23252325
_ => {
2326-
die!();
2326+
fail!();
23272327
}
23282328
}
23292329
~~~~
@@ -2411,7 +2411,7 @@ guard may refer to the variables bound within the pattern they follow.
24112411
let message = match maybe_digit {
24122412
Some(x) if x < 10 => process_digit(x),
24132413
Some(x) => process_other(x),
2414-
None => die!()
2414+
None => fail!()
24152415
};
24162416
~~~~
24172417

branches/incoming/doc/tutorial-macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ match x {
218218
// complicated stuff goes here
219219
return result + val;
220220
},
221-
_ => die!(~"Didn't get good_2")
221+
_ => fail!(~"Didn't get good_2")
222222
}
223223
}
224224
_ => return 0 // default value
@@ -260,7 +260,7 @@ macro_rules! biased_match (
260260
biased_match!((x) ~ (good_1(g1, val)) else { return 0 };
261261
binds g1, val )
262262
biased_match!((g1.body) ~ (good_2(result) )
263-
else { die!(~"Didn't get good_2") };
263+
else { fail!(~"Didn't get good_2") };
264264
binds result )
265265
// complicated stuff goes here
266266
return result + val;
@@ -362,7 +362,7 @@ macro_rules! biased_match (
362362
# fn f(x: t1) -> uint {
363363
biased_match!(
364364
(x) ~ (good_1(g1, val)) else { return 0 };
365-
(g1.body) ~ (good_2(result) ) else { die!(~"Didn't get good_2") };
365+
(g1.body) ~ (good_2(result) ) else { fail!(~"Didn't get good_2") };
366366
binds val, result )
367367
// complicated stuff goes here
368368
return result + val;

branches/incoming/doc/tutorial-tasks.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ of all tasks are intertwined: if one fails, so do all the others.
313313
# fn do_some_work() { loop { task::yield() } }
314314
# do task::try {
315315
// Create a child task that fails
316-
do spawn { die!() }
316+
do spawn { fail!() }
317317
318318
// This will also fail because the task we spawned failed
319319
do_some_work();
@@ -337,7 +337,7 @@ let result: Result<int, ()> = do task::try {
337337
if some_condition() {
338338
calculate_result()
339339
} else {
340-
die!(~"oops!");
340+
fail!(~"oops!");
341341
}
342342
};
343343
assert result.is_err();
@@ -370,14 +370,14 @@ proceed). Hence, you will need different _linked failure modes_.
370370
## Failure modes
371371

372372
By default, task failure is _bidirectionally linked_, which means that if
373-
either task dies, it kills the other one.
373+
either task fails, it kills the other one.
374374

375375
~~~
376376
# fn sleep_forever() { loop { task::yield() } }
377377
# do task::try {
378378
do task::spawn {
379379
do task::spawn {
380-
die!(); // All three tasks will die.
380+
fail!(); // All three tasks will fail.
381381
}
382382
sleep_forever(); // Will get woken up by force, then fail
383383
}
@@ -386,7 +386,7 @@ sleep_forever(); // Will get woken up by force, then fail
386386
~~~
387387

388388
If you want parent tasks to be able to kill their children, but do not want a
389-
parent to die automatically if one of its child task dies, you can call
389+
parent to fail automatically if one of its child task fails, you can call
390390
`task::spawn_supervised` for _unidirectionally linked_ failure. The
391391
function `task::try`, which we saw previously, uses `spawn_supervised`
392392
internally, with additional logic to wait for the child task to finish
@@ -432,7 +432,7 @@ do task::spawn_supervised {
432432
// Intermediate task immediately exits
433433
}
434434
wait_for_a_while();
435-
die!(); // Will kill grandchild even if child has already exited
435+
fail!(); // Will kill grandchild even if child has already exited
436436
# };
437437
~~~
438438

@@ -446,10 +446,10 @@ other at all, using `task::spawn_unlinked` for _isolated failure_.
446446
let (time1, time2) = (random(), random());
447447
do task::spawn_unlinked {
448448
sleep_for(time2); // Won't get forced awake
449-
die!();
449+
fail!();
450450
}
451451
sleep_for(time1); // Won't get forced awake
452-
die!();
452+
fail!();
453453
// It will take MAX(time1,time2) for the program to finish.
454454
# };
455455
~~~

branches/incoming/man/rustc.1

Lines changed: 93 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.TH RUSTC "1" "October 2012" "rustc 0.4" "User Commands"
1+
.TH RUSTC "1" "February 2013" "rustc 0.6" "User Commands"
22
.SH NAME
33
rustc \- rust compiler
44
.SH SYNOPSIS
55
.B rustc
6-
[\fIoptions\fR] \fI<input>\fR
6+
[\fIOPTIONS\fR] \fIINPUT\fR
77

88
.SH DESCRIPTION
99
This program is a compiler for the Rust language, available at
@@ -18,88 +18,134 @@ Compile an executable crate (default)
1818
\fB\-c\fR
1919
Compile and assemble, but do not link
2020
.TP
21-
\fB\-\-cfg\fR <cfgspec>
21+
\fB\-\-cfg\fR SPEC
2222
Configure the compilation environment
2323
.TP
2424
\fB\-\-emit\-llvm\fR
2525
Produce an LLVM bitcode file
2626
.TP
27-
\fB\-g\fR
28-
Produce debug info (experimental)
29-
.TP
30-
\fB\-\-gc\fR
31-
Garbage collect shared data (experimental/temporary)
32-
.TP
33-
\fB\-h\fR \fB\-\-help\fR
27+
\fB\-h\fR, \fB\-\-help\fR
3428
Display this message
3529
.TP
36-
\fB\-L\fR <path>
30+
\fB\-L\fR PATH
3731
Add a directory to the library search path
3832
.TP
3933
\fB\-\-lib\fR
4034
Compile a library crate
4135
.TP
4236
\fB\-\-ls\fR
43-
List the symbols defined by a compiled library crate
44-
.TP
45-
\fB\-\-jit\fR
46-
Execute using JIT (experimental)
37+
List the symbols defined by a library crate
4738
.TP
4839
\fB\-\-no\-trans\fR
4940
Run all passes except translation; no output
5041
.TP
5142
\fB\-O\fR
52-
Equivalent to \fB\-\-opt\-level\fR=\fI2\fR
43+
Equivalent to \fI\-\-opt\-level=2\fR
5344
.TP
54-
\fB\-o\fR <filename>
45+
\fB\-o\fR FILENAME
5546
Write output to <filename>
5647
.TP
57-
\fB\-\-opt\-level\fR <lvl>
58-
Optimize with possible levels 0\-3
48+
\fB\-\-opt\-level\fR LEVEL
49+
Optimize with possible levels 0-3
5950
.TP
60-
\fB\-\-out\-dir\fR <dir>
61-
Write output to compiler\-chosen filename in <dir>
51+
\fB\-\-out\-dir\fR DIR
52+
Write output to compiler-chosen filename in <dir>
6253
.TP
6354
\fB\-\-parse\-only\fR
6455
Parse only; do not compile, assemble, or link
6556
.TP
66-
\fB\-\-pretty\fR [type]
67-
Pretty\-print the input instead of compiling;
68-
valid types are: normal (un\-annotated source),
69-
expanded (crates expanded), typed (crates expanded,
70-
with type annotations), or identified (fully
71-
parenthesized, AST nodes and blocks with IDs)
57+
\fB\-\-pretty\fR [TYPE]
58+
Pretty-print the input instead of compiling; valid types are: normal
59+
(un-annotated source), expanded (crates expanded), typed (crates
60+
expanded, with type annotations), or identified (fully parenthesized,
61+
AST nodes and blocks with IDs)
7262
.TP
7363
\fB\-S\fR
7464
Compile only; do not assemble or link
7565
.TP
7666
\fB\-\-save\-temps\fR
77-
Write intermediate files (.bc, .opt.bc, .o)
78-
in addition to normal output
67+
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
7968
.TP
80-
\fB\-\-static\fR
81-
Use or produce static libraries or binaries
82-
(experimental)
83-
.TP
84-
\fB\-\-sysroot\fR <path>
69+
\fB\-\-sysroot\fR PATH
8570
Override the system root
8671
.TP
8772
\fB\-\-test\fR
8873
Build a test harness
8974
.TP
90-
\fB\-\-target\fR <triple>
91-
Target cpu\-manufacturer\-kernel[\-os] to compile for
92-
(default: host triple)
93-
(see http://sources.redhat.com/autobook/autobook/
94-
autobook_17.html for detail)
75+
\fB\-\-target\fR TRIPLE
76+
Target triple cpu-manufacturer-kernel[-os] to compile for (see
77+
http://sources.redhat.com/autobook/autobook/autobook_17.html
78+
for detail)
9579
.TP
96-
\fB\-W help\fR
80+
\fB\-W\fR help
9781
Print 'lint' options and default settings
9882
.TP
99-
\fB\-Z help\fR
100-
Print internal options for debugging rustc
83+
\fB\-W\fR OPT, \fB\-\-warn\fR OPT
84+
Set lint warnings
85+
.TP
86+
\fB\-A\fR OPT, \fB\-\-allow\fR OPT
87+
Set lint allowed
10188
.TP
102-
\fB\-v\fR \fB\-\-version\fR
89+
\fB\-D\fR OPT, \fB\-\-deny\fR OPT
90+
Set lint denied
91+
.TP
92+
\fB\-F\fR OPT, \fB\-\-forbid\fR OPT
93+
Set lint forbidden
94+
.TP
95+
\fB\-Z\fR FLAG
96+
Set internal debugging options. Use "-Z help" to print available options.
97+
98+
Available debug flags are:
99+
.RS
100+
.IP \[bu]
101+
\fBverbose\fR - in general, enable more debug printouts
102+
.IP \[bu]
103+
\fBtime\-passes\fR - measure time of each rustc pass
104+
.IP \[bu]
105+
\fBcount\-llvm\-insns\fR - count where LLVM instrs originate
106+
.IP \[bu]
107+
\fBtime\-llvm\-passes\fR - measure time of each LLVM pass
108+
.IP \[bu]
109+
\fBtrans\-stats\fR - gather trans statistics
110+
.IP \[bu]
111+
\fBno\-asm\-comments\fR - omit comments when using \fI\-S\fR
112+
.IP \[bu]
113+
\fBno\-verify\fR - skip LLVM verification
114+
.IP \[bu]
115+
\fBtrace\fR - emit trace logs
116+
.IP \[bu]
117+
\fBcoherence\fR - perform coherence checking
118+
.IP \[bu]
119+
\fBborrowck\-stats\fR - gather borrowck statistics
120+
.IP \[bu]
121+
\fBborrowck\-note\-pure\fR - note where purity is req'd
122+
.IP \[bu]
123+
\fBborrowck\-note\-loan\fR - note where loans are req'd
124+
.IP \[bu]
125+
\fBno\-landing\-pads\fR - omit landing pads for unwinding
126+
.IP \[bu]
127+
\fBdebug\-llvm\fR - enable debug output from LLVM
128+
.IP \[bu]
129+
\fBcount\-type\-sizes\fR - count the sizes of aggregate types
130+
.IP \[bu]
131+
\fBmeta\-stats\fR - gather metadata statistics
132+
.IP \[bu]
133+
\fBno\-opt\fR - do not optimize, even if \fI\-O\fR is passed
134+
.IP \[bu]
135+
\fBno\-monomorphic\-collapse\fR - do not collapse template instantiations
136+
.IP \[bu]
137+
\fBgc\fR - Garbage collect shared data (experimental)
138+
.IP \[bu]
139+
\fBjit\fR - Execute using JIT (experimental)
140+
.IP \[bu]
141+
\fBextra\-debug\-info\fR - Extra debugging info (experimental)
142+
.IP \[bu]
143+
\fBdebug\-info\fR - Produce debug info (experimental)
144+
.IP \[bu]
145+
\fBstatic\fR - Use or produce static libraries or binaries (experimental)
146+
.RE
147+
.TP
148+
\fB\-v\fR, \fB\-\-version\fR
103149
Print version info and exit
104150

105151
.SH "EXAMPLES"
@@ -112,6 +158,10 @@ To build a library from a source file:
112158
To build either with a crate (.rc) file:
113159
$ rustc hello.rc
114160

161+
To build an executable with debug info (experimental):
162+
$ rustc -Z debug-info -o hello hello.rs
163+
164+
115165
.SH "BUGS"
116166
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
117167

0 commit comments

Comments
 (0)