Skip to content

Commit d7d8606

Browse files
committed
Update --pretty=expanded to -Zunpretty=expanded
`--pretty` is gone as of rust-lang/rust#83491
1 parent 57add9c commit d7d8606

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

docs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ trailer = "/* Text to put at the end of the generated file */"
399399
# default: doesn't emit an include guard
400400
include_guard = "mozilla_wr_bindings_h"
401401

402-
# Whether to add a `#pragma once` guard
402+
# Whether to add a `#pragma once` guard
403403
# default: doesn't emit a `#pragma once`
404404
pragma_once = true
405405

@@ -937,7 +937,7 @@ include = ["webrender", "webrender_traits"]
937937
# default: []
938938
exclude = ["libc"]
939939

940-
# Whether to use a new temporary target directory when running `rustc --pretty=expanded`.
940+
# Whether to use a new temporary target directory when running `rustc -Zunpretty=expanded`.
941941
# This may be required for some build processes.
942942
#
943943
# default: false
@@ -982,7 +982,7 @@ features = ["cbindgen"]
982982
[ptr]
983983
# An optional string to decorate all pointers that are
984984
# required to be non null. Nullability is inferred from the Rust type: `&T`,
985-
# `&mut T` and `NonNull<T>` all require a valid pointer value.
985+
# `&mut T` and `NonNull<T>` all require a valid pointer value.
986986
non_null_attribute = "_Nonnull"
987987

988988
# Options specific to Cython bindings.

src/bindgen/cargo/cargo_expand.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ extern crate tempfile;
1515
use self::tempfile::Builder;
1616

1717
#[derive(Debug)]
18-
/// Possible errors that can occur during `rustc --pretty=expanded`.
18+
/// Possible errors that can occur during `rustc -Zunpretty=expanded`.
1919
pub enum Error {
2020
/// Error during creation of temporary directory
2121
Io(io::Error),
2222
/// Output of `cargo metadata` was not valid utf8
2323
Utf8(Utf8Error),
24-
/// Error during execution of `cargo rustc --pretty=expanded`
24+
/// Error during execution of `cargo rustc -Zunpretty=expanded`
2525
Compile(String),
2626
}
2727

@@ -127,9 +127,7 @@ pub fn expand(
127127
cmd.arg(&package);
128128
cmd.arg("--verbose");
129129
cmd.arg("--");
130-
cmd.arg("-Z");
131-
cmd.arg("unstable-options");
132-
cmd.arg("--pretty=expanded");
130+
cmd.arg("-Zunpretty=expanded");
133131
info!("Command: {:?}", cmd);
134132
let output = cmd.output()?;
135133

src/bindgen/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -717,13 +717,13 @@ impl FromStr for Profile {
717717

718718
deserialize_enum_str!(Profile);
719719

720-
/// Settings to apply when running `rustc --pretty=expanded`
720+
/// Settings to apply when running `rustc -Zunpretty=expanded`
721721
#[derive(Debug, Clone, Deserialize)]
722722
#[serde(rename_all = "snake_case")]
723723
#[serde(deny_unknown_fields)]
724724
#[serde(default)]
725725
pub struct ParseExpandConfig {
726-
/// The names of crates to parse with `rustc --pretty=expanded`
726+
/// The names of crates to parse with `rustc -Zunpretty=expanded`
727727
pub crates: Vec<String>,
728728
/// Whether to enable all the features when expanding.
729729
pub all_features: bool,
@@ -806,10 +806,10 @@ pub struct ParseConfig {
806806
pub include: Option<Vec<String>>,
807807
/// The names of crates to not parse
808808
pub exclude: Vec<String>,
809-
/// The configuration options for `rustc --pretty=expanded`
809+
/// The configuration options for `rustc -Zunpretty=expanded`
810810
#[serde(deserialize_with = "retrocomp_parse_expand_config_deserialize")]
811811
pub expand: ParseExpandConfig,
812-
/// Whether to use a new temporary target directory when running `rustc --pretty=expanded`.
812+
/// Whether to use a new temporary target directory when running `rustc -Zunpretty=expanded`.
813813
/// This may be required for some build processes.
814814
pub clean: bool,
815815
/// List of crate names which generate consts, statics, and fns. By default

src/bindgen/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl fmt::Display for Error {
4040
}
4141
Error::CargoExpand(ref crate_name, ref error) => write!(
4242
f,
43-
"Parsing crate `{}`: couldn't run `cargo rustc --pretty=expanded`: {:?}",
43+
"Parsing crate `{}`: couldn't run `cargo rustc -Zunpretty=expanded`: {:?}",
4444
crate_name, error
4545
),
4646
Error::ParseSyntaxError {

0 commit comments

Comments
 (0)