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

Add support so that Miri can automatically be quiet when the sysroot is unchanged #18

Merged
merged 1 commit into from
May 12, 2024

Conversation

saethlin
Copy link
Contributor

@saethlin saethlin commented May 11, 2024

Support for rust-lang/miri#3599

@saethlin saethlin force-pushed the quiet-when-no-change branch 2 times, most recently from 96403a0 to f99a734 Compare May 11, 2024 19:31
@saethlin saethlin changed the title Add support so that Miri can be quiet when the sysroot is unchanged Add support so that Miri can automatically be quiet when the sysroot is unchanged May 11, 2024
@RalfJung
Copy link
Owner

Looks good, thanks!
But could you please add doc comments to the new public items?

@saethlin
Copy link
Contributor Author

I think I got it now. Also applied the lifetime change for rust-lang/miri#3599 (comment)

@RalfJung
Copy link
Owner

Ah, I didn't realize an extra lifetime parameter is needed to avoid pre-computing the message in Miri... is that worth it?

@saethlin
Copy link
Contributor Author

🤷 I made it 'static initially because that's my usual lazy approach to programming. The lifetime param doesn't contaminate the API as far as I can tell, just adds some boilerplate to the implementation. And it makes calling easier.

@RalfJung
Copy link
Owner

doesn't contaminate the API

That's fair, the tests still work without even mentioning the lifetime.

However, if we ever get that lint against implicit lifetimes then the build_sysroot signature will need updating... but Miri and cargo-careful still don't as they do not ever give a type annotation to a SysrootBuilder, which is probably a rare thing to do for a builder anyway.

So, yeah, works for me. Thanks!

@RalfJung RalfJung merged commit 55d2745 into RalfJung:master May 12, 2024
7 checks passed
@saethlin saethlin deleted the quiet-when-no-change branch May 12, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants