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 cargo miri test doctests #123055

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Mar 25, 2024

This was the cleanest solution that came to my mind so far.

cc @RalfJung

Resolves #123028

@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2024

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 25, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2024

The Miri subtree was changed

cc @rust-lang/miri

Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for looking into this, this seems to work. :)

However, I'm not entirely sure yet if this is the best approach. (And the fact that stage 0 does not work gives me pause.)

src/bootstrap/src/core/build_steps/test.rs Outdated Show resolved Hide resolved
src/tools/miri/cargo-miri/src/phases.rs Show resolved Hide resolved
@onur-ozkan onur-ozkan changed the title enable cargo miri test doctests for stage > 0 builds enable cargo miri test doctests Mar 26, 2024
@onur-ozkan
Copy link
Member Author

However, I'm not entirely sure yet if this is the best approach. (And the fact that stage 0 does not work gives me pause.)

I used compiler_std to build rustdoc which will use the same compiler as the one in the MIRI_HOST_SYSROOT. This approach seem to work for stage 0 as well.

@onur-ozkan onur-ozkan force-pushed the miri-rustdoc branch 5 times, most recently from 11eb2cc to ec545df Compare March 26, 2024 07:21
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@RalfJung
Copy link
Member

Awesome, thanks a lot. :)
r=me when CI is green.

@onur-ozkan
Copy link
Member Author

@bors r=RalfJung

@bors
Copy link
Contributor

bors commented Mar 26, 2024

📌 Commit 69af113 has been approved by RalfJung

It is now in the queue for this repository.

@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 Mar 26, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Mar 26, 2024
enable cargo miri test doctests

This was the cleanest solution that came to my mind so far.

cc ``@RalfJung``

Resolves rust-lang#123028
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 26, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#108675 (Document `adt_const_params` feature in Unstable Book)
 - rust-lang#122120 (Suggest associated type bounds on problematic associated equality bounds)
 - rust-lang#122589 (Fix diagnostics for async block cloning)
 - rust-lang#122835 (Require `DerefMut` and `DerefPure` on `deref!()` patterns when appropriate)
 - rust-lang#123049 (In `ConstructCoroutineInClosureShim`, pass receiver by mut ref, not mut pointer)
 - rust-lang#123055 (enable cargo miri test doctests)
 - rust-lang#123057 (unix fs: Make hurd using explicit new rather than From)
 - rust-lang#123087 (Change `f16` and `f128` clippy stubs to be nonpanicking)
 - rust-lang#123103 (Rename `Inherited` -> `TypeckRootCtxt`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b8e8d65 into rust-lang:master Mar 27, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 27, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2024
Rollup merge of rust-lang#123055 - onur-ozkan:miri-rustdoc, r=RalfJung

enable cargo miri test doctests

This was the cleanest solution that came to my mind so far.

cc `@RalfJung`

Resolves rust-lang#123028
@onur-ozkan onur-ozkan deleted the miri-rustdoc branch March 27, 2024 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x.py: Test cargo miri test for doctests
5 participants