Skip to content

Commit f97a82f

Browse files
committed
Auto merge of #27392 - pnkfelix:rename-xpretty-as-unpretty, r=jroesch
Rename the unstable option `--xpretty` to `--unpretty` (Inspired by discussion with Gankro.) Make sure this gets a low priority if it gets r-plussed!
2 parents db2af71 + e050fc2 commit f97a82f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Diff for: src/librustc/session/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,8 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
828828
`typed` (crates expanded, with type annotations), or
829829
`expanded,identified` (fully parenthesized, AST nodes with IDs).",
830830
"TYPE"),
831-
opt::flagopt_u("", "xpretty",
832-
"Pretty-print the input instead of compiling, unstable variants;
831+
opt::flagopt_u("", "unpretty",
832+
"Present the input source, unstable (and less-pretty) variants;
833833
valid types are any of the types for `--pretty`, as well as:
834834
`flowgraph=<nodeid>` (graphviz formatted flowgraph for node), or
835835
`everybody_loops` (all function bodies replaced with `loop {}`).",

Diff for: src/librustc_driver/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
339339
None
340340
};
341341
if pretty.is_none() && sess.unstable_options() {
342-
matches.opt_str("xpretty").map(|a| {
342+
matches.opt_str("unpretty").map(|a| {
343343
// extended with unstable pretty-print variants
344344
pretty::parse_pretty(sess, &a, true)
345345
})

Diff for: src/librustc_driver/pretty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub enum PpSourceMode {
6060
pub enum PpFlowGraphMode {
6161
Default,
6262
/// Drops the labels from the edges in the flowgraph output. This
63-
/// is mostly for use in the --xpretty flowgraph run-make tests,
63+
/// is mostly for use in the --unpretty flowgraph run-make tests,
6464
/// since the labels are largely uninteresting in those cases and
6565
/// have become a pain to maintain.
6666
UnlabelledEdges,
@@ -90,7 +90,7 @@ pub fn parse_pretty(sess: &Session,
9090
_ => {
9191
if extended {
9292
sess.fatal(&format!(
93-
"argument to `xpretty` must be one of `normal`, \
93+
"argument to `unpretty` must be one of `normal`, \
9494
`expanded`, `flowgraph[,unlabelled]=<nodeid>`, `typed`, `identified`, \
9595
`expanded,identified`, or `everybody_loops`; got {}", name));
9696
} else {

Diff for: src/test/run-make/graphviz-flowgraph/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $(TMPDIR)/%.pp: %.rs
2828

2929
$(TMPDIR)/%.dot: %.rs
3030
$(eval $(call FIND_LAST_BLOCK,$<))
31-
$(RUSTC_LIB) -Z unstable-options --xpretty flowgraph,unlabelled=$(LASTBLOCKNUM_$<) $< -o $@.tmp
31+
$(RUSTC_LIB) -Z unstable-options --unpretty flowgraph,unlabelled=$(LASTBLOCKNUM_$<) $< -o $@.tmp
3232
cat $@.tmp | sed -e 's@ (id=[0-9]*)@@g' \
3333
-e 's@\[label=""\]@@' \
3434
-e 's@digraph [a-zA-Z0-9_]* @digraph block @' \

0 commit comments

Comments
 (0)