Skip to content

cargo build for tests builds dependencies with panic #5369

@ehuss

Description

@ehuss

Dependencies for tests should not have panic set from the profile. However, using cargo build (instead of cargo test) does not correctly clear the panic flag for dependencies.

Repro:

cargo new --lib a
cd a
cat >> Cargo.toml <<EOL
[profile.dev]
panic = "abort"
EOL
mkdir tests
echo "extern crate a;" > tests/t1.rs
cargo build --test t1 -v

I can fix this as part of working on profiles if you'd like.

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