Skip to content

cargo-feature named-profiles ignored in Cargo.toml parsing #9074

@wlmwlmwlm

Description

@wlmwlmwlm

Problem
cargo-feature named-profiles is ignored and makes cargo barf on me, in:

cargo 1.51.0-nightly (329895f5b 2021-01-06)

... on a reasonably sane Linux installation.

Tracking issue for the named-profiles feature: #6988

Steps

Cargo.toml:

package]
name = "test"
version = "0.1.0"
authors = ["wlmwlmwlm <wlmwlmwlm@gmail.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

cargo-features = ["named-profiles"]

[profile.notworking]
inherits = "debug"
lto = true

[dependencies]

Source: (default main.rs)

Invocations:

$ cargo +nightly build
error: failed to parse manifest at `/home/wlmwlmwlm/named-profiles-reproduction/Cargo.toml`

Caused by:
  feature `named-profiles` is required

  consider adding `cargo-features = ["named-profiles"]` to the manifest
$ cargo +nightly build --profile notworking -Z unstable-options
error: failed to parse manifest at `/home/wlmwlmwlm/named-profiles-reproduction/Cargo.toml`

Caused by:
  feature `named-profiles` is required

  consider adding `cargo-features = ["named-profiles"]` to the manifest

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions