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

Make rustdoc respect --error-format short in doctests #81675

Merged
merged 2 commits into from
Feb 6, 2021

Conversation

poliorcetics
Copy link
Contributor

@poliorcetics poliorcetics commented Feb 2, 2021

Note that this will not work with cargo test, only with rustdoc --test, I'll have to modify cargo as well.

Fix #81662.

@rustbot label +T-rustdoc +A-doctests

@rust-highfive
Copy link
Collaborator

r? @ollie27

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 2, 2021
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.channel         := nightly
configure: rust.debug-assertions := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
configure: 

@jyn514 jyn514 changed the title Make rustdoc respect --error-format short Make rustdoc respect --error-format short in doctests Feb 2, 2021
The other two (`human` and `json`) are already handled.
@rustbot rustbot added A-doctests Area: Documentation tests, run by rustdoc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 3, 2021
@jyn514
Copy link
Member

jyn514 commented Feb 4, 2021

Can you add a UI test for this in src/test/rustdoc-ui?

@jyn514
Copy link
Member

jyn514 commented Feb 4, 2021

r=me with CI passing (please use r=jyn514 instead of r+)

@bors delegate=poliorcetics

@bors
Copy link
Contributor

bors commented Feb 4, 2021

✌️ @poliorcetics can now approve this pull request

@poliorcetics
Copy link
Contributor Author

Should it be rolled up ?

@jyn514
Copy link
Member

jyn514 commented Feb 4, 2021

I don't think it should be marked rollup=always, no, since it has logic changes. It can still get rolled up if someone chooses to.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 4, 2021

📌 Commit 716d2cd has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 4, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2021
Rollup of 7 pull requests

Successful merges:

 - rust-lang#80011 (Stabilize `peekable_next_if`)
 - rust-lang#81580 (Document how `MaybeUninit<Struct>` can be initialized.)
 - rust-lang#81610 (BTreeMap: make Ord bound explicit, compile-test its absence)
 - rust-lang#81664 (Avoid a hir access inside get_static)
 - rust-lang#81675 (Make rustdoc respect `--error-format short` in doctests)
 - rust-lang#81753 (Never MIR inline functions with a different instruction set)
 - rust-lang#81795 (Small refactor with Iterator::reduce)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e8aaa14 into rust-lang:master Feb 6, 2021
@rustbot rustbot added this to the 1.51.0 milestone Feb 6, 2021
@poliorcetics poliorcetics deleted the respect-shortness branch February 6, 2021 11:11
bors added a commit to rust-lang/cargo that referenced this pull request Feb 24, 2021
Pass the error message format to rustdoc

- Goes with rust-lang/rust#81675.
- Will help with rust-lang/rust#81662.

This is my first PR to Cargo and I haven't finished reading the contributor guide yet, how should I add tests for this ? Did I had the code in the correct place ?
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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc does not obey --error-format for doctests error messages
7 participants