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

--enable-debug enables debugging for src/test, causing rpass/conditional-debug-macro-off to fail. #7898

Closed
huonw opened this issue Jul 19, 2013 · 1 comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc

Comments

@huonw
Copy link
Member

huonw commented Jul 19, 2013

error: test run failed!
command: x86_64-unknown-linux-gnu/test/run-pass/conditional-debug-macro-off.stage2-x86_64-unknown-linux-gnu 
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
rust: task failed at 'explicit failure', /home/huon/rust/src/test/run-pass/conditional-debug-macro-off.rs:16
rust: domain main @0xc6d230 root task failed

------------------------------------------

rust: task failed at 'explicit failure', /home/huon/rust/src/compiletest/runtest.rs:723
test [run-pass] run-pass/conditional-debug-macro-off.rs ... FAILED

All of the old debug! statements have been converted to info!, so tests should be able to choose --cfg debug or not themselves, as the info! statements are unconditionally in the output.

cc @graydon

@pnkfelix
Copy link
Member

Got clarification from huonw about this bug: the test runner is currently deciding, based on the build configure flag --enable-debug, whether to pass --cfg debug or not to the tests; huonw is suggesting that the test runner should not make that decision based on the build configure state, but rather based on meta-data in the test itself.

@ghost ghost assigned pnkfelix Jul 24, 2013
bors added a commit that referenced this issue Jul 25, 2013
…debug-to-tests, r=huonw

Remove directive, if present, from CFG_RUSTC_FLAGS.

r? @huonw 

Fix #7898.

(One alternative tack is to build up distinct CFG_TEST_RUSTC_FLAGS
alongside CFG_RUSTC_FLAGS; but currently debug is the only --cfg flag
ever added to CFG_RUSTC_FLAGS; the other contents of CFG_RUSTC_FLAGS
are a mix of -Z flags and a few other switches like O, which seem to
make sense to propogate to the tests.)
flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 23, 2021
Don't show no_effect warning on unit structs implementing fn_once

Fixes rust-lang#7792

changelog: Don't show [`no_effect`] or [`unecessary_operation`] warning for unit struct implementing FnOnce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants