Skip to content

libtest -Zunstable-options works on stable #97242

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
CAD97 opened this issue May 21, 2022 · 2 comments
Closed

libtest -Zunstable-options works on stable #97242

CAD97 opened this issue May 21, 2022 · 2 comments
Labels
C-bug Category: This is a bug.

Comments

@CAD97
Copy link
Contributor

CAD97 commented May 21, 2022

I tried this code:

$ cargo test -q -- --format=json
$ cargo test -q -- -Zunstable-options --format=json

I expected to see this happen:

Both executions to have the same output

error: The "json" format is only accepted on the nightly compiler

Instead, this happened:

$ cargo test -q -- --format=json
error: The "json" format is only accepted on the nightly compiler

$ cargo test -q -- -Zunstable-options --format=json
{ "type": "suite", "event": "started", "test_count": 3 }
{ "type": "test", "event": "started", "name": "fails" }
{ "type": "test", "event": "started", "name": "ignores" }
{ "type": "test", "event": "started", "name": "passes" }
{ "type": "test", "name": "ignores", "event": "ignored", "message": "I felt like it" }
{ "type": "test", "name": "fails", "event": "failed", "stdout": "thread 'fails' panicked at 'explicit panic', src\\lib.rs:18:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
{ "type": "test", "name": "passes", "event": "ok" }
{ "type": "suite", "event": "failed", "passed": 1, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": 0.0007153 }

Meta

$ rustc +stable -vV
rustc 1.61.0 (fe5b13d68 2022-05-18)
binary: rustc
commit-hash: fe5b13d681f25ee6474be29d748c65adcd91f69e
commit-date: 2022-05-18
host: x86_64-pc-windows-msvc
release: 1.61.0
LLVM version: 14.0.0

$ rustc +nightly -vV
rustc 1.63.0-nightly (cd282d7f7 2022-05-18)
binary: rustc
commit-hash: cd282d7f75da9080fda0f1740a729516e7fbec68
commit-date: 2022-05-18
host: x86_64-pc-windows-msvc
release: 1.63.0-nightly
LLVM version: 14.0.4
@CAD97 CAD97 added the C-bug Category: This is a bug. label May 21, 2022
@calebcartwright
Copy link
Member

#75526

@CAD97
Copy link
Contributor Author

CAD97 commented May 21, 2022

Closing as a duplicate then

@CAD97 CAD97 closed this as completed May 21, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants