Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile with -Zfmt-debug=none #3409

Open
Paladynee opened this issue Jan 6, 2025 · 0 comments
Open

can't compile with -Zfmt-debug=none #3409

Paladynee opened this issue Jan 6, 2025 · 0 comments
Labels

Comments

@Paladynee
Copy link

Paladynee commented Jan 6, 2025

Describe the bug
Failed to compile using -Zfmt-debug=none

To Reproduce
have dependency: image = "0.25.5"
try compile:

fn main() {
    let args = std::env::args().collect::<Vec<_>>();
    let file = std::fs::File::open(&args[1]).expect("couldn't find file");
    let reader = std::io::BufReader::new(&file);
    let image_reader = image::ImageReader::new(reader).with_guessed_format().expect("could not guess the format");
    let output_path = std::path::Path::new(&args[2]);
    let output_format = output_path
        .extension()
        .expect("could not get extension")
        .to_str()
        .expect("could not convert to string");
    let output_file = std::fs::File::create(output_path).expect("couldn't create file");
    let mut writer = std::io::BufWriter::new(&output_file);
    let image = image_reader.decode().expect("could not decode image");
    image
        .write_to(
            &mut writer,
            image::ImageFormat::from_extension(output_format).expect("could not get output format"),
        )
        .expect("could not write to file");
}

with:
RUSTFLAGS=-Zfmt-debug=none"
command= cargo build --release

Expected behavior
The crate successfully compiles given the specific features.

Required Information
Toolchain (if is a build problem): nightly

$ cargo --version
cargo 1.86.0-nightly (fd784878c 2025-01-03)
$ rustc --version
rustc 1.86.0-nightly (1891c2866 2025-01-04)
$ nasm --version # if on x86_64
NASM version 2.16.02 compiled on Apr  4 2024

Version:

$ rav1e --version
# not installed

Operating system:

windows 10

Console Output


PS C:\Users\eurydice\Desktop\folders\iterator_theory> cargo build --release
   Compiling rav1e v0.7.1
error: expected expression, found `;`
  --> C:\Users\eurydice\Desktop\folders\iterator_theory\target\release\build\rav1e-2ef05ade2c5dc359\out/built.rs:66:33
   |
66 | pub const FEATURES: [&str; 1] = ;
   |                                 ^ expected expression

@Paladynee Paladynee added the bug label Jan 6, 2025
@Paladynee Paladynee changed the title pub const FEATURES is empty upon compile pub const FEATURES is empty upon compile with -Zfmt-debug=none Jan 6, 2025
@Paladynee Paladynee changed the title pub const FEATURES is empty upon compile with -Zfmt-debug=none can't compile with -Zfmt-debug=none Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant