-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoctest: suppress the default allow(unused) under --display-warnings #49064
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
let mut opts = TestOptions::default(); | ||
opts.display_warnings = true; | ||
let input = | ||
"assert_eq!(2+2, 4);"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this strange indent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since make_test
doesn't add indentation to any of the code it parses, i moved everything to the far left margin so i wouldn't have to deal with other ways of keeping the indentation right. For these one-line examples it's not necessary but i wanted both the "before" and "after" to be on the same indent level to visually compare them more easily.
With last explanation, everything seems good to me. Thanks! @bors: r+ |
📌 Commit 261efb6 has been approved by |
Note: This PR is going to have conflict with #49188, since that
|
@kennytm Oh right, that will cause some issues. Go ahead and land the other one first, then i'll update this one once that lands. |
…r=GuillaumeGomez rustdoctest: suppress the default allow(unused) under --display-warnings If you're passing rustdoc `--display-warnings`, you probably want to see the default ones too. This change modifies `test::make_test` to suppress the default `#![allow(unused)]` if the `--display-warnings` CLI flag was provided to rustdoc. cc rust-lang#41574
…r=GuillaumeGomez rustdoctest: suppress the default allow(unused) under --display-warnings If you're passing rustdoc `--display-warnings`, you probably want to see the default ones too. This change modifies `test::make_test` to suppress the default `#![allow(unused)]` if the `--display-warnings` CLI flag was provided to rustdoc. cc rust-lang#41574
⌛ Testing commit 261efb6 with merge d412d704baae8d3b0e3aad547a7326a34f45b488... |
@bors: retry prioritizing the rollup and I think this only has p=1 to not be in a rollup |
⌛ Testing commit 261efb6 with merge de3aeb349ed842bcfd23d351986f73bdb6e60670... |
@bors: retry same reason as before |
⌛ Testing commit 261efb6 with merge 2a9aab802d2eb10933938c961334661b9075349b... |
💔 Test failed - status-travis |
Failure is expected. #49064 (comment) @bors p=0 |
Ping from triage @QuietMisdreavus ! It's been a week since we last heard from you, but I'm not sure exactly where the problem is here... Maybe @kennytm or @alexcrichton can chime in with the suggested next step... |
@shepmaster The failure was expected, because a different PR changed the return value for one of these tests. I need to rebase and fix the test. Due to the all-hands last week, i also let my github notifications slide a little... |
261efb6
to
8145a77
Compare
Rebased and fixed the test. It passed locally, but i'll wait for Travis to be sure. |
(3 days later... Travis passed, gonna poke this one back out. @bors r=GuillaumeGomez |
📌 Commit 8145a77 has been approved by |
You did well! |
⌛ Testing commit 8145a77 with merge 486757e28916a381c08697dd514d87dcdc0d2615... |
💥 Test timed out |
@bors: retry |
…Gomez rustdoctest: suppress the default allow(unused) under --display-warnings If you're passing rustdoc `--display-warnings`, you probably want to see the default ones too. This change modifies `test::make_test` to suppress the default `#![allow(unused)]` if the `--display-warnings` CLI flag was provided to rustdoc. cc #41574
☀️ Test successful - status-appveyor, status-travis |
If you're passing rustdoc
--display-warnings
, you probably want to see the default ones too. This change modifiestest::make_test
to suppress the default#![allow(unused)]
if the--display-warnings
CLI flag was provided to rustdoc.cc #41574