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 do not compile in release mode with --release #60575

Open
WildCryptoFox opened this issue May 6, 2019 · 2 comments
Open

doc-tests do not compile in release mode with --release #60575

WildCryptoFox opened this issue May 6, 2019 · 2 comments
Labels
A-doctests Area: Documentation tests, run by rustdoc A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@WildCryptoFox
Copy link
Contributor

doc-tests do not compile in release mode with --release

#[cfg(debug_assertions)]
compile_error!("use --release mode!");
   Compiling playground v0.0.1 (/playground)
    Finished release [optimized] target(s) in 0.58s
     Running target/release/deps/playground-c4b7af53795dc52c
   Doc-tests playground
error: use --release mode!
 --> /playground/src/lib.rs:2:1
  |
2 | compile_error!("use --release mode!");
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Standard Output

running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
@jonas-schievink jonas-schievink added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-doctests Area: Documentation tests, run by rustdoc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 6, 2019
@ehuss
Copy link
Contributor

ehuss commented May 6, 2019

This is both a cargo issue and a rustdoc issue. There are more details at rust-lang/cargo#6570 (comment). Will need to hear from t-rustdoc to know what to do next, but I think it would be nice to unify the codegen option parsing between rustc and rustdoc.

@steveklabnik
Copy link
Member

Triage: not aware of any changes here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: No status
Development

No branches or pull requests

4 participants