-
Notifications
You must be signed in to change notification settings - Fork 13.4k
tests/ui
: A New Order [10/N]
#142217
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
base: master
Are you sure you want to change the base?
tests/ui
: A New Order [10/N]
#142217
Conversation
|
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.
Thanks, some feedback
@@ -0,0 +1,7 @@ | |||
//! Test dereferencing empty allocation rvalues is safe |
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.
Problem: I think this is actually a regression test for #13360, IOW it has nothing to do with this comment, but was rather testing that boxed (?) ZSTs don't get freed (?). This test also doesn't really have to do with allocator/
. Maybe check if there's a similar test under tests/ui/box/
, otherwise I'd move this test under tests/ui/box/
and repurpose this as a smoke test for checking that we can dereference a boxed ZST.
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.
something like?
//! Regression test for github.com/rust-lang/rust/issues/13360
//! dereferencing boxed zero-sized types should not cause improper deallocation
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.
Question: I'm slightly confused, where did this file come from?
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 is from tests/ui/auxiliary
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.
Question: do we not have a tests/ui/resolve/
test that checks undefined macros are rejected? 🤔
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.
suprisingly but no, we dont have anything like this in resolve
maximum that ive found is
//@ edition:2018
foo!(); //~ ERROR cannot find macro `foo` in this scope
pub(in ::bar) struct Baz {} //~ ERROR cannot determine resolution for the visibility
fn main() {}
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.
Discussion: this might be useful as a control-flow smoke test, but it would need to //@ check-run-results
and uncomment out the println
s to be of any actual value.
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.
we can keep this if you think so, but in my opinion this is very simple test, and we already have more complex recursive tests
Note
Intermediate commits are intended to help review, but will be squashed prior to merge.
Some
tests/ui/
housekeeping, to trim down number of tests directly undertests/ui/
. Part of #133895.r? @jieyouxu