Skip to content

Migrate transmute tests#154425

Open
ujjwalvishwakarma2006 wants to merge 4 commits intorust-lang:mainfrom
ujjwalvishwakarma2006:migrate-transmute-tests
Open

Migrate transmute tests#154425
ujjwalvishwakarma2006 wants to merge 4 commits intorust-lang:mainfrom
ujjwalvishwakarma2006:migrate-transmute-tests

Conversation

@ujjwalvishwakarma2006
Copy link
Copy Markdown
Contributor

@ujjwalvishwakarma2006 ujjwalvishwakarma2006 commented Mar 26, 2026

I have made the following changes in this PR:

  • tests/ui/issues/issue-23477.rstests/ui/transmute/transmute-slice-to-dst.rs
  • tests/ui/issues/issue-28625.{rs,stderr}tests/ui/transmute/transmute-associated-type-to-slice.{rs,stderr}

The reason I changed the trait name from trait Bar to trait MyTrait and type Bar to type MyType is that the same name (i.e., Bar) for the trait and associated type was making it harder to follow the test. It was confusing for me, at least.

r? Kivooeo

@rustbot rustbot added 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. labels Mar 26, 2026
@ujjwalvishwakarma2006 ujjwalvishwakarma2006 marked this pull request as ready for review March 28, 2026 12:12
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 28, 2026

This PR modifies tests/ui/issues/. If this PR is adding new tests to tests/ui/issues/,
please refrain from doing so, and instead add it to more descriptive subdirectories.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 28, 2026
Copy link
Copy Markdown
Contributor

@Teapot4195 Teapot4195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be best naming it something like transmute-slice-to-struct instead of transmute-slice-to-dst.

Otherwise, LGTM (I only quickly skimmed the issues referenced, but where they went seems sane to me).

View changes since this review

@ujjwalvishwakarma2006
Copy link
Copy Markdown
Contributor Author

I think it would be best naming it something like transmute-slice-to-struct instead of transmute-slice-to-dst.

Otherwise, LGTM (I only quickly skimmed the issues referenced, but where they went seems sane to me).

View changes since this review

Noted!!

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 2, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 2, 2026

📌 Commit a261c8c has been approved by Kivooeo

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 2, 2026
@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 2, 2026

@bors r-

@bors r=Kivooeo,Teapot4195 rollup

@rust-bors rust-bors bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 2, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 2, 2026

📌 Commit a261c8c has been approved by Kivooeo,Teapot4195

It is now in the queue for this repository.

⚠️ The following reviewer(s) could not be found: Teapot4195

@ujjwalvishwakarma2006
Copy link
Copy Markdown
Contributor Author

ujjwalvishwakarma2006 commented Apr 2, 2026

Hi, I haven't squashed modification commits. Should I do it now? It's already rolled up.

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 2, 2026

nah it's fine

next time you don't have to keep them separate

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 2, 2026
…smute-tests, r=Kivooeo,Teapot4195

Migrate transmute tests

I have made the following changes in this PR:

- `tests/ui/issues/issue-23477.rs` ➝ `tests/ui/transmute/transmute-slice-to-dst.rs`
- `tests/ui/issues/issue-28625.{rs,stderr}` ➝ `tests/ui/transmute/transmute-associated-type-to-slice.{rs,stderr}`

The reason I changed the trait name from `trait Bar` to `trait MyTrait` and `type Bar` to `type MyType` is that the same name (i.e., `Bar`) for the trait and associated type was making it harder to follow the test. It was confusing for me, at least.

r? Kivooeo
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 2, 2026
…smute-tests, r=Kivooeo,Teapot4195

Migrate transmute tests

I have made the following changes in this PR:

- `tests/ui/issues/issue-23477.rs` ➝ `tests/ui/transmute/transmute-slice-to-dst.rs`
- `tests/ui/issues/issue-28625.{rs,stderr}` ➝ `tests/ui/transmute/transmute-associated-type-to-slice.{rs,stderr}`

The reason I changed the trait name from `trait Bar` to `trait MyTrait` and `type Bar` to `type MyType` is that the same name (i.e., `Bar`) for the trait and associated type was making it harder to follow the test. It was confusing for me, at least.

r? Kivooeo
rust-bors bot pushed a commit that referenced this pull request Apr 2, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #153105 (Compute the result of a projection type with region errors)
 - #153286 (various fixes for scalable vectors)
 - #153532 (Attributes containing rustc)
 - #153960 (Make `layout_of` cycles fatal errors)
 - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization)
 - #154666 (Remove `StableHashContext` impls)
 - #154669 (Introduce #[diagnostic::on_move] on `Arc`)
 - #154710 (opaque_generic_const_args -> generic_const_args)
 - #154712 (Revert "`-Znext-solver` Remove the forced ambiguity hack from search graph")
 - #154713 (Stop compiling when we get resolving crate failure)
 - #154213 (tidy-alphabetical: fix line number in error message)
 - #154425 (Migrate transmute tests)
 - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`)
 - #154469 (mGCA: Lower spans for literal const args)
 - #154578 (Rename `probe_ty_var` to `try_resolve_ty_var`)
 - #154615 (Moving issues)
 - #154644 (rustdoc: seperate methods and associated functions in sidebar)
 - #154660 (Avoid creating async return opaques for foreign async fns)
 - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args)
 - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible)
 - #154709 (Revert `Ty` type alias in `rustc_type_ir`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 2, 2026
…smute-tests, r=Kivooeo,Teapot4195

Migrate transmute tests

I have made the following changes in this PR:

- `tests/ui/issues/issue-23477.rs` ➝ `tests/ui/transmute/transmute-slice-to-dst.rs`
- `tests/ui/issues/issue-28625.{rs,stderr}` ➝ `tests/ui/transmute/transmute-associated-type-to-slice.{rs,stderr}`

The reason I changed the trait name from `trait Bar` to `trait MyTrait` and `type Bar` to `type MyType` is that the same name (i.e., `Bar`) for the trait and associated type was making it harder to follow the test. It was confusing for me, at least.

r? Kivooeo
rust-bors bot pushed a commit that referenced this pull request Apr 2, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #153105 (Compute the result of a projection type with region errors)
 - #153286 (various fixes for scalable vectors)
 - #153532 (Attributes containing rustc)
 - #153960 (Make `layout_of` cycles fatal errors)
 - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization)
 - #154666 (Remove `StableHashContext` impls)
 - #154669 (Introduce #[diagnostic::on_move] on `Arc`)
 - #154710 (opaque_generic_const_args -> generic_const_args)
 - #154712 (Revert "`-Znext-solver` Remove the forced ambiguity hack from search graph")
 - #153614 (`FindParamInClause` handle edge-cases)
 - #154213 (tidy-alphabetical: fix line number in error message)
 - #154425 (Migrate transmute tests)
 - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`)
 - #154469 (mGCA: Lower spans for literal const args)
 - #154578 (Rename `probe_ty_var` to `try_resolve_ty_var`)
 - #154615 (Moving issues)
 - #154644 (rustdoc: seperate methods and associated functions in sidebar)
 - #154660 (Avoid creating async return opaques for foreign async fns)
 - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args)
 - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible)
 - #154709 (Revert `Ty` type alias in `rustc_type_ir`)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 2, 2026
…smute-tests, r=Kivooeo,Teapot4195

Migrate transmute tests

I have made the following changes in this PR:

- `tests/ui/issues/issue-23477.rs` ➝ `tests/ui/transmute/transmute-slice-to-dst.rs`
- `tests/ui/issues/issue-28625.{rs,stderr}` ➝ `tests/ui/transmute/transmute-associated-type-to-slice.{rs,stderr}`

The reason I changed the trait name from `trait Bar` to `trait MyTrait` and `type Bar` to `type MyType` is that the same name (i.e., `Bar`) for the trait and associated type was making it harder to follow the test. It was confusing for me, at least.

r? Kivooeo
rust-bors bot pushed a commit that referenced this pull request Apr 2, 2026
…uwer

Rollup of 20 pull requests

Successful merges:

 - #153105 (Compute the result of a projection type with region errors)
 - #153532 (Attributes containing rustc)
 - #153960 (Make `layout_of` cycles fatal errors)
 - #154527 (Emit pre-expansion feature gate warnings for negative impls and specialization)
 - #154666 (Remove `StableHashContext` impls)
 - #154669 (Introduce #[diagnostic::on_move] on `Arc`)
 - #154710 (opaque_generic_const_args -> generic_const_args)
 - #154712 (Revert "`-Znext-solver` Remove the forced ambiguity hack from search graph")
 - #153614 (`FindParamInClause` handle edge-cases)
 - #154213 (tidy-alphabetical: fix line number in error message)
 - #154425 (Migrate transmute tests)
 - #154442 (Export `derive` at the crate root: `core::derive` and `std::derive`)
 - #154469 (mGCA: Lower spans for literal const args)
 - #154578 (Rename `probe_ty_var` to `try_resolve_ty_var`)
 - #154615 (Moving issues)
 - #154644 (rustdoc: seperate methods and associated functions in sidebar)
 - #154660 (Avoid creating async return opaques for foreign async fns)
 - #154671 (Add a test for a past ICE when calling a const fn of an unresolved type with the wrong number of args)
 - #154680 ([rustdoc] Replace `DocContext` with `TyCtxt` wherever possible)
 - #154709 (Revert `Ty` type alias in `rustc_type_ir`)
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.

4 participants