Skip to content

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

tests/ui: A New Order [10/N] #142217

wants to merge 9 commits into from

Conversation

Kivooeo
Copy link
Contributor

@Kivooeo Kivooeo commented Jun 8, 2025

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 under tests/ui/. Part of #133895.

r? @jieyouxu

@rustbot
Copy link
Collaborator

rustbot commented Jun 8, 2025

jieyouxu is not on the review rotation at the moment.
They may take a while to respond.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 8, 2025
Copy link
Member

@jieyouxu jieyouxu left a 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
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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? 🤔

Copy link
Contributor Author

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() {}

Copy link
Member

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 printlns to be of any actual value.

Copy link
Contributor Author

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

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants