Skip to content

cargo-xbuild doesn't build with older nightlies #106

Closed
@vamanea

Description

@vamanea

My project uses rust nightly 2021-03-23 and since some time I can't build cargo-xbuild anymore, on account of this error:

error[E0658]: use of unstable library feature 'btree_retain'
   --> /home/xxx/.cargo/registry/src/github.1485827954.workers.dev-1ecc6299db9ec823/serde_json-1.0.83/src/map.rs:286:18
    |
286 |         self.map.retain(f);
    |                  ^^^^^^
    |
    = note: see issue #79025 <https://github.com/rust-lang/rust/issues/79025> for more information
    = help: add `#![feature(btree_retain)]` to the crate attributes to enable

With older serde_json(1.0.59) it builds fine.

The linked issue was fixed in 2021 Apr 14 nightlies, so updating the toolchain to that fixed my issue. The other solution is to request a specific version of serde_json in Cargo.toml.

I'm not sure which is the better fix, but I think at least updating the README to indicate the latest supported toolchain is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions