-
Notifications
You must be signed in to change notification settings - Fork 13k
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
UI to unit test for those using Cell/RefCell/UnsafeCell #76454
Conversation
@matklad If you have the time, you can start reviewing this right now. I'm doing a commit per deletion of a file + add its tests into the relevant file inside I can mark commits that address comments with If necessary, I'll squash when this is done (the PR as a whole). |
I think I am done with the tests using |
☔ The latest upstream changes (presumably #77004) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
0732e76
to
5be843f
Compare
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.
Overall LGTM!
Sorry for a high review latency on this one -- I am just back from my vacation :)
} | ||
|
||
assert_eq!(x.get(), 0); | ||
} |
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.
This test feels like it intends to stresses auto-generated drop impl, rather than any specific impl details of standard library, so I think it's OK to keep as an UI test. The best way to check if this intends to check compiler or stdlib is to look at the PR which introduced the test: e47d2f6#diff-518b4158ed084dab26591f1ec09dffef. In this case, this is a change to the compiler.
But keeping this as a #[test]
sounds fine by me as well!
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.
I don't have strong feelings, I just felt it was simple enough to move. I can move it back if necessary.
Except for the discussion about |
@bors r+ rollup Thanks! |
📌 Commit a61b963 has been approved by |
…atklad UI to unit test for those using Cell/RefCell/UnsafeCell Helps with rust-lang#76268. I'm working on all files using `Cell` and moving them to unit tests when possible. r? @matklad
…atklad UI to unit test for those using Cell/RefCell/UnsafeCell Helps with rust-lang#76268. I'm working on all files using `Cell` and moving them to unit tests when possible. r? @matklad
Rollup of 7 pull requests Successful merges: - rust-lang#76454 (UI to unit test for those using Cell/RefCell/UnsafeCell) - rust-lang#76474 (Add option to pass a custom codegen backend from a driver) - rust-lang#76711 (diag: improve closure/generic parameter mismatch) - rust-lang#77170 (Remove `#[rustc_allow_const_fn_ptr]` and add `#![feature(const_fn_fn_ptr_basics)]`) - rust-lang#77194 (Add doc alias for iterator fold) - rust-lang#77288 (fix building libstd for Miri on macOS) - rust-lang#77295 (Update unstable-book: Fix ABNF in inline assembly docs) Failed merges: r? `@ghost`
Helps with #76268.
I'm working on all files using
Cell
and moving them to unit tests when possible.r? @matklad