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

Doc-tests no longer receive dev-dependencies #9637

Closed
nagisa opened this issue Jun 29, 2021 · 0 comments
Closed

Doc-tests no longer receive dev-dependencies #9637

nagisa opened this issue Jun 29, 2021 · 0 comments
Labels
C-bug Category: bug

Comments

@nagisa
Copy link
Member

nagisa commented Jun 29, 2021

Problem

Similar to #1474, I'm seeing a situation where doc-tests do not observe a specified dev-dependency.

Steps

#[cfg(feature = "libc")]
pub struct Exists;

/// ```
/// use banana::Exists;
/// ```
pub struct Another;
[package]
name = "banana"
version = "0.1.0"
edition = "2018"

[dependencies]
libc = { version = "0.2", optional = true }

[dev-dependencies]
libc = "0.2"

and then cargo test.

Possible Solution(s)

🤷 This works correctly for regular tests. No, that doesn't work either :( Not sure why I thought this is a regression, or a difference in behaviour.

Notes

Output of cargo version: 1.52.0

@nagisa nagisa added the C-bug Category: bug label Jun 29, 2021
@nagisa nagisa closed this as completed Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant