Migrate some tests from tests/ui/issues to appropriate directories#154506
Conversation
There was a problem hiding this comment.
could you please investigate original issue, it seems like this is not transmute problem
There was a problem hiding this comment.
Could you please give a hint as to which directory it should belong to? (Or maybe just the part of the test file that indicates that the test might not be related to transmute).
There was a problem hiding this comment.
I'd like if you do your own investigation and found root cause of problem in that code, and decide whether it's fine to stay here, should be moved somewhere else or be deleted, one of requirement for the project is independence
There was a problem hiding this comment.
From my perspective, the following could be potentially appropriate directories (not in priority order):
tests/ui/instrinsics: reason; because earlierinstrinsicckwas used to replace types withisizeto compare sizes of two dynamically sized types.tests/ui/associated-types: reason; the description mentions that
Tests focused on associated types. If the associated type is not in a trait definition, it belongs in the tests/ui/associated-inherent-types/ directory. Aspects exercised include, e.g., default associated types, overriding defaults, and type inference.
tests/ui/impl-traits: reason; some similar tests exist, but no transmutes are used.tests/ui/layout: reason; as the memory layout of the[u8; 2]andstruct Baris different.tests/ui/dst: reason; maybe because[u8; N]is dynamically sized
I am trying to figure out other potential candidates.
But as of now,
transmutesuits the most in my opinion, as most of the tests givingcannot transmute between different-sized typeserror are in the transmute directory only.
I take the just-above sentence back. Now, tests/ui/intrinsics is the most appropriate one here, imo.
There was a problem hiding this comment.
But as of now,
transmutesuits the most in my opinion, as most of the tests givingcannot transmute between different-sized typeserror are in the transmute directory only.
it's not about error message, it's about why this code originally was failing
There was a problem hiding this comment.
it means, if you see word transmute in test, it's not always have to go to transmute directory
There was a problem hiding this comment.
Here is my understanding of the test:
- This test checks if we can transmute from one data type to another data type when they have different types and memory layouts.
- It results in ICE, because earlier the compiler used to replace generic types with
isizeto deduce the size of the types whose size can't be deduced at compile time.
Oh, wait, it may belong to tests/ui/intrinsics. See here. This particular comment mentions the second point that I wrote above. And it's the duty of intrinsic, so it may also be a potential candidate. I have updated this in the upper comment as well.
This is the most appropriate now. (even better than transmute, imo)
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
tests/ui/issues to tests/ui/transmute tests/ui/issues to appropriate directories
5e889df to
9181351
Compare
|
@bors r+ rollup |
…smute-tests-02, r=Kivooeo
Migrate some tests from `tests/ui/issues` to appropriate directories
The following changes have been made in the pull request:
- `tests/ui/issues/issue-25746-bool-transmute.rs` ➝ `tests/ui/transmute/transmute-bool-u8.rs`
- `tests/ui/issues/issue-32377.{rs,stderr}` ➝ `tests/ui/intrinsics/transmute-phantomdata-generic-unequal-size.{rs,stderr}`
The issue links have also been added at the top of each `.rs` file.
r? Kivooeo
…smute-tests-02, r=Kivooeo
Migrate some tests from `tests/ui/issues` to appropriate directories
The following changes have been made in the pull request:
- `tests/ui/issues/issue-25746-bool-transmute.rs` ➝ `tests/ui/transmute/transmute-bool-u8.rs`
- `tests/ui/issues/issue-32377.{rs,stderr}` ➝ `tests/ui/intrinsics/transmute-phantomdata-generic-unequal-size.{rs,stderr}`
The issue links have also been added at the top of each `.rs` file.
r? Kivooeo
…smute-tests-02, r=Kivooeo
Migrate some tests from `tests/ui/issues` to appropriate directories
The following changes have been made in the pull request:
- `tests/ui/issues/issue-25746-bool-transmute.rs` ➝ `tests/ui/transmute/transmute-bool-u8.rs`
- `tests/ui/issues/issue-32377.{rs,stderr}` ➝ `tests/ui/intrinsics/transmute-phantomdata-generic-unequal-size.{rs,stderr}`
The issue links have also been added at the top of each `.rs` file.
r? Kivooeo
…uwer Rollup of 22 pull requests Successful merges: - #150965 (Fix no results when searching for == in doc) - #153999 (Remove `TaggedQueryKey::def_kind`) - #154146 (Split out the creation of `Cycle` to a new `process_cycle` function) - #154147 (Do not attempt generating DllImport for extern types) - #154812 (Update Fira Mono License Information) - #154880 (bootstrap: minor improvements to download-rustc) - #154886 (Stabilize check-cfg suggestions for symbol) - #154889 (Update wasm-component-ld to 0.5.22) - #154928 (Fix pin docs) - #154942 (delegation: generate more verbose error delegation) - #153269 (GCI: During reachability analysis don't try to evaluate the initializer of overly generic free const items) - #154506 (Migrate some tests from `tests/ui/issues` to appropriate directories) - #154673 (Use a different name for fast try builds) - #154761 (coretests: add argument order regression tests for min_by/max_by/minmax_by) - #154795 (Add more info about where autodiff can be applied) - #154808 (Post-attribute ports cleanup pt. 1) - #154825 (constify `Step for NonZero<u*>`) - #154837 (library: std: motor: use OS' process::exit in abort_internal) - #154866 (add regression test for #146514) - #154922 (c-b: Export inverse hyperbolic trigonometric functions) - #154931 (delegation(small cleanup): remove not needed PhantomData) - #154950 (library: no `cfg(target_arch)` on scalable intrinsics)
Rollup merge of #154506 - ujjwalvishwakarma2006:migrate-transmute-tests-02, r=Kivooeo Migrate some tests from `tests/ui/issues` to appropriate directories The following changes have been made in the pull request: - `tests/ui/issues/issue-25746-bool-transmute.rs` ➝ `tests/ui/transmute/transmute-bool-u8.rs` - `tests/ui/issues/issue-32377.{rs,stderr}` ➝ `tests/ui/intrinsics/transmute-phantomdata-generic-unequal-size.{rs,stderr}` The issue links have also been added at the top of each `.rs` file. r? Kivooeo
…uwer Rollup of 22 pull requests Successful merges: - rust-lang/rust#150965 (Fix no results when searching for == in doc) - rust-lang/rust#153999 (Remove `TaggedQueryKey::def_kind`) - rust-lang/rust#154146 (Split out the creation of `Cycle` to a new `process_cycle` function) - rust-lang/rust#154147 (Do not attempt generating DllImport for extern types) - rust-lang/rust#154812 (Update Fira Mono License Information) - rust-lang/rust#154880 (bootstrap: minor improvements to download-rustc) - rust-lang/rust#154886 (Stabilize check-cfg suggestions for symbol) - rust-lang/rust#154889 (Update wasm-component-ld to 0.5.22) - rust-lang/rust#154928 (Fix pin docs) - rust-lang/rust#154942 (delegation: generate more verbose error delegation) - rust-lang/rust#153269 (GCI: During reachability analysis don't try to evaluate the initializer of overly generic free const items) - rust-lang/rust#154506 (Migrate some tests from `tests/ui/issues` to appropriate directories) - rust-lang/rust#154673 (Use a different name for fast try builds) - rust-lang/rust#154761 (coretests: add argument order regression tests for min_by/max_by/minmax_by) - rust-lang/rust#154795 (Add more info about where autodiff can be applied) - rust-lang/rust#154808 (Post-attribute ports cleanup pt. 1) - rust-lang/rust#154825 (constify `Step for NonZero<u*>`) - rust-lang/rust#154837 (library: std: motor: use OS' process::exit in abort_internal) - rust-lang/rust#154866 (add regression test for rust-lang/rust#146514) - rust-lang/rust#154922 (c-b: Export inverse hyperbolic trigonometric functions) - rust-lang/rust#154931 (delegation(small cleanup): remove not needed PhantomData) - rust-lang/rust#154950 (library: no `cfg(target_arch)` on scalable intrinsics)
The following changes have been made in the pull request:
tests/ui/issues/issue-25746-bool-transmute.rs➝tests/ui/transmute/transmute-bool-u8.rstests/ui/issues/issue-32377.{rs,stderr}➝tests/ui/intrinsics/transmute-phantomdata-generic-unequal-size.{rs,stderr}The issue links have also been added at the top of each
.rsfile.r? Kivooeo