Skip to content

Commit 556ddc7

Browse files
committed
---
yaml --- r: 44475 b: refs/heads/master c: df36a8d h: refs/heads/master i: 44473: 383c4ed 44471: 275b83f v: v3
1 parent e9c52fd commit 556ddc7

31 files changed

+888
-749
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e87e4eb0cb991b69b0ce28f22433febf78423e26
2+
refs/heads/master: df36a8dfc98af7e78b416ca1faab3c214be29fab
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
55
refs/heads/try: ef355f6332f83371e4acf04fc4eb940ab41d78d3

trunk/man/rustc.1

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

88
.SH DESCRIPTION
99
This program is a compiler for the Rust language, available at
@@ -18,134 +18,88 @@ Compile an executable crate (default)
1818
\fB\-c\fR
1919
Compile and assemble, but do not link
2020
.TP
21-
\fB\-\-cfg\fR SPEC
21+
\fB\-\-cfg\fR <cfgspec>
2222
Configure the compilation environment
2323
.TP
2424
\fB\-\-emit\-llvm\fR
2525
Produce an LLVM bitcode file
2626
.TP
27-
\fB\-h\fR, \fB\-\-help\fR
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
2834
Display this message
2935
.TP
30-
\fB\-L\fR PATH
36+
\fB\-L\fR <path>
3137
Add a directory to the library search path
3238
.TP
3339
\fB\-\-lib\fR
3440
Compile a library crate
3541
.TP
3642
\fB\-\-ls\fR
37-
List the symbols defined by a library crate
43+
List the symbols defined by a compiled library crate
44+
.TP
45+
\fB\-\-jit\fR
46+
Execute using JIT (experimental)
3847
.TP
3948
\fB\-\-no\-trans\fR
4049
Run all passes except translation; no output
4150
.TP
4251
\fB\-O\fR
43-
Equivalent to \fI\-\-opt\-level=2\fR
52+
Equivalent to \fB\-\-opt\-level\fR=\fI2\fR
4453
.TP
45-
\fB\-o\fR FILENAME
54+
\fB\-o\fR <filename>
4655
Write output to <filename>
4756
.TP
48-
\fB\-\-opt\-level\fR LEVEL
49-
Optimize with possible levels 0-3
57+
\fB\-\-opt\-level\fR <lvl>
58+
Optimize with possible levels 0\-3
5059
.TP
51-
\fB\-\-out\-dir\fR DIR
52-
Write output to compiler-chosen filename in <dir>
60+
\fB\-\-out\-dir\fR <dir>
61+
Write output to compiler\-chosen filename in <dir>
5362
.TP
5463
\fB\-\-parse\-only\fR
5564
Parse only; do not compile, assemble, or link
5665
.TP
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)
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)
6272
.TP
6373
\fB\-S\fR
6474
Compile only; do not assemble or link
6575
.TP
6676
\fB\-\-save\-temps\fR
67-
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
77+
Write intermediate files (.bc, .opt.bc, .o)
78+
in addition to normal output
6879
.TP
69-
\fB\-\-sysroot\fR PATH
80+
\fB\-\-static\fR
81+
Use or produce static libraries or binaries
82+
(experimental)
83+
.TP
84+
\fB\-\-sysroot\fR <path>
7085
Override the system root
7186
.TP
7287
\fB\-\-test\fR
7388
Build a test harness
7489
.TP
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)
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)
7995
.TP
80-
\fB\-W\fR help
96+
\fB\-W help\fR
8197
Print 'lint' options and default settings
8298
.TP
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
99+
\fB\-Z help\fR
100+
Print internal options for debugging rustc
88101
.TP
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
102+
\fB\-v\fR \fB\-\-version\fR
149103
Print version info and exit
150104

151105
.SH "EXAMPLES"
@@ -158,10 +112,6 @@ To build a library from a source file:
158112
To build either with a crate (.rc) file:
159113
$ rustc hello.rc
160114

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

trunk/src/libcore/num/f32.rs

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

@@ -390,8 +391,8 @@ pub pure fn to_str(num: f32) -> ~str {
390391
*/
391392
#[inline(always)]
392393
pub pure fn to_str_hex(num: f32) -> ~str {
393-
let (r, _) = num::to_str_common(
394-
&num, 16u, true, true, num::SignNeg, num::DigAll);
394+
let (r, _) = strconv::to_str_common(
395+
&num, 16u, true, strconv::SignNeg, strconv::DigAll);
395396
r
396397
}
397398

@@ -411,8 +412,8 @@ pub pure fn to_str_hex(num: f32) -> ~str {
411412
*/
412413
#[inline(always)]
413414
pub pure fn to_str_radix(num: f32, rdx: uint) -> ~str {
414-
let (r, special) = num::to_str_common(
415-
&num, rdx, true, true, num::SignNeg, num::DigAll);
415+
let (r, special) = strconv::to_str_common(
416+
&num, rdx, true, strconv::SignNeg, strconv::DigAll);
416417
if special { fail!(~"number has a special value, \
417418
try to_str_radix_special() if those are expected") }
418419
r
@@ -429,7 +430,8 @@ pub pure fn to_str_radix(num: f32, rdx: uint) -> ~str {
429430
*/
430431
#[inline(always)]
431432
pub pure fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
432-
num::to_str_common(&num, rdx, true, true, num::SignNeg, num::DigAll)
433+
strconv::to_str_common(&num, rdx, true,
434+
strconv::SignNeg, strconv::DigAll)
433435
}
434436

435437
/**
@@ -443,8 +445,8 @@ pub pure fn to_str_radix_special(num: f32, rdx: uint) -> (~str, bool) {
443445
*/
444446
#[inline(always)]
445447
pub pure fn to_str_exact(num: f32, dig: uint) -> ~str {
446-
let (r, _) = num::to_str_common(
447-
&num, 10u, true, true, num::SignNeg, num::DigExact(dig));
448+
let (r, _) = strconv::to_str_common(
449+
&num, 10u, true, strconv::SignNeg, strconv::DigExact(dig));
448450
r
449451
}
450452

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

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

511514
/**
@@ -537,7 +540,8 @@ pub pure fn from_str(num: &str) -> Option<f32> {
537540
*/
538541
#[inline(always)]
539542
pub pure fn from_str_hex(num: &str) -> Option<f32> {
540-
num::from_str_common(num, 16u, true, true, true, num::ExpBin, false)
543+
strconv::from_str_common(num, 16u, true, true, true,
544+
strconv::ExpBin, false)
541545
}
542546

543547
/**
@@ -561,7 +565,8 @@ pub pure fn from_str_hex(num: &str) -> Option<f32> {
561565
*/
562566
#[inline(always)]
563567
pub pure fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
564-
num::from_str_common(num, rdx, true, true, false, num::ExpNone, false)
568+
strconv::from_str_common(num, rdx, true, true, false,
569+
strconv::ExpNone, false)
565570
}
566571

567572
impl from_str::FromStr for f32 {

0 commit comments

Comments
 (0)