Skip to content

Commit 368870c

Browse files
committed
---
yaml --- r: 47666 b: refs/heads/incoming c: e87e4eb h: refs/heads/master v: v3
1 parent 2a69c55 commit 368870c

31 files changed

+749
-883
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: bd93a36d73a005de23b9f9137f16ee90b3daecf4
9+
refs/heads/incoming: e87e4eb0cb991b69b0ce28f22433febf78423e26
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

branches/incoming/src/libcore/num/f32.rs

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use cmath;
1414
use cmp;
1515
use libc::{c_float, c_int};
1616
use num::NumCast;
17-
use num::strconv;
1817
use num;
1918
use ops;
2019
use option::Option;
@@ -377,8 +376,8 @@ impl num::Round for f32 {
377376
*/
378377
#[inline(always)]
379378
pub pure fn to_str(num: f32) -> ~str {
380-
let (r, _) = strconv::to_str_common(
381-
&num, 10u, true, strconv::SignNeg, strconv::DigAll);
379+
let (r, _) = num::to_str_common(
380+
&num, 10u, true, true, num::SignNeg, num::DigAll);
382381
r
383382
}
384383

@@ -391,8 +390,8 @@ pub pure fn to_str(num: f32) -> ~str {
391390
*/
392391
#[inline(always)]
393392
pub pure fn to_str_hex(num: f32) -> ~str {
394-
let (r, _) = strconv::to_str_common(
395-
&num, 16u, true, strconv::SignNeg, strconv::DigAll);
393+
let (r, _) = num::to_str_common(
394+
&num, 16u, true, true, num::SignNeg, num::DigAll);
396395
r
397396
}
398397

@@ -412,8 +411,8 @@ pub pure fn to_str_hex(num: f32) -> ~str {
412411
*/
413412
#[inline(always)]
414413
pub pure fn to_str_radix(num: f32, rdx: uint) -> ~str {
415-
let (r, special) = strconv::to_str_common(
416-
&num, rdx, true, strconv::SignNeg, strconv::DigAll);
414+
let (r, special) = num::to_str_common(
415+
&num, rdx, true, true, num::SignNeg, num::DigAll);
417416
if special { fail!(~"number has a special value, \
418417
try to_str_radix_special() if those are expected") }
419418
r
@@ -430,8 +429,7 @@ pub pure fn to_str_radix(num: f32, rdx: uint) -> ~str {
430429
*/
431430
#[inline(always)]
432431
pub pure fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
433-
strconv::to_str_common(&num, rdx, true,
434-
strconv::SignNeg, strconv::DigAll)
432+
num::to_str_common(&num, rdx, true, true, num::SignNeg, num::DigAll)
435433
}
436434

437435
/**
@@ -445,8 +443,8 @@ pub pure fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
445443
*/
446444
#[inline(always)]
447445
pub pure fn to_str_exact(num: f32, dig: uint) -> ~str {
448-
let (r, _) = strconv::to_str_common(
449-
&num, 10u, true, strconv::SignNeg, strconv::DigExact(dig));
446+
let (r, _) = num::to_str_common(
447+
&num, 10u, true, true, num::SignNeg, num::DigExact(dig));
450448
r
451449
}
452450

@@ -461,8 +459,8 @@ pub pure fn to_str_exact(num: f32, dig: uint) -> ~str {
461459
*/
462460
#[inline(always)]
463461
pub pure fn to_str_digits(num: f32, dig: uint) -> ~str {
464-
let (r, _) = strconv::to_str_common(
465-
&num, 10u, true, strconv::SignNeg, strconv::DigMax(dig));
462+
let (r, _) = num::to_str_common(
463+
&num, 10u, true, true, num::SignNeg, num::DigMax(dig));
466464
r
467465
}
468466

@@ -507,8 +505,7 @@ impl num::ToStrRadix for f32 {
507505
*/
508506
#[inline(always)]
509507
pub pure fn from_str(num: &str) -> Option<f32> {
510-
strconv::from_str_common(num, 10u, true, true, true,
511-
strconv::ExpDec, false)
508+
num::from_str_common(num, 10u, true, true, true, num::ExpDec, false)
512509
}
513510

514511
/**
@@ -540,8 +537,7 @@ pub pure fn from_str(num: &str) -> Option<f32> {
540537
*/
541538
#[inline(always)]
542539
pub pure fn from_str_hex(num: &str) -> Option<f32> {
543-
strconv::from_str_common(num, 16u, true, true, true,
544-
strconv::ExpBin, false)
540+
num::from_str_common(num, 16u, true, true, true, num::ExpBin, false)
545541
}
546542

547543
/**
@@ -565,8 +561,7 @@ pub pure fn from_str_hex(num: &str) -> Option<f32> {
565561
*/
566562
#[inline(always)]
567563
pub pure fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
568-
strconv::from_str_common(num, rdx, true, true, false,
569-
strconv::ExpNone, false)
564+
num::from_str_common(num, rdx, true, true, false, num::ExpNone, false)
570565
}
571566

572567
impl from_str::FromStr for f32 {

0 commit comments

Comments
 (0)