From 194d3786a7a03fa516057e446fc87cbb213d39d5 Mon Sep 17 00:00:00 2001 From: Kevin Cantu Date: Wed, 10 Oct 2012 15:29:01 -0700 Subject: [PATCH 1/3] A simple update to the manpage based on the usage message --- man/rustc.1 | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/man/rustc.1 b/man/rustc.1 index f5888015944a5..0e0bfe0f108c3 100644 --- a/man/rustc.1 +++ b/man/rustc.1 @@ -1,4 +1,4 @@ -.TH RUSTC "1" "July 2012" "rustc 0.3" "User Commands" +.TH RUSTC "1" "October 2012" "rustc 0.4" "User Commands" .SH NAME rustc \- rust compiler .SH SYNOPSIS @@ -42,6 +42,9 @@ Compile a library crate \fB\-\-ls\fR List the symbols defined by a compiled library crate .TP +\fB\-\-jit\fR +Execute using JIT (experimental) +.TP \fB\-\-no\-trans\fR Run all passes except translation; no output .TP @@ -62,9 +65,9 @@ Parse only; do not compile, assemble, or link .TP \fB\-\-pretty\fR [type] Pretty\-print the input instead of compiling; -valid types are: \fBnormal\fR (un\-annotated source), -\fBexpanded\fR (crates expanded), \fBtyped\fR (crates expanded, -with type annotations), or \fBidentified\fR (fully +valid types are: normal (un\-annotated source), +expanded (crates expanded), typed (crates expanded, +with type annotations), or identified (fully parenthesized, AST nodes and blocks with IDs) .TP \fB\-S\fR @@ -75,7 +78,8 @@ Write intermediate files (.bc, .opt.bc, .o) in addition to normal output .TP \fB\-\-static\fR -Use or produce static libraries or binaries (experimental) +Use or produce static libraries or binaries +(experimental) .TP \fB\-\-sysroot\fR Override the system root @@ -84,21 +88,25 @@ Override the system root Build a test harness .TP \fB\-\-target\fR -Target cpu\-manufacturer\-kernel[\-os] to compile for (default: host triple) -(see <\fBhttp://sources.redhat.com/autobook/autobook/autobook_17.html\fR> for -detail) +Target cpu\-manufacturer\-kernel[\-os] to compile for +(default: host triple) +(see http://sources.redhat.com/autobook/autobook/ +autobook_17.html for detail) +.TP +\-(W|A|D|F) help +Print available 'lint' checks and default settings .TP \fB\-W\fR -enable warning +warn about by default .TP -\fB\-W\fR no\- -disable warning +\fB\-A\fR +allow by default .TP -\fB\-W\fR err\- -enable warning as an error +\fB\-D\fR +deny by default .TP -\fB\-W\fR help -Print available warnings and default settings +\fB\-F\fR +forbid (deny, and deny all overrides) .TP \fB\-Z\fR help list internal options for debugging rustc @@ -117,11 +125,12 @@ To build either with a crate (.rc) file: $ rustc hello.rc .SH "BUGS" -See <\fBhttps://github.com/mozilla/rust/issues\fR> for a list of known bugs. +See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues. .SH "AUTHOR" See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare <\fIgraydon@mozilla.com\fR> is the project leader. .SH "COPYRIGHT" -See \fBLICENSE.txt\fR in the rust source distribution. +This work is licensed under MIT-like terms. See \fBLICENSE.txt\fR +in the rust source distribution. From c419e77cc12f0eae2e07097c2deb9a51238bb303 Mon Sep 17 00:00:00 2001 From: Kevin Cantu Date: Wed, 10 Oct 2012 15:45:33 -0700 Subject: [PATCH 2/3] Touchup the debug flag description printing --- src/rustc/driver/rustc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rustc/driver/rustc.rs b/src/rustc/driver/rustc.rs index c60904419d5f3..0f191c263fcf3 100644 --- a/src/rustc/driver/rustc.rs +++ b/src/rustc/driver/rustc.rs @@ -113,7 +113,7 @@ fn describe_debug_flags() { io::println(fmt!("\nAvailable debug options:\n")); for session::debugging_opts_map().each |pair| { let (name, desc, _) = *pair; - io::println(fmt!(" -Z%-20s -- %s", name, desc)); + io::println(fmt!(" -Z %-20s -- %s", name, desc)); } } From ae8e6781d2536a3b66d69dfad8f0d5e47eb8617c Mon Sep 17 00:00:00 2001 From: Kevin Cantu Date: Wed, 10 Oct 2012 16:35:52 -0700 Subject: [PATCH 3/3] Move the description of -(W|A|D|F) into the `-W help` message --- man/rustc.1 | 20 ++++---------------- src/rustc/driver/rustc.rs | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/man/rustc.1 b/man/rustc.1 index 0e0bfe0f108c3..bb6457dd493e7 100644 --- a/man/rustc.1 +++ b/man/rustc.1 @@ -93,23 +93,11 @@ Target cpu\-manufacturer\-kernel[\-os] to compile for (see http://sources.redhat.com/autobook/autobook/ autobook_17.html for detail) .TP -\-(W|A|D|F) help -Print available 'lint' checks and default settings +\fB\-W help\fR +Print 'lint' options and default settings .TP -\fB\-W\fR -warn about by default -.TP -\fB\-A\fR -allow by default -.TP -\fB\-D\fR -deny by default -.TP -\fB\-F\fR -forbid (deny, and deny all overrides) -.TP -\fB\-Z\fR help -list internal options for debugging rustc +\fB\-Z help\fR +Print internal options for debugging rustc .TP \fB\-v\fR \fB\-\-version\fR Print version info and exit diff --git a/src/rustc/driver/rustc.rs b/src/rustc/driver/rustc.rs index 0f191c263fcf3..e6a9d726f6d47 100644 --- a/src/rustc/driver/rustc.rs +++ b/src/rustc/driver/rustc.rs @@ -68,21 +68,21 @@ Options: (default: host triple) (see http://sources.redhat.com/autobook/autobook/ autobook_17.html for detail) - - -(W|A|D|F) help Print available 'lint' checks and default settings - - -W warn about by default - -A allow by default - -D deny by default - -F forbid (deny, and deny all overrides) - - -Z help list internal options for debugging rustc - + -W help Print 'lint' options and default settings + -Z help Print internal options for debugging rustc -v --version Print version info and exit "); } fn describe_warnings() { + io::println(fmt!(" +Available lint options: + -W Warn about + -A Allow + -D Deny + -F Forbid (deny, and deny all overrides) +")); + let lint_dict = lint::get_lint_dict(); let mut max_key = 0; for lint_dict.each_key |k| { max_key = uint::max(k.len(), max_key); }