Skip to content

c-scape fails to compile on nightly #164

Description

@LGFae

The VaList struct has changed on Rust nightly, causing printf-compat 0.2.1 to fail to compile:

cargo c                                                                                                                        17:02:39
    Checking printf-compat v0.2.1
    Checking origin v0.26.2
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> /home/horus/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/printf-compat-0.2.1/src/output.rs:338:14
    |
338 |     va_list: VaList<'a, 'b>,
    |              ^^^^^^   ---- help: remove the lifetime argument
    |              |
    |              expected 1 lifetime argument
    |
note: struct defined here, with 1 lifetime parameter: `'a`
   --> /home/horus/.local/share/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ffi/va_list.rs:170:12
    |
170 | pub struct VaList<'a> {
    |            ^^^^^^ --

error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
   --> /home/horus/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/printf-compat-0.2.1/src/output.rs:311:14
    |
311 |     va_list: VaList<'a, 'b>,
    |              ^^^^^^   ---- help: remove the lifetime argument
    |              |
    |              expected 1 lifetime argument
    |
note: struct defined here, with 1 lifetime parameter: `'a`
   --> /home/horus/.local/share/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ffi/va_list.rs:170:12
    |
170 | pub struct VaList<'a> {
    |            ^^^^^^ --

error[E0581]: return type references lifetime `'b`, which is not constrained by the fn input types
   --> /home/horus/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/printf-compat-0.2.1/src/output.rs:312:6
    |
312 | ) -> VaListDisplay<'a, 'b> {
    |      ^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0107, E0581.
For more information about an error, try `rustc --explain E0107`.
error: could not compile `printf-compat` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

From the printf-compat Changelog, it seems their latest release addresses this, so the fix could be as simple as bumping the printf-compat version.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions